added zoom by scroll

This commit is contained in:
Alfred Eriksson 2008-10-18 10:04:51 +00:00
parent ddcfc69c03
commit 8c4cfd54b8

View file

@ -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;