about summary refs log tree commit diff
path: root/src/game/editor/ed_editor.cpp
diff options
context:
space:
mode:
authorAlfred Eriksson <somerunce@gmail.com>2008-10-18 10:04:51 +0000
committerAlfred Eriksson <somerunce@gmail.com>2008-10-18 10:04:51 +0000
commit8c4cfd54b8861253211f94945b19d24463bfdcba (patch)
tree2573b2150ce0d7abc9e637e9c7bd2589048fe409 /src/game/editor/ed_editor.cpp
parentddcfc69c03f40dbd9840ad4dae5d6c2fd2a05ff9 (diff)
downloadzcatch-8c4cfd54b8861253211f94945b19d24463bfdcba.tar.gz
zcatch-8c4cfd54b8861253211f94945b19d24463bfdcba.zip
added zoom by scroll
Diffstat (limited to 'src/game/editor/ed_editor.cpp')
-rw-r--r--src/game/editor/ed_editor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index ca4f354f..efdd823e 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -599,6 +599,12 @@ static void do_toolbar(RECT toolbar)
 	static int zoom_in_button = 0;
 	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;