Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Base Interface #154

Open
pavlicekdominik opened this issue Nov 3, 2023 · 0 comments
Open

UI Base Interface #154

pavlicekdominik opened this issue Nov 3, 2023 · 0 comments
Assignees
Milestone

Comments

@pavlicekdominik
Copy link
Member

IMounteaUserWidgetInterface

Purpose: To define a common interface for user interface widgets within the Mountea system, ensuring consistent theme loading and retrieval alongside command execution capabilities.

Methods:

ExecuteCommand

  • Type: Function
  • Description: Executes a given command relevant to the widget's functionality, altering UI elements or invoking specific logic as required.
  • Inputs:
    • Command: A FString denoting the command to be executed.
    • Context: An optional UObject providing additional data for the command execution.
  • Returns: A bool reflecting the success (true) or failure (false) of the command execution.

LoadTheme

  • Type: Function
  • Description: Loads the theme configuration for the widget, applying visual and functional settings based on the system's current theme.
  • Inputs: None explicitly defined, as the theme is typically determined by the system or user settings.
  • Returns: Void. Implementation should handle errors internally and adjust the UI as necessary.

GetTheme

  • Type: Function
  • Description: Retrieves the currently active theme configuration for the widget, allowing for adjustments or queries regarding the UI's appearance and behavior.
  • Inputs: None required for a simple retrieval.
  • Returns: A theme configuration object, potentially a subclass of UMounteaInventoryThemeConfig, indicating the current theme settings.

Usage and Logic Integration:

Theme Management:

  • Theme Loading: Upon widget initialization or when theme changes are detected, the LoadTheme method is invoked to update the widget's appearance and settings to match the new theme.
  • Theme Retrieval: When information about the current theme is needed, possibly for conditional logic or visual updates, GetTheme provides access to the theme configuration.

Command Handling:

  • Initialization: Implementing classes are expected to set up any necessary structures or variables during construction to handle commands properly.
  • Execution: When a command is issued to the widget, ExecuteCommand is invoked with the relevant parameters. The implementation carries out the command and returns the result.

Consistent User Experience:

  • User Interaction: The interface defines how widgets should process user input, ensuring a cohesive user experience across the system.
  • Custom Widget Logic: Widgets may implement additional commands or theme-related logic to accommodate unique interactions or display requirements.
@pavlicekdominik pavlicekdominik self-assigned this Nov 3, 2023
@pavlicekdominik pavlicekdominik added this to the 1.0.0.X milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant