Results 1 to 9 of 9

Thread: Button with idc != -1 will close the display/dialog on execution?

  1. #1

    Question Button with idc != -1 will close the display/dialog on execution?

    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?

  2. #2
    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.

    PHP Code:
    class mytest
    {
        
    idd 4710;
        class 
    controlsBackground {};
        class 
    controls {
            class 
    Button1
            
    {
                
    idc 4711
                
    type 1
                
    style 0
                default = 
    false
                
    font "Zeppelin32"
                
    sizeEx 0.03
                
    colorText[] = { 000}; 
                
    colorFocused[] = { 100}; // border color for focused state 
                
    colorDisabled[] = { 0010.7 }; // text color for disabled state 
                
    colorBackground[] = { 1110.8 }; 
                
    colorBackgroundDisabled[] = { 1110.5 }; // background color for disabled state 
                
    colorBackgroundActive[] = { 111}; // background color for active state 
                
    offsetX 0.003
                
    offsetY 0.003
                
    offsetPressedX 0.002
                
    offsetPressedY 0.002
                
    colorShadow[] = { 0000.5 }; 
                
    colorBorder[] = { 000}; 
                
    borderSize 0
                
    soundEnter[] = { ""0}; // no sound 
                
    soundPush[] = { "buttonpushed.ogg"0.1}; 
                
    soundClick[] = { ""0}; // no sound 
                
    soundEscape[] = { ""0}; // no sound 
                
    0.5
                
    0.4
                
    0.2
                
    0.05
                
    text "test1"
                
    action "hint 'test1'";
            };        
            class 
    Button2
            
    {
                
    idc = -1
                
    type 1
                
    style 0
                default = 
    false
                
    font "Zeppelin32"
                
    sizeEx 0.03
                
    colorText[] = { 000}; 
                
    colorFocused[] = { 100}; // border color for focused state 
                
    colorDisabled[] = { 0010.7 }; // text color for disabled state 
                
    colorBackground[] = { 1110.8 }; 
                
    colorBackgroundDisabled[] = { 1110.5 }; // background color for disabled state 
                
    colorBackgroundActive[] = { 111}; // background color for active state 
                
    offsetX 0.003
                
    offsetY 0.003
                
    offsetPressedX 0.002
                
    offsetPressedY 0.002
                
    colorShadow[] = { 0000.5 }; 
                
    colorBorder[] = { 000}; 
                
    borderSize 0
                
    soundEnter[] = { ""0}; // no sound 
                
    soundPush[] = { "buttonpushed.ogg"0.1}; 
                
    soundClick[] = { ""0}; // no sound 
                
    soundEscape[] = { ""0}; // no sound 
                
    0.5
                
    0.5
                
    0.2
                
    0.05
                
    text "test2"
                
    action "hint 'test2'";        
            };
        };
    }; 
    the dialog does not close when the button is pressed.
    Last edited by nuxil; Oct 25 2011 at 08:01.

    -- BEC, Battleye Extended Controls --
    -- BEC Forum Thread --

    Spoiler:

  3. #3
    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.

  4. #4
    downloaded the files and followed thise steps..

    1. Load the attached addon along
    2. Load the attached mission in the editor
    3. Notice how you can press both buttons without the dialog to close
    4. Press ESC and press first the button called "WithOUTIDC" and note the display not to close
    5. 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
    Last edited by nuxil; Oct 25 2011 at 09:20.

  5. #5
    5 is the problem It should _not_ auto close.

    Or why did you talk about 4?

  6. #6
    as said. it works as it should it doesnt auto close with me,

  7. #7
    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

  8. #8
    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.

  9. #9
    no worries and thanks for the confirmation!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •