If it'z purdy youz wantz, it'z purdy youze getz!
One question. Now with the transparent black background needed, is there anyway to keep this effect with a different color background?
Pete
Code: (Select All)
Screen 0, 0, 0, 0
Width 50, 30
Palette 5, 63
Palette 6, 56
_PaletteColor 0, _RGBA32(0, 0, 0, 0)
Cls
_Delay .1
_ScreenMove 0, 0
enl% = 5: Call font_size_setup(enl%)
_DisplayOrder _Hardware , _Software
_Display ' Turn autodisplay off.
Overlay = _NewImage(_Width * _FontWidth, _Height * _FontHeight, 32)
x% = 5 * 16: y% = 3 * 8
img& = _LoadImage("form.png", 32)
Do
_Limit 30
b$ = InKey$
If Len(b$) Then
Exit Do
End If
_Dest Overlay
_PutImage (x%, y%), img&
Overlay_Hardware = _CopyImage(Overlay, 33)
_PutImage (0, 0), Overlay_Hardware
_FreeImage Overlay_Hardware
_Dest 0
Color 6, 5
Locate 14, 16
Print "Yosemite Sam";
Locate 18, 16, 1, 7, 7
Print "sayyurprayersvarmint";
_Display
Loop
Color 0, 0: Cls
Sub font_size_setup (enl%)
If displayfullscreen% = -1 Then Exit Sub
WINXX1% = CsrLin: WINYY1% = Pos(1)
winmode$ = "2"
If enl% <> 0 Then
full = _FullScreen
If full = 0 Then
Select Case enl%
Case -1: If SCRNSIZE% > 0 Then Else Exit Sub
Case 1: If SCRNSIZE% < 14 Then Else Exit Sub
End Select
Else
Exit Sub
End If
End If
SCRNSIZE% = SCRNSIZE% + enl%
Select Case winmode$
Case "1"
full = _FullScreen
If full <> 0 Then _FullScreen _Off
GoSub ChangeFont
Case "2"
full = _FullScreen
If full <> 0 Then _FullScreen _Off
style$ = "MONOSPACE"
fontsize% = SCRNSIZE% + 13
If fontsize% < 14 Then winmode$ = ""
If fontsize% < 28 Then style$ = style$ + ", BOLD"
fontpath$ = Environ$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
GoSub ChangeFont
Case "3"
GoSub ChangeFont
_FullScreen _SquarePixels
full = _FullScreen
If full = 0 Then GoSub nofull
Case "4"
GoSub ChangeFont
_FullScreen _Stretch
full = _FullScreen
If full = 0 Then GoSub nofull
End Select
Locate WINXX1%, WINYY1%
Exit Sub
nofull:
_FullScreen _Off
Return
ChangeFont:
If winmode$ <> "2" Then
_Font 16 ' Inbuilt 8x16 default font.
currentf& = _Font
Else
currentf& = _LoadFont(fontpath$, fontsize%, style$)
_Font currentf&
End If
If currentf& <> f& And f& <> defaultf& Then _FreeFont f&
f& = currentf&
Return
End Sub
One question. Now with the transparent black background needed, is there anyway to keep this effect with a different color background?
Pete