mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-16 19:04:45 +00:00
Some error handling
- fixed/added custom font error checking on IDE startup and in Options>Display... dialog - added new settings folder to .gitignore list
This commit is contained in:
parent
3d311bd52f
commit
9487cfedf5
3 changed files with 10 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,5 +17,6 @@ mingw32.exe
|
||||||
mingw64.exe
|
mingw64.exe
|
||||||
.vscode
|
.vscode
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
settings
|
||||||
source/qb64pe_start.command
|
source/qb64pe_start.command
|
||||||
.fake
|
.fake
|
||||||
|
|
|
@ -195,9 +195,12 @@ FUNCTION ide2 (ignore)
|
||||||
|
|
||||||
IF idecustomfont THEN
|
IF idecustomfont THEN
|
||||||
idecustomfonthandle = _LOADFONT(idecustomfontfile$, idecustomfontheight, "MONOSPACE")
|
idecustomfonthandle = _LOADFONT(idecustomfontfile$, idecustomfontheight, "MONOSPACE")
|
||||||
IF idecustomfonthandle = -1 THEN
|
IF idecustomfonthandle < 1 THEN
|
||||||
'failed! - revert to default settings
|
retval = idemessagebox("Custom font not found!", "Your desired font was not found at the specified location, or is\nof unsupported format. Reverting back to default built-in font.", "#OK")
|
||||||
idecustomfont = 0: idecustomfontfile$ = "C:\Windows\Fonts\lucon.ttf": idecustomfontheight = 21
|
idecustomfont = 0: idecustomfontfile$ = "C:\Windows\Fonts\lucon.ttf": idecustomfontheight = 21
|
||||||
|
WriteConfigSetting displaySettingsSection$, "IDE_CustomFont", BoolToTFString$(idecustomfont)
|
||||||
|
WriteConfigSetting displaySettingsSection$, "IDE_CustomFont$", idecustomfontfile$
|
||||||
|
WriteConfigSetting displaySettingsSection$, "IDE_CustomFontSize", STR$(idecustomfontheight)
|
||||||
ELSE
|
ELSE
|
||||||
_FONT idecustomfonthandle
|
_FONT idecustomfonthandle
|
||||||
END IF
|
END IF
|
||||||
|
@ -16384,7 +16387,7 @@ FUNCTION idedisplaybox
|
||||||
IF o(7).sel <> idecustomfont THEN
|
IF o(7).sel <> idecustomfont THEN
|
||||||
IF o(7).sel = 0 THEN
|
IF o(7).sel = 0 THEN
|
||||||
IF IDE_UseFont8 THEN _FONT 8 ELSE _FONT 16
|
IF IDE_UseFont8 THEN _FONT 8 ELSE _FONT 16
|
||||||
_FREEFONT idecustomfonthandle
|
IF idecustomfonthandle > 0 THEN _FREEFONT idecustomfonthandle
|
||||||
ELSE
|
ELSE
|
||||||
x = 1
|
x = 1
|
||||||
END IF
|
END IF
|
||||||
|
@ -16397,9 +16400,8 @@ FUNCTION idedisplaybox
|
||||||
oldhandle = idecustomfonthandle
|
oldhandle = idecustomfonthandle
|
||||||
idecustomfonthandle = _LOADFONT(v$, v%, "MONOSPACE")
|
idecustomfonthandle = _LOADFONT(v$, v%, "MONOSPACE")
|
||||||
IF idecustomfonthandle < 1 THEN
|
IF idecustomfonthandle < 1 THEN
|
||||||
'failed! - revert to default settings
|
retval = idemessagebox("Custom font not found!", "Your desired font was not found at the specified location,\nor is of unsupported format. Please check your inputs.", "#OK")
|
||||||
_MessageBox "Font not found!", "ERROR: Font not found, or is invalid format, at specified location. Reverting back to existing font.", "error"
|
PCOPY 2, 1: _CONTINUE
|
||||||
o(7).sel = 0: idetxt(o(8).txt) = "C:\Windows\Fonts\lucon.ttf": idetxt(o(9).txt) = "21": IF IDE_UseFont8 THEN _FONT 8 ELSE _FONT 16
|
|
||||||
ELSE
|
ELSE
|
||||||
_FONT idecustomfonthandle
|
_FONT idecustomfonthandle
|
||||||
END IF
|
END IF
|
||||||
|
|
|
@ -1385,7 +1385,7 @@ id.args = 4
|
||||||
id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
|
id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
|
||||||
id.specialformat = "?,?[,[?][,[?]]]"
|
id.specialformat = "?,?[,[?][,[?]]]"
|
||||||
id.ret = LONGTYPE - ISPOINTER
|
id.ret = LONGTYPE - ISPOINTER
|
||||||
id.hr_syntax = "_LOADFONT(fileName$, size&[, " + CHR$(34) + "{MONOSPACE|, UNICODE|, DONTBLEND|, MEMORY}" + CHR$(34) + "][, fontIndex])"
|
id.hr_syntax = "_LOADFONT(fileName$, size&[, " + CHR$(34) + "{MONOSPACE|, UNICODE|, DONTBLEND|, MEMORY|, AUTOMONO}" + CHR$(34) + "][, fontIndex])"
|
||||||
regid
|
regid
|
||||||
|
|
||||||
clearid
|
clearid
|
||||||
|
|
Loading…
Reference in a new issue