enl%
= 13:
CALL windowscreen
(enl%
)
button$(1) = "Yes": button$(2) = "No!"
button$(3) = "Retry": button$(4) = "Cancel"
operation$ = "save"
doctype$ = "text"
drive$ = "": dir$ = ""
illegal_file_symbols$
= "/\:*?<>|" + CHR$(34)ifs$ = illegal_file_symbols$
' Determine if there is a drive and/or directory in input.
flag% = 1
flag% = 2
flag% = 4
IF doctype$
= "text" THEN ' Check for text extension.
' Okay to save.
' Illegal symbols in file name.
PRINT "Illegal file name." msg$ = "File Already Exists. Overwrite?"
button% = 2: button_index% = 0
_DELAY .75:
CALL popup
(msg$
, msg%
, button$
(), button%
, button_index%
)
SUB popup
(msg$
, msg%
, button$
(), button%
, button_index%
) IF W3%
= 0 THEN W3%
= 5 ' Min.
' Auto-Center
W2%
= _WIDTH \
2 - W4% \
2 + .5
oldsmode
= smode:
PCOPY 0, 1:
SCREEN 0, 0, 1, 1: smode
= 1
LOCATE W1%
, W2%
, 0 ' Cursor hide A$ = ""
LOCATE W1%
+ 1, W2%
+ W4% \
2 - LEN(msg$
) \
2 LOCATE W1%
+ W3% \
2 - 1, W2%
+ W4% \
2 - LEN(msg$
) \
2 j% = 0
j%
= j%
+ LEN(button$
(button_index%
+ i%
)) + 2 LOCATE W1%
+ W3% \
2 + 1, W2%
+ W4% \
2 - j% \
2 - 1 mouselocator$
= STRING$(_WIDTH, "0"): mouselocator%
= W1%
+ W3% \
2 + 1 k% = 0
FOR i%
= button_index%
+ 1 TO button_index%
+ button%
k% = k% + 1
LOCATE W1%
+ W3% \
2 + 1, W2%
+ W4% \
2 - j% \
2 k% = 0
FOR i%
= button_index%
+ 1 TO button_index%
+ button%
PRINT button$
(button_index%
+ i%
);
k% = k% + 1
tabx% = 0
CALL user
(b$
, mx%
, my%
, alt%
, altoff%
, shift%
, ctrl%
, ctrlshift%
)
action$ = "yes"
action$ = "no"
action$ = "close"
IF bhl%
THEN IF bhl%
= 1 AND my%
<> mouselocator%
OR bhl%
= 1 AND MID$(mouselocator$
, mx%
, 1) = "0" THEN tabx%
= 0: bhl%
= 0 IF b$
= CHR$(9) THEN k%
= tabx%: bhl%
= 9 ELSE k%
= VAL(MID$(mouselocator$
, mx%
, 1)): tabx%
= k%: bhl%
= 1
h% = k%: tabx% = h%
h% = 0: tabx% = 0
IF closex%
THEN SOUND 1000, .1: closex%
= 0: action$
= "close" IF my%
= mouselocator%
AND MID$(mouselocator$
, mx%
, 1) <> "0" THEN action$ = "yes"
action$ = "no"
oldmy% = my%: oldmx% = mx%
smode
= oldsmode:
SCREEN 0, 0, smode
, smode
LOCATE W1%
+ W3% \
2, W2%
+ W4% \
2 - LEN(msg$
) \
2
SUB user
(b$
, mx%
, my%
, alt%
, altoff%
, shift%
, ctrl%
, ctrlshift%
)
alt% = -1
IF alt%
THEN altoff%
= -1: alt%
= 0 ELSE altoff%
= 0: alt%
= 0
mb.w = 0
winmode$ = "2"
SCRNSIZE% = SCRNSIZE% + ENL%
style$ = "MONOSPACE"
fontsize% = SCRNSIZE% + 13
IF fontsize%
< 14 THEN winmode$
= "" IF fontsize%
< 18 THEN style$
= style$
+ ", BOLD" fontpath$
= ENVIRON$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
nofull:
ChangeFont:
_FONT 16 'select inbuilt 8x16 default font currentf&
= _LOADFONT(fontpath$
, fontsize%
, style$
)
f& = currentf&