HammeriteEditorToolSimpleToolPopup

Editor. Inherits PanelContainer

A small options panel for a tool: a title and a column of typed fields and buttons. Hand it to HammeriteEditorTool.add_popup().

Properties

TypeNameDefault
VBoxContainercontent_container
Dictionary[StringName, Control]field_inputs
Labeltitle_label

Methods

ReturnsMethod
Buttonadd_button(name: StringName, label: String)
voidadd_field(name: StringName, default_value, label: String, disabled: bool = false)
Labeladd_note(text: String)
voidadd_separator()
boolhas_field(name: StringName)
voidset_field_editable(name: StringName, editable: bool)
voidset_title(title: String)
voidset_value(name: StringName, value)

Signals

button_pressed

signal button_pressed(name: StringName)

The button added as name by add_button() was pressed.

value_changed

signal value_changed(name: StringName, new_value)

The author changed field name to new_value: an int, float, String or bool, matching the field's default.

Property descriptions

content_container

var content_container: VBoxContainer

The column everything is added to, title first.

field_inputs

var field_inputs: Dictionary[StringName, Control]

Each field's control by name: a SpinBox, LineEdit or CheckBox. The popup's own dictionary.

title_label

var title_label: Label

Shows the text given to set_title().

Method descriptions

add_button()

func add_button(name: StringName, label: String) -> Button

A tool parameter that is an action rather than a value, e.g. rotating what is being drawn. Emits button_pressed with name.

add_field()

func add_field(name: StringName, default_value, label: String, disabled: bool = false) -> void

Adds a labelled field named name, its control chosen by default_value's type: a SpinBox for int or float (range ±65536), a LineEdit for String, a CheckBox for bool. Any other type is an error. Changes emit value_changed.

add_note()

func add_note(text: String) -> Label

A line of explanation, for when what a tool does depends on state that is not in the popup.

add_separator()

func add_separator() -> void

Adds a horizontal rule below what is there so far.

has_field()

func has_field(name: StringName) -> bool

Whether a field named name has been added.

set_field_editable()

func set_field_editable(name: StringName, editable: bool) -> void

Lets field name be changed by the author, or only show its value. Does nothing for a name with no field.

set_title()

func set_title(title: String) -> void

Sets the text at the top of the popup.

set_value()

func set_value(name: StringName, value) -> void

Shows value in field name without emitting value_changed. Does nothing for a name with no field.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17