# Stage 2.2

- Move Timer to core
- Use Timer for app_time
- Fix Deltatime Bug in App
- Add HwInfo to lib3ds (stolen from hbloader 2 pd-rewrite port)
- Add GetSystemLanguage to lib3ds
- Add Net Header for pd-net (still need to find a way to make this working)
- Add base Decoder and Player Headers for pd-sound
- Add Mp3 Decoder (useless and untested yet)
- Add GetDataDirectory to App
- Add InitFLag to App for HwInfo
- Actually write the Timer class
- Rework the UI7 Theme API to use SmartCtor
- UI7::Menu::JoinAlign: Use a loop to determinate max width for centering a group
- Add some Doctumentation around UI7::Menu
This commit is contained in:
2025-02-28 19:49:24 +01:00
parent f9a1d8aefb
commit debedf59c6
27 changed files with 840 additions and 98 deletions

View File

@ -37,7 +37,7 @@ class Context : public SmartCtor<Context> {
Context(LI::Renderer::Ref ren, Hid::Ref hid) {
this->ren = ren;
this->inp = hid;
Theme::Default(theme);
theme = Theme::New();
back = DrawList::New(ren);
front = DrawList::New(ren);
}
@ -48,8 +48,14 @@ class Context : public SmartCtor<Context> {
Menu::Ref FindMenu(const ID& id);
void EndMenu();
/// Theme Management
Theme& GetTheme() { return theme; }
/// @brief Get Theme reference
/// @return Reference to the base Theme of the context
Theme::Ref GetTheme() { return theme; }
/// @brief Directly return a Color by using the
/// ctx->ThemeColor(UI7Color_Text) for example
/// @param clr The Input UI7 Color
/// @return The 32bit color value
u32 ThemeColor(UI7Color clr) const { return theme->Get(clr); }
/// @brief Update Context (Render menus)
/// @param delta deltatime
@ -85,7 +91,7 @@ class Context : public SmartCtor<Context> {
DrawList::Ref front;
DrawList::Ref back;
// Theme
Theme theme;
Theme::Ref theme;
// Promt Handler
};
} // namespace UI7