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 Class #153

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

UI Base Class #153

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

Comments

@pavlicekdominik
Copy link
Member

UMounteaBaseUserWidget

Purpose: Serves as a foundational class for user interface widgets within the Mountea Inventory and Equipment system, implementing the IMounteaUserWidgetInterface. It provides the mechanisms for theme management, event handling, and executing specific widget commands to facilitate a dynamic and interactive user interface.

Class Type: UUserWidget (Subclass of Unreal Engine's UUserWidget)

Implements: IMounteaUserWidgetInterface

Properties:

Theme

  • Type: UUITheme*
  • Description: An optional property to override the default theme configuration for the widget.

MounteaEventBindings

  • Type: TArray<FMounteaEventBinding>
  • Description: Maintains a collection of event bindings that are specific to the Mountea system for this widget.

Functions:

NativeConstruct

  • Inputs: None
  • Detailed Behavior: Invoked during the widget's initialization to set up bindings and configurations.

NativeDestruct

  • Inputs: None
  • Detailed Behavior: Invoked during the widget's destruction to clean up bindings and release resources.

BindDelegate

  • Inputs: FMounteaDynamicDelegate, FGameplayTag, FName
  • Returns: bool
  • Detailed Behavior: Associates a delegate to an event tag, with an optional name for further specification.

UnbindDelegate

  • Inputs: FMounteaDynamicDelegate, FGameplayTag, FName
  • Returns: bool
  • Detailed Behavior: Detaches a delegate from an event tag, with an optional name for specificity.

CallEvent

  • Inputs: FGameplayTag, FName, FMounteaDynamicDelegateContext
  • Returns: bool
  • Detailed Behavior: Triggers all delegates associated with the specified event tag.

RemoveBindings

  • Inputs: FGameplayTag, FName
  • Returns: bool
  • Detailed Behavior: Eliminates bindings linked to a particular event tag and name.

RemoveAllBindings

  • Inputs: None
  • Returns: bool
  • Detailed Behavior: Clears all event bindings associated with the widget.

Blueprint Callable Functions:

LoadTheme (BlueprintImplementableEvent)

  • Detailed Behavior: Loads the widget's theme configuration from an appropriate source.

GetTheme (BlueprintImplementableEvent)

  • Returns: UITheme*
  • Detailed Behavior: Retrieves the active theme configuration for the widget.

ProcessMounteaWidgetCommand (BlueprintImplementableEvent)

  • Inputs: FString, UObject*
  • Detailed Behavior: Processes custom commands that are specific to the widget.

Flow and Logic:

Initialization: The widget is instantiated with its constructor and NativeConstruct, setting up necessary properties and bindings.

Theme Management: The widget uses LoadTheme to apply the appropriate theme settings and GetTheme to access the current theme configuration.

Event Handling: The widget manages events through a series of bind and unbind functions, ensuring that appropriate actions are taken when events occur.

Custom Logic: Implementers can use ProcessMounteaWidgetCommand to handle specific commands within the widget's context.

Cleanup: NativeDestruct and associated functions ensure that the widget's destruction is handled cleanly, with all resources appropriately released.

@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