//  // // ##### # # #### -= Nuclex Library =-  // //  # ## ## # # TitleScreen.h - Toxid title screen  // //  # ### # #  // //  # ### # # The title screen of the game  // //  # ## ## # #  // //  # # # #### R1 (C)2002-2004 Markus Ewald -> License.txt  // //  // #ifndef TOXID_UI_UISERVER_H #define TOXID_UI_UISERVER_H #include "Toxid/Toxid.h" #include "Toxid/Main.h" #include "Nuclex/GUI/DynamicTheme.h" #include "Nuclex/GUI/DesktopWindow.h" #include "Nuclex/Video/VertexDrawer.h" namespace Toxid { namespace { // ############################################################################################# // // # Toxid::centerDialog() # // // ############################################################################################# // inline Box2 centerDialog(const Point2 &Size) { Point2 Pos = (Point2( Main::getInstance().getVideoDevice()->getDisplayMode().Resolution, StaticCastTag() ) - Size) / 2; return Box2(Pos, Pos + Size); } } //  // //  Toxid::UIServer  // //  // /// User interface server /** Manages user interface related tasks */ class UIServer : public sigc::trackable { public: /// Constructor UIServer(const string &sThemeFile = "Toxid.theme.xml"); // // UIServer implementation // public: /// Get currently active screen const shared_ptr &getScreen() const; /// Assign another screen to become activate void setScreen(const shared_ptr &spScreen); /// Render frame listener void renderFrame( const shared_ptr &spVideoRC, const shared_ptr &spAudioRC ); private: /// Theme which defines the GUI's look GUI::DynamicTheme m_Theme; /// Vertex drawer used to draw the theme Video::VertexDrawer m_VertexDrawer; /// ? shared_ptr m_spPreviousScreen; }; } // namespace Toxid #endif // TOXID_UI_UISERVER_H