From d74a505d406faf276a265beaf8925d6e8ff9cec0 Mon Sep 17 00:00:00 2001 From: jussi Date: Fri, 3 Nov 2023 23:12:55 +0200 Subject: Compress/decompress and Encode/Decode DataBase64. --- examples/resources/lib/gui.lua | 8 ++++++++ examples/resources/lib/utillib.lua | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'examples/resources/lib') diff --git a/examples/resources/lib/gui.lua b/examples/resources/lib/gui.lua index 996001c..4e3b744 100644 --- a/examples/resources/lib/gui.lua +++ b/examples/resources/lib/gui.lua @@ -822,6 +822,14 @@ function Container:delete() Gui.delete( self ) end +function Container:clear() + for _, cell in ipairs( self.cells ) do + cell:delete() + end + + self.cells = {} +end + function Container:set2Top() Gui.set2Top( self ) diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua index 94e33f9..899f899 100644 --- a/examples/resources/lib/utillib.lua +++ b/examples/resources/lib/utillib.lua @@ -146,6 +146,13 @@ function utillib.printt( t ) print( "}" ) end +function utillib.colorLerp( a, b, f ) + return { + utillib.round( utillib.lerp( a[1], b[1], f ) ), + utillib.round( utillib.lerp( a[2], b[2], f ) ), + utillib.round( utillib.lerp( a[3], b[3], f ) ) } +end + -- Move secuence of elements inside table. function utillib.tableMove( t, src, len, dest ) local copy = table.move( t, src, src + len - 1, 1, {} ) -- cgit v1.2.3