mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 04:15:54 +00:00
Debug addon and removed old scaling
This commit is contained in:
parent
ed502eb061
commit
ca85765ca2
16 changed files with 1637 additions and 11 deletions
33
addons/DebugGUI/Attributes/DebugGUIGraphAttribute.cs
Normal file
33
addons/DebugGUI/Attributes/DebugGUIGraphAttribute.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
||||
public class DebugGUIGraphAttribute : Attribute
|
||||
{
|
||||
public float min { get; private set; }
|
||||
public float max { get; private set; }
|
||||
public Color color { get; private set; }
|
||||
public int group { get; private set; }
|
||||
public bool autoScale { get; private set; }
|
||||
|
||||
public DebugGUIGraphAttribute(
|
||||
// Line color
|
||||
float r = 1,
|
||||
float g = 1,
|
||||
float b = 1,
|
||||
// Values at top/bottom of graph
|
||||
float min = 0,
|
||||
float max = 1,
|
||||
// Offset position on screen
|
||||
int group = 0,
|
||||
// Auto-adjust min/max to fit the values
|
||||
bool autoScale = true
|
||||
)
|
||||
{
|
||||
color = new Color(r, g, b, 0.9f);
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.group = group;
|
||||
this.autoScale = autoScale;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue