summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjussi2024-02-16 17:28:09 +0200
committerjussi2024-02-16 17:28:09 +0200
commitb2b821929505aea2535d38382b743ad5dd5d1fa0 (patch)
tree83c79a9afef9e566325f0d987f167a6d97bb2039 /examples
parent48adbe20dc022d286875408d215ef323c853e6f4 (diff)
downloadreilua-enhanced-b2b821929505aea2535d38382b743ad5dd5d1fa0.tar.gz
reilua-enhanced-b2b821929505aea2535d38382b743ad5dd5d1fa0.tar.bz2
reilua-enhanced-b2b821929505aea2535d38382b743ad5dd5d1fa0.zip
GetBufferData extra arguments. GetBufferElementSize and GetBufferLength.
Diffstat (limited to 'examples')
-rw-r--r--examples/compress_data/main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/compress_data/main.lua b/examples/compress_data/main.lua
index bf6c162..3ee724c 100644
--- a/examples/compress_data/main.lua
+++ b/examples/compress_data/main.lua
@@ -21,7 +21,7 @@ local function compressDecompressData()
deCompressedText = ""
- for _, c in ipairs( RL.GetBufferData( deCompBuffer ) ) do
+ for _, c in ipairs( RL.GetBufferData( deCompBuffer, 0, RL.GetBufferLength( deCompBuffer ) ) ) do
deCompressedText = deCompressedText..string.char( c )
end
end
@@ -30,14 +30,14 @@ function RL.draw()
RL.ClearBackground( RL.RAYWHITE )
RL.DrawText( "Decompressed text: "..deCompressedText, { 20, 200 }, 20, textColor )
- if RL.GuiButton( { 20, 20, 168, 32 }, "Compress/Decompress Data" ) then
+ if 0 < RL.GuiButton( { 20, 20, 168, 32 }, "Compress/Decompress Data" ) then
compressDecompressData()
end
local pressed = false
pressed, text = RL.GuiTextBox( { 220, 20, 400, 32 }, text, 64, editMode )
- if pressed then
+ if 0 < pressed then
editMode = not editMode
end
end