Skip to content

Conversation

@abaire
Copy link
Contributor

@abaire abaire commented Sep 24, 2021

Puts in the foundation for theme selection.

  • Modifies Makefile to blindly copy anything under Resources/NeXThemes and drops the new_all workaround by adding RESOURCES to TARGET.
  • Adds a Theme JSON parsing class.
  • Moves the default theme resources into a default theme subdir and adds a .json definition file for them.

Some nice followups would be:

  1. Extend Font so the font color can be changed.
  2. Add a menu item to list and select themes.
  3. Add a launcher image so it's clear that NeX hasn't frozen when the user launches a new XBE (we can flash this up and with the current nxdk it should be automatically persisted until the newly launched XBE takes over, though Graphical corruption when using HalQuickRebootRoutine to return to dashboard XboxDev/nxdk#507 will need to be fixed)

@abaire
Copy link
Contributor Author

abaire commented Sep 24, 2021

@kosmas12 I took a stab at putting in a simple foundation that uses JSON files to define themes. Assuming @dracc is OK with this approach, maybe you'd like to rebase your PR and take on the theme directory scanning and menu selection parts?

@abaire abaire force-pushed the theme_support branch 4 times, most recently from bb58e9f to b9803f8 Compare September 30, 2021 23:11
@abaire abaire force-pushed the theme_support branch 6 times, most recently from e21adb1 to a504757 Compare October 8, 2021 15:16
@abaire abaire mentioned this pull request Jan 9, 2022
Copy link
Contributor

@MasonT8198 MasonT8198 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good, rudimentary 1080i support may be a decent idea but doesn't have to be within the scope of this PR


std::ifstream themeFile(themeFilePath);
nlohmann::json json;
// FIXME: Once nxdk supports C++ Exceptions, this needs to be put in a try-catch block!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supported now is it not?

public:
struct MenuTheme {
std::string font;
// TODO: Actually support this in Font.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit: font not Font

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure I was referring to the Font class, so I think the capitalization is correct. Making it "font" would be ambiguous with the member var just above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also sounds good

#endif
{ "logging", nlohmann::json(o.logging) },
{ "homescreenConfig", nlohmann::json(o.homescreen) } };
{ "homescreen", nlohmann::json(o.homescreen) } };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: specific reason why this was changed? Listing it as config may make it easier for outside devs to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a long time, but looking a few lines down at line 246 it's specifically looking for "homescreen" when reading the config file, so I think saving the config would always cause the default values to be used.

It also strikes me as more consistent to use "homescreen" in the same way that "logging", etc... is used rather than "loggingConfig".

Copy link
Contributor

@MasonT8198 MasonT8198 Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Sounds Good, voice to text is really losing today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants