mirror of
https://github.com/Relintai/MemR.git
synced 2024-12-25 14:07:19 +01:00
Implemented image scroll zoom.
This commit is contained in:
parent
b222a09ea4
commit
cec967f1c1
@ -33,8 +33,14 @@ func _gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
var iemb : InputEventMouseButton = event
|
||||
|
||||
mouse_down = iemb.pressed
|
||||
mouse_pointer == event.device
|
||||
if iemb.button_index == BUTTON_WHEEL_UP:
|
||||
_zoom_slider.value += 0.03
|
||||
elif iemb.button_index == BUTTON_WHEEL_DOWN:
|
||||
_zoom_slider.value -= 0.03
|
||||
else:
|
||||
mouse_down = iemb.pressed
|
||||
mouse_pointer == event.button_index
|
||||
|
||||
accept_event()
|
||||
|
||||
elif event is InputEventMouseMotion:
|
||||
|
@ -18,6 +18,7 @@ size_flags_vertical = 3
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer"]
|
||||
margin_right = 880.0
|
||||
margin_bottom = 900.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user