From e8f1df159a9314c81b704ebe4c8186c7f88ce000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 11 Oct 2014 13:37:48 +0000 Subject: [PATCH] [EXAMPLES] * NEW: BeastScroll: Use the new default font scaling support. git-svn-id: svn://localhost/gambas/trunk@6531 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- examples/examples/Games/BeastScroll/.project | 4 ++-- .../Games/BeastScroll/.src/MMain.module | 18 +++++++++++++----- examples/examples/OpenGL/Md2Model/.project | 4 ++-- .../examples/OpenGL/Md2Model/.src/FMain.form | 2 ++ examples/examples/OpenGL/Md2Model/.startup | 2 +- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/examples/examples/Games/BeastScroll/.project b/examples/examples/Games/BeastScroll/.project index ef0505784..25e446337 100644 --- a/examples/examples/Games/BeastScroll/.project +++ b/examples/examples/Games/BeastScroll/.project @@ -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 diff --git a/examples/examples/Games/BeastScroll/.src/MMain.module b/examples/examples/Games/BeastScroll/.src/MMain.module index fbff16af5..01fa7866c 100644 --- a/examples/examples/Games/BeastScroll/.src/MMain.module +++ b/examples/examples/Games/BeastScroll/.src/MMain.module @@ -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 diff --git a/examples/examples/OpenGL/Md2Model/.project b/examples/examples/OpenGL/Md2Model/.project index 504416c1a..f8f2f35d2 100644 --- a/examples/examples/OpenGL/Md2Model/.project +++ b/examples/examples/OpenGL/Md2Model/.project @@ -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 diff --git a/examples/examples/OpenGL/Md2Model/.src/FMain.form b/examples/examples/OpenGL/Md2Model/.src/FMain.form index 7d1fee80a..6ca8c3514 100644 --- a/examples/examples/OpenGL/Md2Model/.src/FMain.form +++ b/examples/examples/OpenGL/Md2Model/.src/FMain.form @@ -15,6 +15,8 @@ } { lblInfo Label MoveScaled(64,0,18,4) + Padding = 4 + AutoResize = True } } { timAnim #Timer diff --git a/examples/examples/OpenGL/Md2Model/.startup b/examples/examples/OpenGL/Md2Model/.startup index 1049d728d..25ceb9d65 100644 --- a/examples/examples/OpenGL/Md2Model/.startup +++ b/examples/examples/OpenGL/Md2Model/.startup @@ -2,7 +2,7 @@ FMain Md2Model example 0 0 -3.5.90 +3.6.0 gb.image gb.gui