fox32os/applications/fetcher/About.okm

44 lines
1.3 KiB
Plaintext

MODULE About;
IMPORT OS, Browser;
VAR aboutRunning: CHAR;
aboutWindow: ARRAY WINDOW_STRUCT_SIZE 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;
tempAbtResPtr: PTR;
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);
tempAbtResPtr := get_resource(browserIconsResPtr, "abt", 64);
IF tempAbtResPtr THEN
draw_str_to_overlay(tempAbtResPtr, 16, 176, 0FFFFFFFFH, 0FF674764H, overlay);
free_memory(tempAbtResPtr);
END;
END;
END.