← EGFX function index

EGFX · FUNCTION 27ALPHA · USE AT YOUR OWN RISK

PROGRESS_BAR

Draw a progress bar.

Uses aligned position, dimensions, foreground/background, value/max and optional title.

Parameters

NameOrderDescription
X/Y8–108-pixel-aligned position.
WIDTH/HEIGHT11–13Bar dimensions.
FG/BG14–15Colours.
VALUE/MAX16–19Progress values.
TITLE22–63Optional inline title.

BASIC example

Tested listing: ui-demo.bas.

10 MODE 1:HIMEM=&2400:PROCeginit:t%=0
20 REPEAT:PROCegbegin
30 PROCegbar(32,48,240,12,t%,100,"LOAD PROGRESS",2,1)
40 PROCegbanner(48,112,24,"GENERIC TEXT BANNER",2)
50 t%=(t%+1) MOD 101:PROCegpresent:UNTIL INKEY(0)=81
60 END

Assembly example

        JSR init_egfx
        JSR begin_frame
        LDA #27 : JSR eg_call
        JSR present_frame
        RTS
Captured EGFX output for function 27
Captured EGFX UI output.

← Function index