# 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:
2025-03-02 21:11:58 +01:00
parent af3d3e0b5b
commit 7d3f619169
56 changed files with 2481 additions and 536 deletions

View File

@ -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