Added a "Keep window on top" option.

This commit is contained in:
skidau 2015-05-18 13:11:58 +00:00
parent 6020b6728c
commit e8dddc9147
6 changed files with 246 additions and 215 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2657,6 +2657,19 @@ EVT_HANDLER(MMX, "Enable MMX")
update_opts();
}
EVT_HANDLER(KeepOnTop, "Keep window on top")
{
GetMenuOptionBool("KeepOnTop", gopts.keep_on_top);
MainFrame* mf = wxGetApp().frame;
if (gopts.keep_on_top)
mf->SetWindowStyle(mf->GetWindowStyle() | wxSTAY_ON_TOP);
else
mf->SetWindowStyle(mf->GetWindowStyle() & ~wxSTAY_ON_TOP);
update_opts();
}
EVT_HANDLER(NoStatusMsg, "Disable on-screen status messages")
{
GetMenuOptionInt("NoStatusMsg", disableStatusMessages, 1);

View File

@ -3782,6 +3782,13 @@ bool MainFrame::BindControls()
if (wxGetApp().pending_fullscreen || fullScreen)
panel->ShowFullScreen(true);
MainFrame* mf = wxGetApp().frame;
if (gopts.keep_on_top)
mf->SetWindowStyle(mf->GetWindowStyle() | wxSTAY_ON_TOP);
else
mf->SetWindowStyle(mf->GetWindowStyle() & ~wxSTAY_ON_TOP);
#ifndef NO_LINK
LinkMode linkMode = GetConfiguredLinkMode();

View File

@ -141,6 +141,7 @@ opt_desc opts[] =
L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz2x|xbrz3x|xbrz4x|xbrz5x|plugin")),
STROPT("Display/FilterPlugin", "", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin),
ENUMOPT("Display/IFB", "", wxTRANSLATE("Interframe blending function"), gopts.ifb, wxTRANSLATE("none|smart|motionblur")),
BOOLOPT("Display/KeepOnTop", "KeepOnTop", wxTRANSLATE("Keep window on top"), gopts.keep_on_top),
INTOPT("Display/MaxThreads", "Multithread", wxTRANSLATE("Maximum number of threads to run filters in"), gopts.max_threads, 1, 8),
#ifdef __WXMSW__
ENUMOPT("Display/RenderMethod", "", wxTRANSLATE("Render method; if unsupported, simple method will be used"), gopts.render_method, wxTRANSLATE("simple|opengl|cairo|direct3d")),

View File

@ -21,6 +21,7 @@ extern struct opts_t
int render_method;
int video_scale;
bool retain_aspect;
bool keep_on_top;
/// GB
wxString gb_bios;

View File

@ -328,6 +328,11 @@
<checkable>1</checkable>
</object>
<object class="separator"/>
<object class="wxMenuItem" name="KeepOnTop">
<label>_Keep window on top</label>
<checkable>1</checkable>
</object>
<object class="separator"/>
<object class="wxMenuItem" name="NoStatusMsg">
<label>_Disable on-screen display</label>
<checkable>1</checkable>