mirror of
https://github.com/Relintai/MemR.git
synced 2024-12-27 14:17:35 +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:
|
if event is InputEventMouseButton:
|
||||||
var iemb : InputEventMouseButton = event
|
var iemb : InputEventMouseButton = event
|
||||||
|
|
||||||
|
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_down = iemb.pressed
|
||||||
mouse_pointer == event.device
|
mouse_pointer == event.button_index
|
||||||
|
|
||||||
accept_event()
|
accept_event()
|
||||||
|
|
||||||
elif event is InputEventMouseMotion:
|
elif event is InputEventMouseMotion:
|
||||||
|
@ -18,6 +18,7 @@ size_flags_vertical = 3
|
|||||||
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer"]
|
||||||
margin_right = 880.0
|
margin_right = 880.0
|
||||||
margin_bottom = 900.0
|
margin_bottom = 900.0
|
||||||
|
mouse_filter = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user