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 Theme Helpers #152

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

UI Theme Helpers #152

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

Comments

@pavlicekdominik
Copy link
Member

ValidateThemeData

Purpose: Check that a given theme data asset includes all necessary resources and complies with expected structures.

Inputs:

  • UUITheme: The UI Theme data asset to validate.

Returns:

A boolean indicating whether the theme data is valid.

Pseudocode:

Function ValidateThemeData(UIThemeData) -> bool
    // Check if the UI theme data asset is not null
    If UIThemeData is null
        Return false

    // Check if the UI theme data asset has valid references/resources
    If not UIThemeData.Fonts.IsValid()
        Return false
    If not UIThemeData.Colors.IsValid()
        Return false
    If not UIThemeData.Textures.IsValid()
        Return false
    If not UIThemeData.Sounds.IsValid()
        Return false
    // ... Continue with other resources ...

    // If all checks pass, return true
    Return true
End Function

IsRuntimeThemeSwitchingAllowed

Purpose: Determine if the system permits theme changes while the game is running, which might be relevant for performance considerations or gameplay reasons.

Returns:

A boolean indicating if runtime theme switching is permitted.

Pseudocode:

Function IsRuntimeThemeSwitchingAllowed() -> bool
    // Define a boolean variable that dictates the ability to switch themes at runtime
    // This could be a setting from a configuration file or a global setting within the game
    bool allowRuntimeSwitching = GameSettings.AllowRuntimeThemeSwitching

    // Return the value of this setting
    Return allowRuntimeSwitching
End Function
@pavlicekdominik pavlicekdominik converted this from a draft issue Nov 2, 2023
@pavlicekdominik pavlicekdominik self-assigned this Nov 2, 2023
@pavlicekdominik pavlicekdominik added this to the 1.0.0.X milestone Nov 2, 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