[EXAMPLES]

* NEW: BeastScroll: Use the new default font scaling support.


git-svn-id: svn://localhost/gambas/trunk@6531 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-10-11 13:37:48 +00:00
parent df90f6582b
commit e8f1df159a
5 changed files with 20 additions and 10 deletions

View File

@ -1,9 +1,9 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.5.90
# Compiled with Gambas 3.6.0
Title=BeastScroll
Startup=MMain
Icon=logo.png
Version=3.5.90
Version=3.6.0
VersionFile=1
Component=gb.image
Component=gb.image.io

View File

@ -68,7 +68,7 @@ Public Sub Main()
End
Private Sub DrawText(sText As String, X As Integer, Y As Integer)
Private Sub DrawText(sText As String, X As Integer, Y As Integer) As Integer
Dim I As Integer
Dim J As Integer
@ -82,6 +82,8 @@ Private Sub DrawText(sText As String, X As Integer, Y As Integer)
Draw.Foreground = Color.White
Draw.Text(sText, X, Y)
Return Y + Draw.Font.Height(" ") + 4
End
Public Sub Screen_Draw()
@ -93,6 +95,8 @@ Public Sub Screen_Draw()
'Screen.Clear
'Goto PRINT_TEXT
Dim Y As Integer
scroll = scroll + speed
Dec (scroll1)
scroll2 = scroll2 - 2
@ -173,10 +177,14 @@ Public Sub Screen_Draw()
PRINT_TEXT:
Print Screen.Framerate; " FPS\r";
DrawText(Screen.Framerate & " FPS", 10, 16)
DrawText("[F1] Toggle fullscreen", 10, 32)
DrawText("[F5] Take screenshot to ~/BeastScroll.png", 10, 48)
DrawText("[ESC] Quit", 10, 64)
Y = 10
Draw.Font.Size = Font.DefaultFontSize * 2
Y = DrawText(Screen.Framerate & " FPS", 10, Y)
Draw.Font.Size = Font.DefaultFontSize
Y = DrawText("[F1] Toggle fullscreen", 10, Y)
Y = DrawText("[F5] Take screenshot to ~/BeastScroll.png", 10, Y)
Y = DrawText("[ESC] Quit", 10, Y)
End

View File

@ -1,9 +1,9 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.5.90
# Compiled with Gambas 3.6.0
Title=Md2Model example
Startup=FMain
Icon=icon.png
Version=3.5.90
Version=3.6.0
VersionFile=1
Component=gb.image
Component=gb.gui

View File

@ -15,6 +15,8 @@
}
{ lblInfo Label
MoveScaled(64,0,18,4)
Padding = 4
AutoResize = True
}
}
{ timAnim #Timer

View File

@ -2,7 +2,7 @@ FMain
Md2Model example
0
0
3.5.90
3.6.0
gb.image
gb.gui