|
| | Fast3dGui () |
| |
| | Fast3dGui (std::vector< std::shared_ptr< Ship::GuiWindow > > guiWindows) |
| |
| | ~Fast3dGui () override=default |
| |
| bool | SupportsViewports () override |
| | Returns true if the ImGui multi-viewport / docking feature is supported by the current backend.
|
| |
| void | Init (GuiWindowInitData windowImpl) |
| | Initialises the ImGui context with the given backend-specific handles.
|
| |
| void | HandleWindowEvents (Fast::WindowEvent event) |
| | Forwards a platform window event to the active ImGui backend.
|
| |
| void | LoadGuiTexture (const std::string &name, const std::string &path, const ImVec4 &tint) |
| | Loads an image from an archive path and caches it under the given name.
|
| |
| bool | HasTextureByName (const std::string &name) |
| | Returns true if a texture with the given name is already cached.
|
| |
| void | LoadGuiTexture (const std::string &name, const Fast::Texture &tex, const ImVec4 &tint) |
| | Uploads a Fast::Texture object to the GPU and caches it under name.
|
| |
| void | UnloadTexture (const std::string &name) |
| | Removes the texture with the given name from the cache and frees GPU resources.
|
| |
| ImTextureID | GetTextureByName (const std::string &name) |
| | Returns the ImGui texture handle for the given cache key.
|
| |
| ImVec2 | GetTextureSize (const std::string &name) |
| | Returns the pixel dimensions of the cached texture.
|
| |
| void | LoadTextureFromRawImage (const std::string &name, const std::string &path) |
| | Loads a raw image file from the filesystem (not the archive) and caches it.
|
| |
| void | LoadTextureFromResource (const std::string &name, std::shared_ptr< Ship::GuiTexture > texture) |
| | Uploads a pre-loaded GuiTexture resource to the GPU and caches it.
|
| |
| void | RefreshImGuiGamepads () override |
| | Re-binds the ImGui platform backend's gamepad list to the currently connected controllers. Called once at init and on controller add/remove so it is not re-evaluated per frame. The base implementation is a no-op.
|
| |
| | Gui () |
| | Constructs a Gui with no pre-registered windows.
|
| |
| | Gui (const std::vector< std::shared_ptr< GuiWindow > > &guiWindows, std::shared_ptr< Context > context=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< Window > window=nullptr, std::shared_ptr< Config > config=nullptr, std::shared_ptr< ResourceManager > resourceManager=nullptr, std::shared_ptr< GameOverlay > gameOverlay=nullptr) |
| | Constructs a Gui and pre-registers a list of GuiWindows.
|
| |
| virtual | ~Gui () |
| |
| void | OnInit (const nlohmann::json &initArgs) override |
| | Initialises the ImGui context and the appropriate backend renderer.
|
| |
| void | StartDraw () |
| | Begins a new ImGui frame.
|
| |
| void | EndDraw () |
| | Finalises the ImGui frame and submits draw data to the renderer.
|
| |
| void | SaveConsoleVariablesNextFrame () |
| | Schedules a CVar save to disk at the end of the current frame.
|
| |
| ImGuiID | GetMainGameWindowID () |
| | Returns the ImGui ID of the main game viewport window.
|
| |
| void | AddGuiWindow (std::shared_ptr< GuiWindow > guiWindow) |
| | Adds a GuiWindow to the draw loop.
|
| |
| std::shared_ptr< GuiWindow > | GetGuiWindow (const std::string &name) |
| | Returns the GuiWindow registered with the given name, or nullptr.
|
| |
| void | RemoveGuiWindow (std::shared_ptr< GuiWindow > guiWindow) |
| | Removes a specific GuiWindow from the draw loop.
|
| |
| void | RemoveGuiWindow (const std::string &name) |
| | Removes the GuiWindow with the given name from the draw loop.
|
| |
| void | RemoveAllGuiWindows () |
| | Removes all registered GuiWindows from the draw loop.
|
| |
| std::shared_ptr< GameOverlay > | GetGameOverlay () |
| | Returns the GameOverlay instance used for on-screen text and notifications.
|
| |
| void | SetMenuBar (std::shared_ptr< GuiMenuBar > menuBar) |
| | Sets the main application menu bar.
|
| |
| std::shared_ptr< GuiMenuBar > | GetMenuBar () |
| | Returns the registered menu bar, or nullptr if none has been set.
|
| |
| void | SetMenu (std::shared_ptr< GuiWindow > menu) |
| | Sets an optional full-screen "menu" GuiWindow (e.g. a title-screen or pause menu).
|
| |
| std::shared_ptr< GuiWindow > | GetMenu () |
| | Returns the registered menu window, or nullptr if none has been set.
|
| |
| bool | GetMenuOrMenubarVisible () |
| | Returns true if the menu bar or the full-screen menu window is currently visible.
|
| |
| bool | IsMouseOverAnyGuiItem () |
| | Returns true if the mouse cursor is currently over any ImGui item.
|
| |
| bool | IsMouseOverActivePopup () |
| | Returns true if the mouse cursor is over an active ImGui popup.
|
| |
| bool | GamepadNavigationEnabled () |
| | Returns true if ImGui gamepad navigation is enabled.
|
| |
| void | BlockGamepadNavigation () |
| | Disables ImGui gamepad navigation (allows the game to use gamepad input).
|
| |
| void | UnblockGamepadNavigation () |
| | Re-enables ImGui gamepad navigation.
|
| |
| void | ShutDownImGui (Ship::Window *window) |
| | Shuts down the ImGui context and releases backend resources.
|
| |
| | Component (const std::string &name, std::shared_ptr< Context > context=nullptr) |
| | Constructs a Component with the given name.
|
| |
| virtual | ~Component () |
| |
| void | Init (const nlohmann::json &initArgs=nlohmann::json::object()) |
| | Performs one-time initialization of this component.
|
| |
| bool | IsInitialized () const |
| | Returns true once Init() (or MarkInitialized()) has completed successfully.
|
| |
| const std::string & | GetName () const |
| | Returns the name of this Component.
|
| |
| std::string | ToString () const |
| | Returns a human-readable string representation (e.g. "Name (id)").
|
| |
| std::string | ToTreeString (int depth=0) const |
| | Returns a human-readable tree representation of this component and its children.
|
| |
| | operator std::string () const |
| | Conversion operator to std::string; equivalent to ToString().
|
| |
| ParentComponentList & | GetParents () |
| | Returns a mutable reference to the parent list.
|
| |
| const ParentComponentList & | GetParents () const |
| | Returns a const reference to the parent list.
|
| |
| ComponentList & | GetChildren () |
| | Returns a mutable reference to the child list.
|
| |
| const ComponentList & | GetChildren () const |
| | Returns a const reference to the child list.
|
| |
| virtual std::shared_ptr< Component > | TryGetSharedComponent () noexcept |
| | Returns a shared_ptr to this Component when available, otherwise nullptr.
|
| |
| virtual std::shared_ptr< Component > | GetSharedComponent () |
| | Returns a shared_ptr to this Component via the correct enable_shared_from_this base.
|
| |
| template<typename T > |
| bool | HasInChildren () const |
| | Checks whether any descendant Component matches type T via BFS.
|
| |
| template<typename T > |
| std::shared_ptr< T > | GetFirstInChildren () const |
| | Returns the first descendant that matches type T via BFS.
|
| |
| template<typename T > |
| std::shared_ptr< std::vector< std::shared_ptr< T > > > | GetInChildren () const |
| | Returns all descendants that match type T via BFS.
|
| |
| template<typename T > |
| bool | HasInParents () const |
| | Checks whether any ancestor Component matches type T via BFS.
|
| |
| template<typename T > |
| std::shared_ptr< T > | GetFirstInParents () const |
| | Returns the first ancestor that matches type T via BFS.
|
| |
| template<typename T > |
| std::shared_ptr< std::vector< std::shared_ptr< T > > > | GetInParents () const |
| | Returns all ancestors that match type T via BFS.
|
| |
| | Part () |
| | Constructs a Part and assigns it a unique ID.
|
| |
| | Part (std::shared_ptr< Context > context) |
| | Constructs a Part with an explicit Context reference and unique ID.
|
| |
| virtual | ~Part ()=default |
| |
| uint64_t | GetId () const |
| | Returns the unique identifier for this Part.
|
| |
| bool | operator== (const Part &other) const |
| | Compares two Parts for equality by their unique IDs.
|
| |
| std::shared_ptr< Context > | GetContext () const |
| | Returns the Context this Part belongs to, or nullptr if unset.
|
| |
| void | SetContext (std::shared_ptr< Context > ctx) |
| | Sets the Context this Part belongs to.
|
| |
|
| void | ImGuiWMInit () override |
| | Initialises the platform/window-manager ImGui backend. The base implementation is a no-op.
|
| |
| void | ImGuiWMShutdown () override |
| | Shuts down the platform/window-manager ImGui backend. The base implementation is a no-op.
|
| |
| void | ImGuiBackendInit () override |
| | Initialises the renderer ImGui backend (DX11 / OpenGL / Metal). The base implementation is a no-op.
|
| |
| void | ImGuiBackendShutdown () override |
| | Shuts down the renderer ImGui backend. The base implementation is a no-op.
|
| |
| void | ImGuiBackendNewFrame () override |
| | Calls the appropriate ImGui backend New Frame function (DX11 / GL / Metal). The base implementation is a no-op.
|
| |
| void | ImGuiWMNewFrame () override |
| | Calls ImGui_ImplSDL2_NewFrame() or the platform equivalent. The base implementation is a no-op.
|
| |
| void | ImGuiRenderDrawData (ImDrawData *data) override |
| | Submits the ImGui draw data to the active graphics backend. The base implementation is a no-op.
|
| |
| void | DrawFloatingWindows () override |
| | Draws all registered floating GuiWindow instances. The base implementation is a no-op. Override in subclasses to provide viewport support.
|
| |
| void | CalculateGameViewport () override |
| | Recalculates the game viewport rect to account for the menu bar and window size. The base implementation is a no-op. Override in subclasses to set up the game viewport.
|
| |
| void | DrawGame () override |
| | Renders the game viewport inside the main docking space. The base implementation is a no-op. Override in subclasses to render the game framebuffer.
|
| |
| ImTextureID | GetTextureById (int32_t id) |
| | Returns the ImTextureID for a texture identified by its integer ID.
|
| |
| void | StartFrame () |
| | Calls ImGui::NewFrame() after processing backend-specific input.
|
| |
| void | EndFrame () |
| | Calls ImGui::Render() and submits draw data to the backend.
|
| |
| virtual void | DrawMenu () |
| | Draws the menu bar and/or full-screen menu window. Override to add custom menus.
|
| |
| void | CheckSaveCvars () |
| | Flushes CVars to disk if SaveConsoleVariablesNextFrame() was called.
|
| |
| void | HandleMouseCapture () |
| | Updates mouse capture state based on window focus and UI interaction.
|
| |
| void | MarkInitialized () |
| | Marks this component as initialized without going through Init().
|
| |
| template<typename T > |
| std::shared_ptr< T > | RequireDependency (const std::shared_ptr< T > &dependency, const std::string &dependencyName) const |
| | Returns a cached dependency after validating it exists and is initialized.
|
| |
| virtual void | OnAdded (bool forced) |
| | Called after this Part has been added to a PartList.
|
| |
| virtual void | OnRemoved (bool forced) |
| | Called after this Part has been removed from a PartList.
|
| |
Concrete Gui subclass for the Fast3D rendering backend.
Overrides the virtual ImGui backend methods defined by Ship::Gui with implementations that dispatch to the appropriate platform/renderer backend (SDL+OpenGL, SDL+Metal, or DXGI+DX11) based on the active WindowBackend.
Also owns the Fast3D-specific rendering resources: texture cache and the Interpreter weak reference used for viewport and resolution calculations.