mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 11:59:34 +00:00
Simplifies the selection of the built-in VGA font.
This commit is contained in:
parent
2a0d81eb37
commit
eb106a33f5
1 changed files with 20 additions and 17 deletions
|
@ -1177,7 +1177,12 @@ SUB SelectFontInList (FontSetup$)
|
||||||
thisFile$ = UCASE$(LEFT$(FontSetup$, INSTR(FontSetup$, ",") - 1))
|
thisFile$ = UCASE$(LEFT$(FontSetup$, INSTR(FontSetup$, ",") - 1))
|
||||||
thisSize% = VAL(MID$(FontSetup$, INSTR(FontSetup$, ",") + 1))
|
thisSize% = VAL(MID$(FontSetup$, INSTR(FontSetup$, ",") + 1))
|
||||||
|
|
||||||
Control(FontSizeList).Value = thisSize% - 7
|
ResetList FontSizeList
|
||||||
|
FOR i = 8 TO 120
|
||||||
|
AddItem FontSizeList, LTRIM$(STR$(i))
|
||||||
|
NEXT
|
||||||
|
i = SelectItem(FontSizeList, LTRIM$(STR$(thisSize%)))
|
||||||
|
|
||||||
IF LEN(thisFile$) > 0 THEN
|
IF LEN(thisFile$) > 0 THEN
|
||||||
FOR i = 1 TO UBOUND(FontFile)
|
FOR i = 1 TO UBOUND(FontFile)
|
||||||
IF UCASE$(RIGHT$(FontFile(i), LEN(thisFile$))) = thisFile$ THEN
|
IF UCASE$(RIGHT$(FontFile(i), LEN(thisFile$))) = thisFile$ THEN
|
||||||
|
@ -1188,13 +1193,16 @@ SUB SelectFontInList (FontSetup$)
|
||||||
END IF
|
END IF
|
||||||
NEXT
|
NEXT
|
||||||
ELSE
|
ELSE
|
||||||
IF thisSize% = 8 OR thisSize% = 16 THEN
|
IF thisSize% > 8 THEN thisSize% = 16 ELSE thisSize% = 8
|
||||||
i = SelectItem(FontList, "Built-in _FONT" + STR$(thisSize%))
|
ResetList FontSizeList
|
||||||
|
AddItem FontSizeList, "8"
|
||||||
|
AddItem FontSizeList, "16"
|
||||||
|
i = SelectItem(FontSizeList, LTRIM$(STR$(thisSize%)))
|
||||||
|
Control(FontList).Value = 1 'Built-in VGA font
|
||||||
BypassShowFontList = False
|
BypassShowFontList = False
|
||||||
AttemptToShowFontList = False
|
AttemptToShowFontList = False
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
END IF
|
END IF
|
||||||
END IF
|
|
||||||
|
|
||||||
'If this line is reached, the currently open form
|
'If this line is reached, the currently open form
|
||||||
'uses a non-system font. In that case we must
|
'uses a non-system font. In that case we must
|
||||||
|
@ -3500,11 +3508,7 @@ SUB __UI_ValueChanged (id AS LONG)
|
||||||
END IF
|
END IF
|
||||||
SendData b$, 41
|
SendData b$, 41
|
||||||
CASE FontList, FontSizeList
|
CASE FontList, FontSizeList
|
||||||
IF id = FontList AND Control(FontList).Value < 3 THEN
|
b$ = FontFile(Control(FontList).Value) + "," + GetItem$(FontSizeList, Control(FontSizeList).Value)
|
||||||
'First item is _FONT 8, second item is _FONT 16
|
|
||||||
Control(FontSizeList).Value = (Control(FontList).Value * 8) - 7
|
|
||||||
END IF
|
|
||||||
b$ = FontFile(Control(FontList).Value) + "," + LTRIM$(STR$(Control(FontSizeList).Value + 7))
|
|
||||||
b$ = MKL$(LEN(b$)) + b$
|
b$ = MKL$(LEN(b$)) + b$
|
||||||
SendData b$, 8
|
SendData b$, 8
|
||||||
PropertySent = True
|
PropertySent = True
|
||||||
|
@ -4744,9 +4748,8 @@ $IF WIN THEN
|
||||||
bData = SPACE$(&H7FFF) 'arbitrary
|
bData = SPACE$(&H7FFF) 'arbitrary
|
||||||
|
|
||||||
HasFontList = True
|
HasFontList = True
|
||||||
AddItem FontList, "Built-in _FONT 8"
|
AddItem FontList, "Built-in VGA font"
|
||||||
AddItem FontList, "Built-in _FONT 16"
|
TotalFontsFound = 1
|
||||||
TotalFontsFound = 2
|
|
||||||
|
|
||||||
l = RegOpenKeyExA(Ky, _OFFSET(SubKey), 0, KEY_READ, _OFFSET(hKey))
|
l = RegOpenKeyExA(Ky, _OFFSET(SubKey), 0, KEY_READ, _OFFSET(hKey))
|
||||||
IF l THEN
|
IF l THEN
|
||||||
|
@ -4873,8 +4876,8 @@ $ELSE
|
||||||
END IF
|
END IF
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
TotalFontsFound = TotalFontsFound + 2
|
TotalFontsFound = TotalFontsFound + 1
|
||||||
Text(FontList) = "Built-in _FONT 8" + CHR$(10) + "Built-in _FONT 16" + CHR$(10) + Text(FontList)
|
Text(FontList) = "Built-in VGA font" + CHR$(10) + Text(FontList)
|
||||||
Control(FontList).Max = TotalFontsFound
|
Control(FontList).Max = TotalFontsFound
|
||||||
|
|
||||||
REDIM FontFile(TotalFontsFound) AS STRING
|
REDIM FontFile(TotalFontsFound) AS STRING
|
||||||
|
|
Loading…
Reference in a new issue