Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
Original window skin:
... <Child type="Button" skin="WindowCaption" offset = "3 0 -6 30" align = "HStretch Top" name = "Caption"> <Property key="Scale" value = "1 1 0 0"/> </Child> <Child type="Button" skin="WindowX" offset = "-3 0 24 30" align = "Right Top" name = "Button"> <Property key="Event" value = "close"/> </Child> ...
New window skin:
... <Child type="Button" skin="WindowCaption" offset = "3 0 -54 30" align = "HStretch Top" name = "Caption"> <Property key="Scale" value = "1 1 0 0"/> </Child> <Child type="Button" skin="WindowX" offset = "-3 0 24 30" align = "Right Top" name = "Button"> <Property key="Event" value = "close"/> </Child> <Child type="Button" skin="WindowX" offset = "-27 0 24 30" align = "Right Top" name = "Button"> <Property key="Event" value = "minimized"/> </Child> <Child type="Button" skin="WindowX" offset = "-51 0 24 30" align = "Right Top" name = "Button"> <Property key="Event" value = "maximized"/> </Child> ...
Create window:
MyGUI::WindowPtr window = MyGUI::Gui::getInstance().createWidget<MyGUI::Window>("WindowCSX", x, y, 390, 300, MyGUI::Align::Default, "Overlapped"); window->eventWindowButtonPressed += MyGUI::newDelegate(this, &DemoKeeper::notifyWindowPressed);
Event:
void DemoKeeper::notifyWindowPressed(MyGUI::Window* _widget, const std::string& _name) { MyGUI::WindowPtr window = _widget->castType<MyGUI::Window>(); if (_name == "close") window->destroySmooth(); else if (_name == "minimized") { // hide window and show button in your taskbar } else if (_name == "maximized") { // maximized window } }
Contributors to this page: Altren
,
jacmoe
and
Beauty
.
Page last modified on Saturday 13 of August, 2011 15:16:11 UTC by Altren
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
57
online users

