System jBoard - Advanced Multiboard System

SanKakU

Member
Reaction score
21
edit! ok I have a new problem i haven't solved yet!

.setIconPath() isn't doing anything!
the icons are always set according to the default icon and i can't change it!


Update!

I figured it out. change the following:
JASS:
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
into this:
JASS:
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
making a multiboard with this system is really nice. but, i'm confused about updating it.

// VALUE SETTERS
// .setValue("value")
// .setColour("rgb value")
// Colour syntax: rrggbb (in hexadecimal)
// .setPrefix("value")
// .setSuffix("value")
// .setIconPath("path")
// .setWidth(real width)
//
// VALUE MANIPULATORS
// .add(integer value)
// Only works if field contents are numerical strings, value can be negative

how can you use these value setters and value manipulators from other sections of your map? i don't think you explained that part...

in your example you're using a local multiboard in a private function in a library...if we do the same thing, how can we access the multiboard? ^ ^
 

SanKakU

Member
Reaction score
21
*AHEM*

bump.

DOES ANYONE KNOW IF IT'S ACTUALLY POSSIBLE TO CHANGE MULTIBOARD ICONS WITH THIS SYSTEM?

edit: ok i seem to have fixed the bug.
JASS:
method setIconPath takes string s returns nothing
            set .iconpath = s
        endmethod

needs to be
JASS:
method setIconPath takes string s returns nothing
set .iconpath = s
call MultiboardSetItemIcon(.mbi,.iconpath)
endmethod


Magentix, please update the original post with the bug fixed, and can you figure out if the change that i made in the other thread is really necessary? my brain is worn out on this system for the moment. At any rate, please update the example code too, because it is a broken example.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top