merged from 0.4.3: screenshot by f10

This commit is contained in:
Alfred Eriksson 2008-09-01 18:38:08 +00:00
parent b649ab6c16
commit 5c93ab7655
2 changed files with 23 additions and 9 deletions

View file

@ -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();
}

View file

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