From 95b1ec54600e50d8269f1c8a8cf2f0d30ba4c0ac Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 19 Apr 2024 16:05:22 -0700 Subject: [PATCH] Handle integers as integers in inspector and script editor number fields --- .../inspector/primitive/inspector_integer_field.tscn | 9 +++++++++ .../script/editor/variable/variable_creation_menu.gd | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 mirror-godot-app/creator/selection/inspector/primitive/inspector_integer_field.tscn diff --git a/mirror-godot-app/creator/selection/inspector/primitive/inspector_integer_field.tscn b/mirror-godot-app/creator/selection/inspector/primitive/inspector_integer_field.tscn new file mode 100644 index 00000000..9befc1cb --- /dev/null +++ b/mirror-godot-app/creator/selection/inspector/primitive/inspector_integer_field.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=2 format=3 uid="uid://dbuxetec5qt2f"] + +[ext_resource type="PackedScene" uid="uid://yl2tfblvbyak" path="res://creator/selection/inspector/primitive/inspector_number_field.tscn" id="1_38owa"] + +[node name="InspectorLabeledIntegerField" instance=ExtResource("1_38owa")] +step = 1.0 + +[node name="SpinBox" parent="SpinBoxHolder" index="0"] +step = 1.0 diff --git a/mirror-godot-app/script/editor/variable/variable_creation_menu.gd b/mirror-godot-app/script/editor/variable/variable_creation_menu.gd index 973d9d54..87a07ed6 100644 --- a/mirror-godot-app/script/editor/variable/variable_creation_menu.gd +++ b/mirror-godot-app/script/editor/variable/variable_creation_menu.gd @@ -7,7 +7,7 @@ signal request_variable_creation() const INSPECTOR_PRIMITIVE_SCENES: Dictionary = { ScriptBlock.PortType.ANY_DATA: preload("res://creator/selection/inspector/primitive/inspector_line_edit_field.tscn"), ScriptBlock.PortType.BOOL: preload("res://creator/selection/inspector/primitive/inspector_bool.tscn"), - ScriptBlock.PortType.INT: preload("res://creator/selection/inspector/primitive/inspector_number_field.tscn"), + ScriptBlock.PortType.INT: preload("res://creator/selection/inspector/primitive/inspector_integer_field.tscn"), ScriptBlock.PortType.FLOAT: preload("res://creator/selection/inspector/primitive/inspector_number_field.tscn"), ScriptBlock.PortType.STRING: preload("res://creator/selection/inspector/primitive/inspector_line_edit_field.tscn"), ScriptBlock.PortType.VECTOR2: preload("res://creator/selection/inspector/primitive/inspector_vector2.tscn"),