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.
 
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.
Back
Top