start of a menu.

This commit is contained in:
visionmercer 2026-05-04 13:49:56 +02:00
commit 7f9e6ea5e9

View file

@ -123,7 +123,7 @@ do
case chr$(19) ' ctrl+s
'TODO: save logic
case chr$(27)' esc
'TODO: main menu
menu
case "h"
state.zoom = 1.0
state.offsetX = (_width / 2) - (_width(layers(0).ihandle) / 2)
@ -262,7 +262,7 @@ sub canvas
if _mousebutton(2) then drawCol = state.bcolor
' 4. Interaction Logic
if _mousex > boxX1 then
'if _mousex > boxX1 then
' Start Drawing Logic
if state.tool = 9 and (mouseclicked or rmouseclicked) then
_dest layers(1).ihandle
@ -363,7 +363,7 @@ sub canvas
pointCount = 0
end if
end if
end if
'end if
_dest 0 ' Ensure we return to main screen
end sub
@ -487,3 +487,21 @@ FUNCTION CheckResize (CurrentScreen AS _UNSIGNED LONG) 'pulled straight out of t
END IF
END FUNCTION
sub menu()
Line (0,0)-(_width-1,_height-1),_rgb32(0,1),bf
do until done
k$=inkey$
while _mouseinput:wend
mouseclicked=mbd and not _mousebutton(1)
mbd=_mousebutton(1)
if button(10,10,60,23,"open") then system
if button(10,34,60,23,"save") then system
if button(10,56,60,23,"exit") then system
if k$=chr$(27) then done=-1
_limit 30
_display
loop
end sub