xyginext  0.2.0
Second generation of xygine game creation framework
Public Member Functions | List of all members
xy::GuiClient Class Reference

Allows registering GUI controls with the default output window, or registering custom windows using the ui namespace. Classes which inherit this interface may register controls with the imgui renderer. This is usually used for debugging output or when creating tooling. More...

#include <GuiClient.hpp>

Inheritance diagram for xy::GuiClient:
xy::Scene xy::SystemManager

Public Member Functions

 GuiClient (const GuiClient &)=default
 
 GuiClient (GuiClient &&)=default
 
GuiClientoperator= (const GuiClient &)=default
 
GuiClientoperator= (GuiClient &&)=default
 
void registerStatusControls (const std::function< void()> &)
 Registers one or more gui controls with the default status window. The given function should include the ui/ImGui functions as they would appear between the Begin() and End() commands without Begin() and End() themselves. These controls will then appear in the default status window all the time the object which inherits this interface exists. DEPRECATED.
 
void registerConsoleTab (const std::string &name, const std::function< void()> &)
 Registers one or more gui controls with the console window. The given function should include the ui/ImGui functions as they would appear between the Begin() and End() commands without Begin() and End() themselves. These controls will then appear in a new tab in the console window all the time the object which inherits this interface exists. More...
 
void registerWindow (const std::function< void()> &)
 Registers a custom window with the ImGui renderer. The given function should include the Begin() and End() calls to create a fully stand-alone window with ImGui. The window will exist all the time the object which inherits this interface exists.
 

Detailed Description

Allows registering GUI controls with the default output window, or registering custom windows using the ui namespace. Classes which inherit this interface may register controls with the imgui renderer. This is usually used for debugging output or when creating tooling.

Member Function Documentation

◆ registerConsoleTab()

void xy::GuiClient::registerConsoleTab ( const std::string &  name,
const std::function< void()> &   
)

Registers one or more gui controls with the console window. The given function should include the ui/ImGui functions as they would appear between the Begin() and End() commands without Begin() and End() themselves. These controls will then appear in a new tab in the console window all the time the object which inherits this interface exists.

Parameters
nameTitle to give the new tab
functionGui function to render the contents of the tab