• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Question related to "DialogAddButtonBJ".

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Hey guys. Can I use "DialogAddButton" instead of "DialogAddButtonBJ"?
JASS:
function DialogAddButtonBJ takes dialog whichDialog, string buttonText returns button
    set bj_lastCreatedButton = DialogAddButton(whichDialog, buttonText,0)
    return bj_lastCreatedButton
endfunction

Based on the above, if I don't need to use "bj_lastCreatedButton", I can pretty much substitute "DialobAddButtonBJ" with "DialogAddButton",right? I suppose I can declare a button variable myself if needed.

Thanks all.
 
Level 7
Joined
Mar 6, 2006
Messages
282
Based on the above, if I don't need to use "bj_lastCreatedButton", I can pretty much substitute "DialobAddButtonBJ" with "DialogAddButton",right? I suppose I can declare a button variable myself if needed

That's how a LOT of the BJs are, which is why people say to never use them. Almost all of the BJ's are made to make GUI easier, so if you're using JASS, then just use what you need inside the BJ.

Some of the BJ's literally do nothing at all, besides pass the same parameters to a native, and waste a function call!
 
Status
Not open for further replies.
Top