mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added zoom by scroll
This commit is contained in:
parent
ddcfc69c03
commit
8c4cfd54b8
|
@ -600,6 +600,12 @@ static void do_toolbar(RECT toolbar)
|
|||
if(do_editor_button(&zoom_in_button, "ZI", 0, &button, draw_editor_button_r, 0, "[NumPad+] Zoom in") || inp_key_down(KEY_KP_ADD))
|
||||
editor.zoom_level -= 50;
|
||||
|
||||
if(inp_key_presses(KEY_MOUSE_WHEEL_UP))
|
||||
editor.zoom_level -= 20.0f;
|
||||
|
||||
if(inp_key_presses(KEY_MOUSE_WHEEL_DOWN))
|
||||
editor.zoom_level += 20.0f;
|
||||
|
||||
if(editor.zoom_level < 50)
|
||||
editor.zoom_level = 50;
|
||||
editor.world_zoom = editor.zoom_level/100.0f;
|
||||
|
|
Loading…
Reference in a new issue