?? brush test.lua
字號:
-- Brush Test.lua
function main ()
local w = mappy.getValue(mappy.MAPWIDTH)
if (w == 0) then
mappy.msgBox ("Brush Test", "You need to load or create a map first", mappy.MMB_OK, mappy.MMB_ICONINFO)
else
bnum = mappy.getValue (mappy.NUMBRUSHES)
mappy.msgBox ("Brush Test", "This will create a new brush and rename it.\nMap name: "..mappy.getValue(mappy.MAPFILENAME).."\n\nNumber of brushes = "..bnum, mappy.MMB_OK, mappy.MMB_ICONINFO)
-- This will create a brush and copy the area described
mappy.createBrush (bnum, 0, 0, 16, 16)
mappy.renameBrush (bnum, "Brush Test");
mappy.msgBox ("Brush Test", "New brush created, "..mappy.getBrushValue (bnum, mappy.BRUSHNAME), mappy.MMB_OK, mappy.MMB_ICONINFO)
mappy.updateScreen ()
end
end
test, errormsg = pcall( main )
if not test then
mappy.msgBox("Error ...", errormsg, mappy.MMB_OK, mappy.MMB_ICONEXCLAMATION)
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -