From 509fcca5986651c8ba712fb395f8498f2dea4109 Mon Sep 17 00:00:00 2001 From: Amlal Date: Wed, 18 Dec 2024 21:39:59 +0100 Subject: BootZ: Improve format UI. Signed-off-by: Amlal --- dev/Modules/FB/FB.h | 2 +- dev/Modules/FB/KWindow.h | 13 ++++++------- dev/Modules/FB/Rsrc/WndControls.rsrc | 12 ++++++------ 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'dev/Modules') diff --git a/dev/Modules/FB/FB.h b/dev/Modules/FB/FB.h index d7984714..6a609255 100644 --- a/dev/Modules/FB/FB.h +++ b/dev/Modules/FB/FB.h @@ -12,7 +12,7 @@ #define cg_color(R, G, B) RGB(R, G, B) -#define cg_get_clear_clr() cg_color(0xB2, 0xB2, 0xB2) +#define cg_get_clear_clr() cg_color(0x20, 0x20, 0x20) #define cg_fini() kCGCursor = 0 diff --git a/dev/Modules/FB/KWindow.h b/dev/Modules/FB/KWindow.h index 4422bb69..f84e36d4 100644 --- a/dev/Modules/FB/KWindow.h +++ b/dev/Modules/FB/KWindow.h @@ -6,7 +6,6 @@ #pragma once -#include "NewKit/Macros.h" #include #include #include @@ -58,7 +57,7 @@ namespace CG { cg_init(); - CGDrawInRegion(cg_color(0x45, 0x00, 0x06), CG::UIAccessibilty::Height(), CG::UIAccessibilty::Width(), + CGDrawInRegion(cg_get_clear_clr(), CG::UIAccessibilty::Height(), CG::UIAccessibilty::Width(), 0, 0); cg_fini(); @@ -116,7 +115,7 @@ namespace CG inline Kernel::Void CGDrawStringToWnd(ML_WINDOW_STRUCT* wnd, const Kernel::Char* text, Kernel::Int32 y_dst, Kernel::Int32 x_dst, Kernel::Int32 color) { - y_dst += wnd->w_y + FLATCONTROLS_HEIGHT; + y_dst += wnd->w_y + FLAT_CONTROLS_HEIGHT; x_dst += wnd->w_x; if (y_dst > (wnd->w_h + wnd->w_y)) @@ -184,15 +183,15 @@ namespace CG CGDrawInRegion(cg_color(0xDF, 0xDF, 0xDF), wnd->w_w, wnd->w_h, wnd->w_y, wnd->w_x); } - CGDrawInRegion(cg_color(0xFF, 0xFF, 0xFF), wnd->w_w, FLATCONTROLS_HEIGHT, wnd->w_y, wnd->w_x); + CGDrawInRegion(cg_color(0xFF, 0xFF, 0xFF), wnd->w_w, FLAT_CONTROLS_HEIGHT, wnd->w_y, wnd->w_x); if (wnd->w_sub_type != kWndFlagHideCloseControl) { - CGDrawBitMapInRegion(FlatControls, FLATCONTROLS_HEIGHT, FLATCONTROLS_WIDTH, wnd->w_y, wnd->w_x + wnd->w_w - FLATCONTROLS_WIDTH); + CGDrawBitMapInRegion(zka_flat_controls, FLAT_CONTROLS_HEIGHT, FLAT_CONTROLS_WIDTH, wnd->w_y, wnd->w_x + wnd->w_w - FLAT_CONTROLS_WIDTH); } else if (wnd->w_sub_type == kWndFlagCloseControlSelect) { - CGDrawBitMapInRegion(FlatControlsClose, FLATCONTROLS_CLOSE_HEIGHT, FLATCONTROLS_CLOSE_WIDTH, wnd->w_y, wnd->w_x + wnd->w_w - FLATCONTROLS_WIDTH); + CGDrawBitMapInRegion(zka_flat_controls_active, FLAT_CONTROLS_CLOSEHEIGHT, FLAT_CONTROLS_CLOSEWIDTH, wnd->w_y, wnd->w_x + wnd->w_w - FLAT_CONTROLS_WIDTH); } CGDrawString(wnd->w_window_name, wnd->w_x + 8, wnd->w_y + 8, cg_color(0x00, 0x00, 0x00)); @@ -226,7 +225,7 @@ namespace CG for (SizeT child = 0; child < wnd->w_child_count; ++child) { wnd->w_child_elements[child]->w_x += wnd->w_x; - wnd->w_child_elements[child]->w_y += wnd->w_y + FLATCONTROLS_HEIGHT; + wnd->w_child_elements[child]->w_y += wnd->w_y + FLAT_CONTROLS_HEIGHT; if ((wnd->w_child_elements[child]->w_w + wnd->w_child_elements[child]->w_x) > (wnd->w_x + wnd->w_w) || (wnd->w_child_elements[child]->w_h + wnd->w_child_elements[child]->w_y) > (wnd->w_y + wnd->w_h)) diff --git a/dev/Modules/FB/Rsrc/WndControls.rsrc b/dev/Modules/FB/Rsrc/WndControls.rsrc index a7024fde..e571fcbf 100644 --- a/dev/Modules/FB/Rsrc/WndControls.rsrc +++ b/dev/Modules/FB/Rsrc/WndControls.rsrc @@ -1,8 +1,8 @@ -#define FLATCONTROLS_HEIGHT 24 -#define FLATCONTROLS_WIDTH 44 +#define FLAT_CONTROLS_HEIGHT 24 +#define FLAT_CONTROLS_WIDTH 44 // array size is 3168 -static inline const unsigned int FlatControls[] = { +static inline const unsigned int zka_flat_controls[] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, @@ -29,11 +29,11 @@ static inline const unsigned int FlatControls[] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff }; -#define FLATCONTROLS_CLOSE_HEIGHT 24 -#define FLATCONTROLS_CLOSE_WIDTH 44 +#define FLAT_CONTROLS_CLOSEHEIGHT 24 +#define FLAT_CONTROLS_CLOSEWIDTH 44 // array size is 3168 -static inline const unsigned int FlatControlsClose[] = { +static inline const unsigned int zka_flat_controls_active[] = { 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, 0xeb1616, -- cgit v1.2.3