.kju 3245 Posted October 15, 2011 idc = -1; => button will be executed, but nothing else happens idc = 4711; => button will be executed, AND display/dialog will be closed Can someone confirm that a button with idc != -1 will close the display/dialog on execution? Any way around this? To stop it closing the display/dialog? Share this post Link to post Share on other sites
nuxil 2 Posted October 25, 2011 (edited) this does not happen in 1.59. is the idd also set to -1 ? can you show the code? i quick test i did using only simple buttons and it works as it should. class mytest { idd = 4710; class controlsBackground {}; class controls { class Button1 { idc = 4711; type = 1; style = 0; default = false; font = "Zeppelin32"; sizeEx = 0.03; colorText[] = { 0, 0, 0, 1 }; colorFocused[] = { 1, 0, 0, 1 }; // border color for focused state colorDisabled[] = { 0, 0, 1, 0.7 }; // text color for disabled state colorBackground[] = { 1, 1, 1, 0.8 }; colorBackgroundDisabled[] = { 1, 1, 1, 0.5 }; // background color for disabled state colorBackgroundActive[] = { 1, 1, 1, 1 }; // background color for active state offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; colorShadow[] = { 0, 0, 0, 0.5 }; colorBorder[] = { 0, 0, 0, 1 }; borderSize = 0; soundEnter[] = { "", 0, 1 }; // no sound soundPush[] = { "buttonpushed.ogg", 0.1, 1 }; soundClick[] = { "", 0, 1 }; // no sound soundEscape[] = { "", 0, 1 }; // no sound x = 0.5; y = 0.4; w = 0.2; h = 0.05; text = "test1"; action = "hint 'test1'"; }; class Button2 { idc = -1; type = 1; style = 0; default = false; font = "Zeppelin32"; sizeEx = 0.03; colorText[] = { 0, 0, 0, 1 }; colorFocused[] = { 1, 0, 0, 1 }; // border color for focused state colorDisabled[] = { 0, 0, 1, 0.7 }; // text color for disabled state colorBackground[] = { 1, 1, 1, 0.8 }; colorBackgroundDisabled[] = { 1, 1, 1, 0.5 }; // background color for disabled state colorBackgroundActive[] = { 1, 1, 1, 1 }; // background color for active state offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; colorShadow[] = { 0, 0, 0, 0.5 }; colorBorder[] = { 0, 0, 0, 1 }; borderSize = 0; soundEnter[] = { "", 0, 1 }; // no sound soundPush[] = { "buttonpushed.ogg", 0.1, 1 }; soundClick[] = { "", 0, 1 }; // no sound soundEscape[] = { "", 0, 1 }; // no sound x = 0.5; y = 0.5; w = 0.2; h = 0.05; text = "test2"; action = "hint 'test2'"; }; }; }; the dialog does not close when the button is pressed. Edited October 25, 2011 by nuxil Share this post Link to post Share on other sites
.kju 3245 Posted October 25, 2011 Sorry forgot to update this one. You find the full details here: http://dev-heaven.net/issues/25520 In short (for me) it only happens in config resources - not in mission resources. Share this post Link to post Share on other sites
nuxil 2 Posted October 25, 2011 (edited) downloaded the files and followed thise steps.. Load the attached addon along Load the attached mission in the editor Notice how you can press both buttons without the dialog to close Press ESC and press first the button called "WithOUTIDC" and note the display not to close Press the other button and see the display auto close.. problem with step 4 is that once you press esc the dialog closes which is a normal behavioure. so i just added in a trigger 0-0-0 to recreate it. and it still works as it should. if your using beta. maybe its related to that or maybe a conflicting idc. because for me. it works as it should in 1.59 Edited October 25, 2011 by nuxil Share this post Link to post Share on other sites
.kju 3245 Posted October 25, 2011 5 is the problem :) It should _not_ auto close. Or why did you talk about 4? Share this post Link to post Share on other sites
nuxil 2 Posted October 25, 2011 as said. it works as it should it doesnt auto close with me, Share this post Link to post Share on other sites
.kju 3245 Posted October 25, 2011 Did you realize that you are to press ESC to stop the mission to see the config resource? Not only ESC to close the mission dialog? I've clarified it by posting each step to the smallest detail: http://dev-heaven.net/issues/25520 Share this post Link to post Share on other sites
nuxil 2 Posted October 25, 2011 ahh sorry, my fault. i did put the addon in @mod/file.pbo not in @mod/addons/file.pbo. and yes i finnaly see what you mean. :) your right. it should not autoclose when a idc is assigned to it. Share this post Link to post Share on other sites
.kju 3245 Posted October 25, 2011 no worries and thanks for the confirmation! Share this post Link to post Share on other sites