forked from KolibriOS/kolibrios
Update in example BCC
git-svn-id: svn://kolibrios.org@8166 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3c2325ba4a
commit
97f79f243e
@ -4,27 +4,27 @@
|
|||||||
|
|
||||||
using namespace Kolibri;
|
using namespace Kolibri;
|
||||||
|
|
||||||
const char header[] = "Title";
|
const char header[] = "Colors";
|
||||||
const char string[] = "Exit";
|
|
||||||
|
|
||||||
bool KolibriOnStart(TStartData &kos_start, TThreadData th)
|
bool KolibriOnStart(TStartData &kos_start, TThreadData th)
|
||||||
{
|
{
|
||||||
kos_start.Left = 10;
|
kos_start.Left = 10;
|
||||||
kos_start.Top = 40;
|
kos_start.Top = 40;
|
||||||
kos_start.Width = 150;
|
kos_start.Width = 135;
|
||||||
kos_start.Height = 80;
|
kos_start.Height = 80;
|
||||||
kos_start.WinData.WindowColor = 0xFFFFFF;
|
kos_start.WinData.WindowColor = 0xFFFFFF;
|
||||||
|
kos_start.WinData.WindowType = 0x34; // 0x34 - fixed, 0x33 - not fixed
|
||||||
kos_start.WinData.Title = header;
|
kos_start.WinData.Title = header;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KolibriOnPaint(void)
|
void KolibriOnPaint(void)
|
||||||
{
|
{
|
||||||
DrawButton(1,0xB0B0B0, 10,10,50,20);
|
// If button have ID 1, this is close button
|
||||||
DrawText(15, 15, 0, string);
|
|
||||||
DrawButton(2,0xff0000, 10,40,50,20);
|
DrawButton(2,0xff0000, 10,40,50,20);
|
||||||
DrawButton(3,0x00ff00, 70,10,50,20);
|
DrawButton(3,0x00ff00, 70,10,50,20);
|
||||||
DrawButton(4,0x0000ff, 70,40,50,20);
|
DrawButton(4,0x0000ff, 70,40,50,20);
|
||||||
|
DrawButton(5,0xFFFE00, 10,10,50,20);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KolibriOnButton(long id, TThreadData th)
|
void KolibriOnButton(long id, TThreadData th)
|
||||||
@ -38,14 +38,13 @@ void KolibriOnButton(long id, TThreadData th)
|
|||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
SetWindowCaption("Blue");
|
SetWindowCaption("Blue");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
SetWindowCaption("Yellow");
|
||||||
//break;
|
//break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
bool KolibriOnClose(TThreadData th)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
int KolibriOnIdle(TThreadData th)
|
int KolibriOnIdle(TThreadData th)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
@ -56,4 +55,4 @@ void KolibriOnKeyPress(TThreadData th)
|
|||||||
GetKey();
|
GetKey();
|
||||||
}
|
}
|
||||||
void KolibriOnMouse(TThreadData th) {}
|
void KolibriOnMouse(TThreadData th) {}
|
||||||
*/
|
*/
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include window.cpp
|
Set NAME=hello
|
||||||
|
Set BCC_DIR=..\..\..\bcc32
|
||||||
|
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp
|
||||||
|
|
||||||
echo STACKSIZE equ 102400> kos_make.inc
|
echo STACKSIZE equ 102400> kos_make.inc
|
||||||
echo HEAPSIZE equ 102400>> kos_make.inc
|
echo HEAPSIZE equ 102400>> kos_make.inc
|
||||||
echo include "..\..\..\bcc32\include\kos_start.inc">> kos_make.inc
|
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc
|
||||||
echo include "..\..\..\bcc32\include\kos_func.inc">> kos_make.inc
|
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc
|
||||||
echo include "..\..\..\bcc32\include\kos_heap.inc">> kos_make.inc
|
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc
|
||||||
|
|
||||||
echo include "kos_make.inc" > f_window.asm
|
echo include "kos_make.inc" > f_%NAME%.asm
|
||||||
t2fasm < window.asm >> f_window.asm
|
t2fasm < %NAME%.asm >> f_%NAME%.asm
|
||||||
fasm f_window.asm window.kex
|
fasm f_%NAME%.asm %NAME%.kex
|
||||||
if exist window.kex kpack window.kex
|
if exist %NAME%.kex kpack %NAME%.kex
|
||||||
if exist window.kex del kos_make.inc
|
if exist %NAME%.kex del kos_make.inc
|
||||||
pause
|
pause
|
||||||
|
Loading…
Reference in New Issue
Block a user