mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2025-09-21 02:30:07 +02:00
Project tree simplified
This commit is contained in:
33
Examples/Hello/Hello.dpr
Normal file
33
Examples/Hello/Hello.dpr
Normal file
@@ -0,0 +1,33 @@
|
||||
program Hello;
|
||||
|
||||
uses
|
||||
KolibriOS;
|
||||
|
||||
var
|
||||
Left, Right, Top, Bottom: Integer;
|
||||
|
||||
begin
|
||||
with GetScreenSize do
|
||||
begin
|
||||
Right := Width div 4;
|
||||
Bottom := Height div 4;
|
||||
Left := (Width - Right) div 2;
|
||||
Top := (Height - Bottom) div 2;
|
||||
end;
|
||||
|
||||
while True do
|
||||
case WaitEvent of
|
||||
REDRAW_EVENT:
|
||||
begin
|
||||
BeginDraw;
|
||||
DrawWindow(Left, Top, Right, Bottom, 'Hello!', $00FFFFFF,
|
||||
WS_SKINNED_FIXED + WS_COORD_CLIENT + WS_CAPTION, CAPTION_MOVABLE);
|
||||
EndDraw;
|
||||
end;
|
||||
KEY_EVENT:
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
end;
|
||||
end.
|
1
Examples/Hello/build.bat
Normal file
1
Examples/Hello/build.bat
Normal file
@@ -0,0 +1 @@
|
||||
@call "%~dp0..\..\Lib\build.bat" "%~dp0Hello"
|
Reference in New Issue
Block a user