From 895aef63b439db700b3787da11ec139230203677 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 19 May 2020 20:38:52 +0000 Subject: [PATCH] revert cubeline git-svn-id: svn://kolibrios.org@7955 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/demos/cubeline/trunk/main.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/programs/demos/cubeline/trunk/main.cpp b/programs/demos/cubeline/trunk/main.cpp index 1aa520b257..4c18e744c9 100644 --- a/programs/demos/cubeline/trunk/main.cpp +++ b/programs/demos/cubeline/trunk/main.cpp @@ -29,6 +29,11 @@ static struct { #define KEY_ESC 1 #define KEY_F 33 +static char title1[] = "TinyGL in KolibriOS"; +static char title2[] = "F full screen"; +static char title3[] = "ESC - exit"; +static char fps[] = "FPS:"; + static unsigned char FullScreen = 0; static unsigned char skin = 3; @@ -157,12 +162,24 @@ static void disabletgl() delete pri; } +static void Title() +{ + __menuet__write_text(300,8,0x10ffffff,fps,strlen(fps)); + __menuet__write_text(8,8,0x10ffffff,title1,strlen(title1)); + __menuet__write_text(180,8,0x00ffffff,title2,strlen(title2)); + __menuet__write_text(600,8,0x00ffffff,title3,strlen(title3)); +} + static void draw_window(void) { - __menuet__window_redraw(1); // start redraw - __menuet__define_window(win.x,win.y,win.dx,win.dy,TYPEWIN(0,0,0,1,skin,0,0,0),0, - "Cubeline / F full screen / FPS:"); - __menuet__window_redraw(2); // end redraw + // start redraw + __menuet__window_redraw(1); + // define&draw window + __menuet__define_window(win.x,win.y,win.dx,win.dy,TYPEWIN(0,0,0,1,skin,0,0,0),0,0); + // end redraw + __menuet__window_redraw(2); + // display string + Title(); } int main(void)