summaryrefslogtreecommitdiff
path: root/examples/resources
diff options
context:
space:
mode:
Diffstat (limited to 'examples/resources')
-rwxr-xr-xexamples/resources/clib/rllib.sobin0 -> 15576 bytes
-rwxr-xr-xexamples/resources/clib/sampleclib.sobin0 -> 15336 bytes
-rw-r--r--examples/resources/lib/gui.lua12
-rw-r--r--examples/resources/lib/rectangle.lua2
-rw-r--r--examples/resources/lib/utillib.lua3
5 files changed, 11 insertions, 6 deletions
diff --git a/examples/resources/clib/rllib.so b/examples/resources/clib/rllib.so
new file mode 100755
index 0000000..6368e17
--- /dev/null
+++ b/examples/resources/clib/rllib.so
Binary files differ
diff --git a/examples/resources/clib/sampleclib.so b/examples/resources/clib/sampleclib.so
new file mode 100755
index 0000000..b232cc9
--- /dev/null
+++ b/examples/resources/clib/sampleclib.so
Binary files differ
diff --git a/examples/resources/lib/gui.lua b/examples/resources/lib/gui.lua
index 8335247..8bec529 100644
--- a/examples/resources/lib/gui.lua
+++ b/examples/resources/lib/gui.lua
@@ -1,4 +1,4 @@
-util = require( "utillib" )
+Util = require( "utillib" )
Rect = require( "rectangle" )
Vec2 = require( "vector2" )
Color = require( "color" )
@@ -106,11 +106,11 @@ function Gui.delete( cell )
end
function Gui.set2Top( cell )
- util.tableMove( Gui._cells, Gui.getId( cell ), 1, #Gui._cells )
+ Util.tableMove( Gui._cells, Gui.getId( cell ), 1, #Gui._cells )
end
function Gui.set2Back( cell )
- util.tableMove( Gui._cells, Gui.getId( cell ), 1, 1 )
+ Util.tableMove( Gui._cells, Gui.getId( cell ), 1, 1 )
end
function Gui.process( mousePosition )
@@ -187,7 +187,7 @@ function Gui.process( mousePosition )
if 0 < key then
if key == RL.KEY_BACKSPACE then
- Gui._inputItem.text = util.utf8Sub( Gui._inputItem.text, 0, utf8.len( Gui._inputItem.text ) - 1 )
+ Gui._inputItem.text = Util.utf8Sub( Gui._inputItem.text, 0, utf8.len( Gui._inputItem.text ) - 1 )
elseif key == RL.KEY_ENTER or key == RL.KEY_KP_ENTER then
if Gui._inputItem.allowLineBreak then
Gui._inputItem.text = Gui._inputItem.text.."\n"
@@ -615,8 +615,8 @@ function Container:scroll( pos )
return
end
- self._scrollRect.x = util.clamp( pos.x, 0, self._scrollRect.width - self.bounds.width )
- self._scrollRect.y = util.clamp( pos.y, 0, self._scrollRect.height - self.bounds.height )
+ self._scrollRect.x = Util.clamp( pos.x, 0, self._scrollRect.width - self.bounds.width )
+ self._scrollRect.y = Util.clamp( pos.y, 0, self._scrollRect.height - self.bounds.height )
self:update()
end
diff --git a/examples/resources/lib/rectangle.lua b/examples/resources/lib/rectangle.lua
index 2f9ad6c..3c0adf5 100644
--- a/examples/resources/lib/rectangle.lua
+++ b/examples/resources/lib/rectangle.lua
@@ -1,4 +1,6 @@
Rectangle = {}
+-- Rectangle.TYPE = "Rectangle"
+
Rectangle.meta = {
__index = Rectangle,
__tostring = function( r )
diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua
index 3021465..920ebd7 100644
--- a/examples/resources/lib/utillib.lua
+++ b/examples/resources/lib/utillib.lua
@@ -114,6 +114,9 @@ function utillib.split( str, sep )
for str in string.gmatch( str, "([^"..sep.."]+)" ) do
table.insert( t, str )
end
+ -- for s in string.gmatch( str, "([^"..sep.."]+)" ) do
+ -- table.insert( t, s )
+ -- end
return t
end