mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix zoom tool mode doing the opposite of what it says
This commit is contained in:
parent
1d82bd95e5
commit
cdf50ce00d
|
@ -1,8 +1,10 @@
|
|||
extends BaseTool
|
||||
|
||||
enum ZoomMode { ZOOM_OUT, ZOOM_IN }
|
||||
|
||||
var _relative: Vector2
|
||||
var _prev_mode := 0
|
||||
var _zoom_mode := 0
|
||||
var _prev_mode := ZoomMode.ZOOM_OUT
|
||||
var _zoom_mode := ZoomMode.ZOOM_OUT
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
|
@ -19,7 +21,7 @@ func _input(event: InputEvent) -> void:
|
|||
_zoom_mode = $ModeOptions.selected
|
||||
|
||||
|
||||
func _on_ModeOptions_item_selected(id: int) -> void:
|
||||
func _on_ModeOptions_item_selected(id: ZoomMode) -> void:
|
||||
_zoom_mode = id
|
||||
update_config()
|
||||
save_config()
|
||||
|
@ -34,9 +36,7 @@ func _on_100_pressed() -> void:
|
|||
|
||||
|
||||
func get_config() -> Dictionary:
|
||||
return {
|
||||
"zoom_mode": _zoom_mode,
|
||||
}
|
||||
return {"zoom_mode": _zoom_mode}
|
||||
|
||||
|
||||
func set_config(config: Dictionary) -> void:
|
||||
|
|
|
@ -16,9 +16,9 @@ custom_minimum_size = Vector2(92, 0)
|
|||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
item_count = 2
|
||||
popup/item_0/text = "Zoom in"
|
||||
popup/item_0/text = "Zoom out"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Zoom out"
|
||||
popup/item_1/text = "Zoom in"
|
||||
popup/item_1/id = 1
|
||||
|
||||
[node name="Options" type="Label" parent="." index="4"]
|
||||
|
|
Loading…
Reference in a new issue