diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/raygui_extensions/property_list.lua | 2 | ||||
| -rw-r--r-- | examples/raygui_lib/main.lua | 4 | ||||
| -rw-r--r-- | examples/rlgl_hello_triangle/main.lua | 19 |
3 files changed, 13 insertions, 12 deletions
diff --git a/examples/raygui_extensions/property_list.lua b/examples/raygui_extensions/property_list.lua index 46cff6e..c65e598 100644 --- a/examples/raygui_extensions/property_list.lua +++ b/examples/raygui_extensions/property_list.lua @@ -75,7 +75,7 @@ function PropertyList:updateControl( control ) if type( control._controls ) == "table" then for _, groupControl in ipairs( control._controls ) do - groupControl.visible = control.active + groupControl.visible = control.active and control.visible -- Deactivate any subgroups. if not control.active and type( groupControl._controls ) == "table" then groupControl.active = false diff --git a/examples/raygui_lib/main.lua b/examples/raygui_lib/main.lua index 95f6a6c..bf7da18 100644 --- a/examples/raygui_lib/main.lua +++ b/examples/raygui_lib/main.lua @@ -115,8 +115,8 @@ function RL.init() Rect:new( 464, 256, 128, 32 ), "Health", 0, - 0, - 10, + -100, + 100, false, { -- Callbacks. edit = function( self ) print( "Spinner value changed to "..self.value ) end diff --git a/examples/rlgl_hello_triangle/main.lua b/examples/rlgl_hello_triangle/main.lua index b9ebf9f..1a0baca 100644 --- a/examples/rlgl_hello_triangle/main.lua +++ b/examples/rlgl_hello_triangle/main.lua @@ -1,18 +1,19 @@ package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" Util = require( "utillib" ) -Vec2 = require( "vector2" ) +Vector2 = require( "vector2" ) -local res = Vec2:new( 1024, 720 ) +local res = Vector2:new( 1024, 720 ) local winScale = 1 local winSize = res:scale( winScale ) local monitor = 0 +local null = RL.LoadBuffer( {}, RL.BUFFER_UNSIGNED_CHAR ); local triangle = { texture = { id = -1, data = nil, - size = Vec2:new( 0, 0 ), + size = Vector2:new( 0, 0 ), mipmaps = 0, format = 0, }, @@ -60,7 +61,7 @@ local function loadTexture( path ) local image = RL.LoadImage( path ) triangle.texture.data = RL.GetImageData( image ) - triangle.texture.size = Vec2:newT( RL.GetImageSize( image ) ) + triangle.texture.size = Vector2:newT( RL.GetImageSize( image ) ) triangle.texture.format = RL.GetImageFormat( image ) triangle.texture.mipmaps = RL.GetImageMipmaps( image ) @@ -96,7 +97,7 @@ local function createTriangle() RL.BUFFER_FLOAT ) triangle.vbos.positions = RL.rlLoadVertexBuffer( vertexBuffer, false ) - RL.rlSetVertexAttribute( 0, 3, RL.RL_FLOAT, false, 0, 0 ) + RL.rlSetVertexAttribute( 0, 3, RL.RL_FLOAT, false, 0, null ) RL.rlEnableVertexAttribute( 0 ) -- Colors. @@ -109,7 +110,7 @@ local function createTriangle() RL.BUFFER_FLOAT ) triangle.vbos.colors = RL.rlLoadVertexBuffer( colors, false ) - RL.rlSetVertexAttribute( 1, 4, RL.RL_FLOAT, false, 0, 0 ) + RL.rlSetVertexAttribute( 1, 4, RL.RL_FLOAT, false, 0, null ) RL.rlEnableVertexAttribute( 1 ) -- Texcoords. @@ -122,7 +123,7 @@ local function createTriangle() RL.BUFFER_FLOAT ) triangle.vbos.texcoors = RL.rlLoadVertexBuffer( texcoors, false ) - RL.rlSetVertexAttribute( 2, 2, RL.RL_FLOAT, false, 0, 0 ) + RL.rlSetVertexAttribute( 2, 2, RL.RL_FLOAT, false, 0, null ) RL.rlEnableVertexAttribute( 2 ) -- Disable. @@ -131,8 +132,8 @@ local function createTriangle() end function RL.init() - local monitorPos = Vec2:newT( RL.GetMonitorPosition( monitor ) ) - local monitorSize = Vec2:newT( RL.GetMonitorSize( monitor ) ) + local monitorPos = Vector2:newT( RL.GetMonitorPosition( monitor ) ) + local monitorSize = Vector2:newT( RL.GetMonitorSize( monitor ) ) RL.SetWindowTitle( "RLGL Hello Triangle" ) RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) |
