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

Merging Multiple StyleSheets #45

Closed
TheDudeFromCI opened this issue Feb 8, 2024 · 0 comments · Fixed by #46
Closed

Merging Multiple StyleSheets #45

TheDudeFromCI opened this issue Feb 8, 2024 · 0 comments · Fixed by #46
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@TheDudeFromCI
Copy link
Contributor

This feature request is a small quality of life enhancement to allow for the merging of multiple smaller style sheets into a single larger style sheet when applied to an entity. This motivation behind this is for allowing separation of files depending on what interface is being loaded without having to put everything into a single large file.

For example, one main style sheet might exist that controls a global theme and overall design for how the game should look and feel, while more specific components, like a specific inventory menu might define custom image paths and style changes that are specific to it, while still requiring access to the global theme for buttons and text within the inventory.

I imagine tracking them could be done by creating a StyleSheetList component that contains a list of asset handles (all of the tracked style sheets), and merges them together (naively via text concat??) before passing that merged file contents to the parser. Whenever any of these tracked asset handles changes, it can grab the contents from all tracked assets and re-merge and apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants