# 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:
@ -48,12 +48,12 @@ void Button::HandleInput(Hid::Ref inp) {
|
||||
inp_done = true;
|
||||
}
|
||||
void Button::Draw() {
|
||||
Assert(ren.get() && list.get() && linked_theme,
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddRectangle(pos, size, linked_theme->Get(color));
|
||||
list->AddRectangle(pos, size, theme->Get(color));
|
||||
list->AddText(pos + size * 0.5 - tdim * 0.5, label,
|
||||
linked_theme->Get(UI7Color_Text));
|
||||
theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
@ -47,15 +47,15 @@ void Checkbox::HandleInput(Hid::Ref inp) {
|
||||
inp_done = true;
|
||||
}
|
||||
void Checkbox::Draw() {
|
||||
Assert(ren.get() && list.get() && linked_theme,
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddRectangle(pos, cbs, linked_theme->Get(color));
|
||||
list->AddRectangle(pos, cbs, theme->Get(color));
|
||||
if (usr_ref) {
|
||||
list->AddRectangle(pos + 2, cbs - 4, linked_theme->Get(UI7Color_Checkmark));
|
||||
list->AddRectangle(pos + 2, cbs - 4, theme->Get(UI7Color_Checkmark));
|
||||
}
|
||||
list->AddText(pos + vec2(cbs.x() + 5, cbs.y() * 0.5 - tdim.y() * 0.5), label,
|
||||
linked_theme->Get(UI7Color_Text));
|
||||
theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
@ -26,8 +26,7 @@ SOFTWARE.
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
void Image::Draw() {
|
||||
Assert(ren.get() && list.get() && linked_theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
Assert(ren.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
Assert(img.get(), "Image is nullptr!");
|
||||
ren->OnScreen(screen);
|
||||
list->AddImage(pos, img);
|
||||
|
@ -26,10 +26,10 @@ SOFTWARE.
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
void Label::Draw() {
|
||||
Assert(ren.get() && list.get() && linked_theme,
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddText(pos, label, linked_theme->Get(UI7Color_Text));
|
||||
list->AddText(pos, label, theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
Reference in New Issue
Block a user