Chaos_Knight
New Member
- Reaction score
- 39
Okay. That was alot complicated. Could you be very nice and PM me with some sample code?
:thup:
:thup:
library test initializer Init requires jBoardLib
//! runtextmacro jBoardCreate("MyBoard","4","4")
private function Actions takes nothing returns nothing
local MyBoard mb = MyBoard.create("Some jBoard")
call mb.setPlayerRow(0,0).setValue("1").setColourR("ff0000")
call mb.setPlayerRow(1,1).setValue("2").setColourR("00ff00")
call mb.setPlayerRow(2,2).setValue("3").setColourR("ffff00")
call mb.setPlayerRow(3,3).setValue("4").setColourR("ff00ff")
call mb.getField(3).setValueR("Sup").getField(14).setValueR("Dawg?")
endfunction
private function Init takes nothing returns nothing
local trigger T = CreateTrigger()
call TriggerRegisterTimerEvent(T,1.,false)
call TriggerAddAction(T,function Actions)
endfunction
endlibrary
library test initializer Init requires jBoardLib
globals
MyBoard jBoard_mb
endglobals
//! runtextmacro jBoardCreate("MyBoard","4","4")
private function Actions takes nothing returns nothing
set jBoard_mb = MyBoard.create("Some jBoard")
call jBoard_mb.setPlayerRow(0,0).setValue("1").setColourR("ff0000")
call jBoard_mb.setPlayerRow(1,1).setValue("2").setColourR("00ff00")
call jBoard_mb.setPlayerRow(2,2).setValue("3").setColourR("ffff00")
call jBoard_mb.setPlayerRow(3,3).setValue("4").setColourR("ff00ff")
call jBoard_mb.getField(3).setValueR("Sup").getField(14).setValueR("Dawg?")
endfunction
private function Init takes nothing returns nothing
local trigger T = CreateTrigger()
call TriggerRegisterTimerEvent(T,1.,false)
call TriggerAddAction(T,function Actions)
endfunction
endlibrary
method setIconPath takes string s returns nothing
set .iconpath = s
call MultiboardSetItemIcon(.mbi,.iconpath)
endmethod