about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/game/editor/ed_editor.cpp30
-rw-r--r--src/game/editor/ed_editor.hpp2
2 files changed, 23 insertions, 9 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index e4e04478..9c0edcb7 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -2326,15 +2326,18 @@ void EDITOR::render()
 		}
 	}
 	
-	// render butt ugly mouse cursor
-	float mx = ui_mouse_x();
-	float my = ui_mouse_y();
-	gfx_texture_set(cursor_texture);
-	gfx_quads_begin();
-	if(ui_got_context == ui_hot_item())
-		gfx_setcolor(1,0,0,1);
-	gfx_quads_drawTL(mx,my, 16.0f, 16.0f);
-	gfx_quads_end();
+	if (editor.show_mouse_pointer)
+	{
+		// render butt ugly mouse cursor
+		float mx = ui_mouse_x();
+		float my = ui_mouse_y();
+		gfx_texture_set(cursor_texture);
+		gfx_quads_begin();
+		if(ui_got_context == ui_hot_item())
+			gfx_setcolor(1,0,0,1);
+		gfx_quads_drawTL(mx,my, 16.0f, 16.0f);
+		gfx_quads_end();
+	}
 	
 }
 
@@ -2476,8 +2479,17 @@ extern "C" void editor_update_and_render()
 	if(inp_key_down(KEY_F8))
 		editor.load("data/maps/debug_test.map");
 	
+	if(inp_key_down(KEY_F10))
+		editor.show_mouse_pointer = false;
+	
 	editor.render();
 	
+	if(inp_key_down(KEY_F10))
+	{
+		gfx_screenshot();
+		editor.show_mouse_pointer = true;
+	}
+	
 	inp_clear_events();
 }
 
diff --git a/src/game/editor/ed_editor.hpp b/src/game/editor/ed_editor.hpp
index f9527f33..f879e3c0 100644
--- a/src/game/editor/ed_editor.hpp
+++ b/src/game/editor/ed_editor.hpp
@@ -350,6 +350,7 @@ public:
 		world_zoom = 1.0f;
 		zoom_level = 100;
 		lock_mouse = false;
+		show_mouse_pointer = true;
 		mouse_delta_x = 0;
 		mouse_delta_y = 0;
 		mouse_delta_wx = 0;
@@ -394,6 +395,7 @@ public:
 	float world_zoom;
 	int zoom_level;
 	bool lock_mouse;
+	bool show_mouse_pointer;
 	bool gui_active;
 	bool proof_borders;
 	float mouse_delta_x;