grafX2/scripts/_tst_Settings.lua
Yves Rizoud 8c2655f88a Lua: finished inputbox with negative and decimal inputs. Added to the repository more than 20(!) new scripts by DawnBringer
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1357 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 17:58:20 +00:00

32 lines
610 B
Lua

-- Test LUA inputbox
-- this script only resizes the brush
w, h = getbrushsize()
--[[
messagebox(
"Forecolor: " .. getforecolor() .. "\n" ..
"Backcolor: " .. getbackcolor() .. "\n" ..
"Transparent color: " .. gettranscolor() .. "\n" ..
"Brush dimensions: " .. w .. "x" .. h
)
]]
ok, w, h = inputbox("Modify brush",
"Width", w, -900.0,900.0, 3,
"Height", h, -900.0,900.0, 4,
"X Flip", 0, 0, 1, 0,
"Y Flip", 0, 0, 1, 0
);
if ok == true then
setbrushsize(w,h)
for y = 0, h-1, 1 do
for x = 0, w-1, 1 do
putbrushpixel(x,y,1);
end
end
end