# Changes 0.2.4-1
- Add GIT_BRANCH (for development and stable) - Write Documentation of - pd-core (exept of vec.hpp) - pd-app - pd-drivers - pd-lib3ds - pd-image - pd-image - pd-ui7
This commit is contained in:
@ -36,11 +36,11 @@ void Button::HandleInput(Hid::Ref inp) {
|
||||
Assert(screen.get(), "Screen is not set up!");
|
||||
if (screen->ScreenType() == Screen::Bottom) {
|
||||
if (inp->IsHeld(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPos(), vec4(pos, size))) {
|
||||
LI::Renderer::InBox(inp->TouchPos(), vec4(FinalPos(), size))) {
|
||||
color = UI7Color_ButtonHovered;
|
||||
}
|
||||
if (inp->IsUp(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPosLast(), vec4(pos, size))) {
|
||||
LI::Renderer::InBox(inp->TouchPosLast(), vec4(FinalPos(), size))) {
|
||||
color = UI7Color_ButtonActive;
|
||||
pressed = true;
|
||||
}
|
||||
@ -51,8 +51,8 @@ void Button::Draw() {
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddRectangle(pos, size, theme->Get(color));
|
||||
list->AddText(pos + size * 0.5 - tdim * 0.5, label,
|
||||
list->AddRectangle(FinalPos(), size, theme->Get(color));
|
||||
list->AddText(FinalPos() + size * 0.5 - tdim * 0.5, label,
|
||||
theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
|
@ -35,11 +35,11 @@ void Checkbox::HandleInput(Hid::Ref inp) {
|
||||
Assert(screen.get(), "Screen is not set up!");
|
||||
if (screen->ScreenType() == Screen::Bottom) {
|
||||
if (inp->IsHeld(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPos(), vec4(pos, size))) {
|
||||
LI::Renderer::InBox(inp->TouchPos(), vec4(FinalPos(), size))) {
|
||||
color = UI7Color_FrameBackgroundHovered;
|
||||
}
|
||||
if (inp->IsUp(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPosLast(), vec4(pos, size))) {
|
||||
LI::Renderer::InBox(inp->TouchPosLast(), vec4(FinalPos(), size))) {
|
||||
color = UI7Color_FrameBackgroundHovered;
|
||||
usr_ref = !usr_ref;
|
||||
}
|
||||
@ -50,12 +50,12 @@ void Checkbox::Draw() {
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddRectangle(pos, cbs, theme->Get(color));
|
||||
list->AddRectangle(FinalPos(), cbs, theme->Get(color));
|
||||
if (usr_ref) {
|
||||
list->AddRectangle(pos + 2, cbs - 4, theme->Get(UI7Color_Checkmark));
|
||||
list->AddRectangle(FinalPos() + 2, cbs - 4, theme->Get(UI7Color_Checkmark));
|
||||
}
|
||||
list->AddText(pos + vec2(cbs.x() + 5, cbs.y() * 0.5 - tdim.y() * 0.5), label,
|
||||
theme->Get(UI7Color_Text));
|
||||
list->AddText(FinalPos() + vec2(cbs.x() + 5, cbs.y() * 0.5 - tdim.y() * 0.5),
|
||||
label, theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
@ -29,7 +29,7 @@ void Image::Draw() {
|
||||
Assert(ren.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
Assert(img.get(), "Image is nullptr!");
|
||||
ren->OnScreen(screen);
|
||||
list->AddImage(pos, img);
|
||||
list->AddImage(FinalPos(), img);
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
@ -29,7 +29,7 @@ void Label::Draw() {
|
||||
Assert(ren.get() && list.get() && theme,
|
||||
"Did you run Container::Init correctly?");
|
||||
ren->OnScreen(screen);
|
||||
list->AddText(pos, label, theme->Get(UI7Color_Text));
|
||||
list->AddText(FinalPos(), label, theme->Get(UI7Color_Text));
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
Reference in New Issue
Block a user