fox32os/applications/fetcher/About.okm

37 lines
1.0 KiB
Plaintext
Raw Normal View History

2023-07-16 06:56:09 +02:00
MODULE About;
IMPORT OS;
VAR aboutRunning: CHAR;
aboutWindow: ARRAY 36 OF CHAR;
PROCEDURE AboutMain();
BEGIN
aboutRunning := 1;
new_window(PTROF(aboutWindow), "About", 256, 192, 192, 144, 0, 0);
DrawAboutWindow();
WHILE aboutRunning DO
GetNextWindowEvent(PTROF(aboutWindow));
(* mouse release event *)
IF eventArgs[0] = PTROF(EVENT_TYPE_MOUSE_RELEASE) THEN
destroy_window(PTROF(aboutWindow));
aboutRunning := 0;
END;
save_state_and_yield_task();
END;
END;
PROCEDURE DrawAboutWindow();
VAR overlay: INT;
BEGIN
overlay := get_window_overlay_number(PTROF(aboutWindow));
fill_overlay(0FF674764H, overlay);
draw_str_to_overlay("fox32", 16, 16, 0FFFFFFFFH, 0FF674764H, overlay);
draw_str_to_overlay("the computer made with love", 16, 32, 0FFFFFFFFH, 0FF674764H, overlay);
draw_filled_rectangle_to_overlay(4, 56, 248, 2, 0FFFFFFFFH, overlay);
END;
END.