From a26092c93771fcc614abcfa6a506fc1ae19f400d Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Sun, 18 Oct 2020 16:08:37 +0000 Subject: [PATCH] Update boxlib example: Add progressbar git-svn-id: svn://kolibrios.org@8110 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/ktcc/trunk/samples/clayer/boxlib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/programs/develop/ktcc/trunk/samples/clayer/boxlib.c b/programs/develop/ktcc/trunk/samples/clayer/boxlib.c index a33f23ab57..7f12ce2979 100644 --- a/programs/develop/ktcc/trunk/samples/clayer/boxlib.c +++ b/programs/develop/ktcc/trunk/samples/clayer/boxlib.c @@ -1,4 +1,4 @@ -// BOXLIB EXAMPLE (scrollbar) +// BOXLIB EXAMPLE (scrollbar, progressbar) // Writed by maxcodehack #include #include @@ -19,12 +19,14 @@ char* title = "Boxlib example"; int win_bg_color = 0x858585; -scrollbar scroll = {15, WIN_W - 26, WIN_H - 29, 0, 0, 2, 115, 15, 0,0x707070,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; +scrollbar scroll = {15, WIN_W - 26, WIN_H - 29, 0, 0, 2, 215, 15, 0,0x707070,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; +progressbar pg = {0, 10, 10, 270, 35, 1, 0, 200, 0xB4B4B4, 0x2728FF, 0xA9A9A9}; void draw_window(){ begin_draw(); sys_create_window(215,100,WIN_W,WIN_H,title,win_bg_color,0x34); scrollbar_v_draw(&scroll); + progressbar_draw(&pg); end_draw(); } @@ -66,6 +68,8 @@ int main() break; case evMouse: scrollbar_v_mouse(&scroll); + pg.value = scroll.position; + progressbar_draw(&pg); break; } }