examples: improve i18n and fix KeyPress events

This commit is contained in:
glixx 2019-05-22 05:43:29 +03:00
parent d7fc8cb660
commit fe0b864739
5 changed files with 21 additions and 20 deletions

View file

@ -178,7 +178,7 @@ Public Sub dwgFractal_MouseMove()
End
Public Sub dwgFractal_KeyPress()
Public Sub Form_KeyPress()
If UCase(Key.Text) = "F" Then
$bFast = Not $bFast

View file

@ -119,7 +119,7 @@ End
Public Sub Form_Open()
cb.Add("ALL")
cb.Add(("ALL"))
End
Public Sub Button1_Click()
@ -183,7 +183,7 @@ Public Sub cmdRandomize_Click()
index = index + 1
Draw.Foreground = myBall.col
Draw.Ellipse(myBall.x, myBall.y, 5, 5)
If Str(index) = cB.Text Or cB.Text = "ALL" Then
If Str(index) = cB.Text Or cB.Text = ("ALL") Then
myBall.ax = Rnd(1, 100)
myBall.ay = Rnd(1, 100)
End If

View file

@ -1,4 +1,5 @@
' Gambas class file
Public NKIs As Object[]
Public Robot As Object
Public OrigHeight As Integer
@ -22,7 +23,7 @@ Public Sub Timer1_Timer()
End If
End
Public Sub TextLabel1_KeyPress()
Public Sub Form_KeyPress()
Dim i As Integer

View file

@ -43,7 +43,7 @@ Public Sub Form_Open()
UpdateScoreBoard
Play("start.wav")
Me.Text = ("Snake") & " v1.0"
Me.Text = ("Snake") & " " & ("v1.0")
hPictHead = Picture.Load("head.png")
' ME.Icon = hPictHead 'The same as head icon but in a standard size

View file

@ -3,21 +3,21 @@
Private $sExec As String
Private $aTutorial As String[][] = [
[("Example1"), ("1 - Setting Up An OpenGL Window")],
[("Example2"), ("2 - Your First Polygon")],
[("Example3"), ("3 - Adding Color")],
[("Example4"), ("4 - Rotation")],
[("Example5"), ("5 - 3D Shapes")],
[("Example6"), ("6 - Texture Mapping")],
[("Example7"), ("7 - Texture Filters, Lighting & Keyboard Control")],
[("Example8"), ("8 - Blending")],
[("Example9"), ("9 - Moving Bitmaps In 3D Space")],
[("Example10"), ("10 - Loading And Moving Through A 3D World")],
[("Example11"), ("11 - Flag Effect (Waving Texture)")],
[("Example16"), ("16 - Cool Looking Fog")],
[("Example19"), ("19 - Particle Engine")],
[("Example25"), ("25 - Morphing & Loading Objects From A File")],
[("Example42"), ("42 - Multiple Viewports")]]
["Example1", ("1 - Setting Up An OpenGL Window")],
["Example2", ("2 - Your First Polygon")],
["Example3", ("3 - Adding Color")],
["Example4", ("4 - Rotation")],
["Example5", ("5 - 3D Shapes")],
["Example6", ("6 - Texture Mapping")],
["Example7", ("7 - Texture Filters, Lighting & Keyboard Control")],
["Example8", ("8 - Blending")],
["Example9", ("9 - Moving Bitmaps In 3D Space")],
["Example10", ("10 - Loading And Moving Through A 3D World")],
["Example11", ("11 - Flag Effect (Waving Texture)")],
["Example16", ("16 - Cool Looking Fog")],
["Example19", ("19 - Particle Engine")],
["Example25", ("25 - Morphing & Loading Objects From A File")],
["Example42", ("42 - Multiple Viewports")]]
Public Sub Form_Open()