This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit from this. More...
#include <ImguiUtils.h>
Public Member Functions | |
| ImguiSlate (const std::string &panelName, FrameInfo &frameInfo) | |
| Constructor Function. Init with Slate's name. | |
| virtual | ~ImguiSlate ()=default |
| Destructor Function. | |
| virtual void | OnUpdate (TimeStep &ts)=0 |
| This interface is called on SlateSystem Update. | |
| virtual void | OnRender ()=0 |
| This interface is called on SlateRenderer Render. | |
| virtual void | OnEvent (Event &event)=0 |
| This interface is called on global event function pointer execute. | |
| void | SetWindowState (bool isSlateOn) |
| Set Slate is render able or not. | |
| ImVec2 & | GetPanelSize () |
| Get Panel Size. | |
| ImVec2 & | GetPanelPos () |
| Get Panel Pos. | |
| bool | IsFocused () const |
| Get is IsFocused. | |
| bool | IsHovered () const |
| Get is IsHovered. | |
| bool | IsResizedThisFrame () const |
| Get boolean of whether resized this frame. | |
| const std::string & | GetName () const |
| Get this panel Name. | |
Protected Member Functions | |
| void | Begin (float alpha=1.0f, ImGuiWindowFlags flags=0) |
| Begin a common slate. | |
| void | Begin (const std::string &panelName, float alpha=1.0f, ImGuiWindowFlags flags=0) |
| Begin a common slate with name. | |
| void | End () |
| End a slate. | |
| void | LoadSlateIcon (ImTextureID &id, const std::string &iconFile) |
| Load a Texture from ResourcePool. | |
| virtual void | QueryIsResizedThisFrame (const ImVec2 &thisFrameSize) |
| Query whether viewport is resized this frame. | |
Protected Attributes | |
| ImVec2 | m_PanelSize = { 1, 1 } |
| This slate's size. | |
| ImVec2 | m_PanelPos |
| This slate's position in desktop. | |
| std::string | m_PanelName |
| This slate's name. | |
| FrameInfo & | m_FrameInfo |
| The FrameData reference. | |
| bool | m_IsFocused = false |
| True if Focus. | |
| bool | m_IsHovered = false |
| True if Hovered. | |
| bool | m_IsSlateOn = false |
| bool | m_IsResized = false |
| Boolean of whether resized this frame. | |
| ImGuiWindowFlags | m_WindowFlags = 0 |
| Flags of this window slate. | |
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit from this.
Definition at line 26 of file ImguiUtils.h.