GlyphInfo type. Some new text and core functions.
This commit is contained in:
@@ -136,5 +136,5 @@ function RL.draw()
|
||||
|
||||
camera:endMode3D()
|
||||
|
||||
RL.DrawText( RL.GetFontDefault(), "Use keys [Y][R][G][B] to toggle lights", { 10, 10 }, 20, 4, RL.DARKGRAY )
|
||||
RL.DrawText( "Use keys [Y][R][G][B] to toggle lights", { 10, 10 }, 20, RL.DARKGRAY )
|
||||
end
|
||||
|
||||
@@ -83,7 +83,7 @@ function RL.draw()
|
||||
end
|
||||
|
||||
RL.DrawRectangle( { 0, 0, screenWidth, 40 }, RL.BLACK)
|
||||
RL.DrawText( RL.GetFontDefault(), "bunnies: " .. #bunnies, { 120, 10 }, 20, 2, RL.GREEN )
|
||||
RL.DrawText( RL.GetFontDefault(), "batched draw calls: " .. math.ceil( 1 + #bunnies / MAX_BATCH_ELEMENTS ), { 320, 10 }, 20, 2, RL.RED )
|
||||
RL.DrawText( "bunnies: " .. #bunnies, { 120, 10 }, 20, RL.GREEN )
|
||||
RL.DrawText( "batched draw calls: " .. math.ceil( 1 + #bunnies / MAX_BATCH_ELEMENTS ), { 320, 10 }, 20, RL.RED )
|
||||
RL.DrawFPS( { 10, 10 } )
|
||||
end
|
||||
|
||||
@@ -100,5 +100,5 @@ function RL.draw()
|
||||
RL.ClearBackground( RL.RED )
|
||||
end
|
||||
|
||||
RL.DrawText( RL.GetFontDefault(), text, textPos, 20, 2, RL.BLACK )
|
||||
RL.DrawText( text, textPos, 20, RL.BLACK )
|
||||
end
|
||||
|
||||
@@ -69,5 +69,5 @@ function RL.draw()
|
||||
text = text.."\nPress T to toggle target visible.\nVisible: "..tostring( targetVisible )
|
||||
|
||||
-- RL.DrawText( RL.defaultFont, text, { 16, 16 }, 30, 4, RL.WHITE )
|
||||
RL.DrawText( RL.GetFontDefault(), text, { 16, 16 }, 30, 4, RL.WHITE )
|
||||
RL.DrawText( text, { 16, 16 }, 30, RL.WHITE )
|
||||
end
|
||||
|
||||
@@ -80,10 +80,10 @@ function RL.draw()
|
||||
RL.DrawModelEx( model, { 0, 0, 0 }, { 1.0, 0.0, 0.0 }, -90.0, { 1.0, 1.0, 1.0 }, RL.WHITE )
|
||||
RL.EndMode3D()
|
||||
|
||||
RL.DrawText( RL.GetFontDefault(),
|
||||
RL.DrawText(
|
||||
"Enter: Change animation\
|
||||
Space: Play animation\
|
||||
Up arrow: Inreace animation speed\
|
||||
Down arrow: Decreace animation speed",
|
||||
{ 10, 10 }, 30, 5, RL.WHITE )
|
||||
{ 10, 10 }, 30, RL.WHITE )
|
||||
end
|
||||
|
||||
@@ -126,7 +126,7 @@ function RL.draw()
|
||||
RL.DrawCircle( ball.pos, ball.radius, RL.WHITE )
|
||||
|
||||
-- Draw score.
|
||||
RL.DrawText( RL.GetFontDefault(), tostring( playerLeft.score ), { 50, 10 }, 40, 2, RL.WHITE )
|
||||
RL.DrawText( tostring( playerLeft.score ), { 50, 10 }, 40, RL.WHITE )
|
||||
local rightTextSize = Vec2:new( RL.MeasureText( RL.GetFontDefault(), tostring( playerRight.score ), 40, 2 ) )
|
||||
RL.DrawText( RL.GetFontDefault(), tostring( playerRight.score ), { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE )
|
||||
RL.DrawText( tostring( playerRight.score ), { winSize.x - 50 - rightTextSize.x, 10 }, 40, RL.WHITE )
|
||||
end
|
||||
|
||||
@@ -131,7 +131,7 @@ function utillib.toBoolean( v )
|
||||
return false
|
||||
end
|
||||
|
||||
function utillib.boo2Number( bool )
|
||||
function utillib.bool2Number( bool )
|
||||
return bool and 1 or 0
|
||||
end
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ function RL.draw()
|
||||
drawApple()
|
||||
|
||||
if gameState == STATE.OVER then
|
||||
RL.DrawText( RL.GetFontDefault(), "Press Enter to\nrestart", { 10, 10 }, 10, 2, RL.WHITE )
|
||||
RL.DrawText( "Press Enter to\nrestart", { 10, 10 }, 10, RL.WHITE )
|
||||
end
|
||||
RL.EndTextureMode()
|
||||
|
||||
|
||||
@@ -24,5 +24,5 @@ end
|
||||
|
||||
function RL.draw()
|
||||
RL.ClearBackground( RL.RAYWHITE )
|
||||
RL.DrawText( RL.GetFontDefault(), text, textPos, 20, 2, textColor )
|
||||
RL.DrawText( text, textPos, 20, textColor )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user