Skip to content

CurveEditorControl ​

Inherits: VBoxContainer

A control that edits a curve (a growth curve, a falloff) with a drawn preview and a maximum value that can be changed. curve_changed and max_value_changed are emitted when the player edits it.

Properties ​

intcurve_height200
boolshow_previewtrue
intpreview_samples100
floatmax_value500.0 # Configurable max value

Variables ​

Curvecurve
EditorResourcePickerresource_picker
RichTextLabelpreview_label
MenuButtonpreset_button
TextureRectcurve_texture_rect
SpinBoxmax_value_spinbox

Methods ​

voidset_max_value( new_max_value: float )
floatget_max_value()
voidset_curve( new_curve: Curve )
Curveget_curve()
boolhas_curve()
voidclear_curve()
voidopen_curve_editor()
floatsample_curve( t: float )
voidensure_curve()

Signals ​

curve_changed( curve: Curve ) ​

max_value_changed( max_value: float ) ​

Property descriptions ​

int curve_height = 200 ​

No description yet.

bool show_preview = true ​

No description yet.

int preview_samples = 100 ​

No description yet.

float max_value = 500.0 # Configurable max value ​

No description yet.

Variable descriptions ​

Curve curve ​

No description yet.

EditorResourcePicker resource_picker ​

No description yet.

RichTextLabel preview_label ​

No description yet.

MenuButton preset_button ​

No description yet.

TextureRect curve_texture_rect ​

No description yet.

SpinBox max_value_spinbox ​

No description yet.

Method descriptions ​

void set_max_value( new_max_value: float ) ​

No description yet.

float get_max_value() ​

No description yet.

void set_curve( new_curve: Curve ) ​

No description yet.

Curve get_curve() ​

No description yet.

bool has_curve() ​

No description yet.

void clear_curve() ​

No description yet.

void open_curve_editor() ​

No description yet.

float sample_curve( t: float ) ​

No description yet.

void ensure_curve() ​

No description yet.