From 30e5aa322bf253cdf48cddf53a1c8a1e9720e705 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 24 Aug 2024 15:46:47 +0200 Subject: [CG] Add button control and worked on improving CG. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/Sources/DLLMain.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'dev/ZKA/Sources') diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx index 16e7a82a..f8c59a53 100644 --- a/dev/ZKA/Sources/DLLMain.cxx +++ b/dev/ZKA/Sources/DLLMain.cxx @@ -186,25 +186,35 @@ namespace Kernel::Detail EXTERN_C Kernel::Void KeMain(Kernel::Void) { - CGInit(); + CGInit(); CGDrawInRegion(CGColor(0x45, 0x00, 0x06), CG::UIAccessibilty::The().Height(), CG::UIAccessibilty::The().Width(), - 0, 0); + 0, 0); CGFini(); - auto root_zka_wnd = CG::CGCreateWindow(0, "ZKA System", "Window", 0, 0, 512, 214); + auto root_zka_wnd = CG::CGCreateWindow(CG::cWndFlagWindow, "ZKA Setup", "Window", 0, 0, CG::UIAccessibilty::The().Height() - 20, CG::UIAccessibilty::The().Width() - 20); root_zka_wnd->w_x = 10; root_zka_wnd->w_y = 10; root_zka_wnd->w_needs_repaint = Yes; - CG::CGDrawWindowList(&root_zka_wnd, 1); /// Now run kernel loop, until no process are running. Kernel::Detail::FilesystemInstaller(); // automatic filesystem creation. + auto root_install_wnd = CG::CGCreateWindow(CG::cWndFlagButton, "Install ZKA.", "Button", 0, 0, 128, 32); + + root_install_wnd->w_x = 30; + root_install_wnd->w_y = 60; + + root_install_wnd->w_needs_repaint = Yes; + + CG::UI_WINDOW_STRUCT* arr[] = {root_zka_wnd, root_install_wnd}; + + CG::CGDrawWindowList(arr, 2); + while (Yes) { } -- cgit v1.2.3