hide gui with thumbnail generation
This commit is contained in:
@@ -43,6 +43,7 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
{
|
||||
g_fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt"));
|
||||
g_fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt"));
|
||||
_hideGui = false;
|
||||
|
||||
//Bottom Left
|
||||
TextButtonInstance* button = makeTextButton();
|
||||
@@ -434,6 +435,7 @@ void GuiRootInstance::setDebugMessage(std::string msg, G3D::RealTime msgTime)
|
||||
|
||||
void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
{
|
||||
if(_hideGui) return;
|
||||
//TODO--Move these to their own instance
|
||||
|
||||
std::stringstream stream;
|
||||
@@ -539,3 +541,7 @@ void GuiRootInstance::onMouseLeftUp(G3D::RenderDevice* renderDevice, int x,int y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiRootInstance::hideGui(bool doHide) {
|
||||
_hideGui = doHide;
|
||||
}
|
||||
@@ -15,8 +15,12 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
AppendMenu(mainmenu, MF_STRING, 100, "New");
|
||||
AppendMenu(mainmenu, MF_STRING, 101, "Open...");
|
||||
AppendMenu(mainmenu, MF_STRING, 102, "Close");
|
||||
AppendMenu(mainmenu, MF_STRING, 103, "ThumbnailGenerator::click");
|
||||
AppendMenu(mainmenu, MF_SEPARATOR, 0, NULL);
|
||||
|
||||
// Temporary
|
||||
AppendMenu(mainmenu, MF_STRING, 103, "ThumbnailGenerator::click hideSky = true");
|
||||
AppendMenu(mainmenu, MF_STRING, 104, "ThumbnailGenerator::click hideSky = false");
|
||||
|
||||
POINT p;
|
||||
GetCursorPos(&p);
|
||||
int menuClick = TrackPopupMenu(mainmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||
@@ -34,6 +38,10 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
break;
|
||||
case 103:
|
||||
g_dataModel->getThumbnailGenerator()->click("PNG", 256, 256, true);
|
||||
break;
|
||||
case 104:
|
||||
g_dataModel->getThumbnailGenerator()->click("JPEG", 256, 256, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user