@@ -31,15 +31,15 @@ const ZOOM_FACTOR: float = 1.1
31
31
@onready var _open_scene_icon = _open_scene_button .get_theme_icon ("Load" , "EditorIcons" )
32
32
33
33
@onready var _mouse_override : Control = % MouseOverride
34
- @onready var _zoom_label : Label = % ZoomLabel
34
+ @onready var _zoom_button : Button = % ZoomButton
35
35
36
36
var _current_block_script : BlockScriptSerialization
37
37
var _block_scenes_by_class = {}
38
38
var _panning := false
39
39
var zoom : float :
40
40
set (value ):
41
41
_window .scale = Vector2 (value , value )
42
- _zoom_label .text = "%.1f x" % value
42
+ _zoom_button .text = "%.1f x" % value
43
43
get :
44
44
return _window .scale .x
45
45
@@ -106,7 +106,7 @@ func block_script_selected(block_script: BlockScriptSerialization):
106
106
zoom = 1
107
107
108
108
_window .visible = false
109
- _zoom_label .visible = false
109
+ _zoom_button .visible = false
110
110
111
111
_empty_box .visible = false
112
112
_selected_node_box .visible = false
@@ -118,7 +118,7 @@ func block_script_selected(block_script: BlockScriptSerialization):
118
118
if block_script != null :
119
119
_load_block_script (block_script )
120
120
_window .visible = true
121
- _zoom_label .visible = true
121
+ _zoom_button .visible = true
122
122
123
123
if block_script != _current_block_script :
124
124
reset_window_position ()
@@ -322,3 +322,8 @@ func set_mouse_override(override: bool):
322
322
func generate_script_from_current_window (block_script : BlockScriptSerialization ) -> String :
323
323
# TODO: implement multiple windows
324
324
return BlockTreeUtil .generate_script_from_nodes (_window .get_children (), block_script )
325
+
326
+
327
+ func _on_zoom_button_pressed ():
328
+ zoom = 1.0
329
+ reset_window_position ()
0 commit comments