Menu

RadioButton

Anonymous
2012-03-13
2012-08-28
  • Anonymous

    Anonymous - 2012-03-13

    Hi,

    I have a problem with radiobutton when using this in NiftyBasicGame ( Slick 2d
    )

    The image of radiobutton selected is an white square.

     
  • Anonymous

    Anonymous - 2012-03-13

     
  • Anonymous

    Anonymous - 2012-03-13

    <nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd http://nifty-
    gui.sourceforge.net/nifty-1.3.xsd
    ">

    <useStyles filename="nifty-default-styles.xml"/>

    <useControls filename="nifty-default-controls.xml"/>

    <screen id="character_creation"

    controller="com.xxx.herossoul.controllers.CharacterScreenController">

    <layer id="layer" childLayout="center">

    <effect>

    <onStartScreen name="fade" start="#0" end="#f" length="1600"

    delayStart="1200" />

    <onEndScreen name="fade" start="#f" end="#0" length="700"/>

    </effect>

    <image id="background" style="" childLayout="center" height="100%"

    width="100%" filename="data/img/login_screen/brown_background.png" />

    <panel childLayout="vertical" align="center" valign="center">

    <panel childLayout="horizontal" width="220" align="center">

    <panel childLayout="horizontal" align="left" width="50">

    <text name="label" font="verdana-smallregular.fnt" text="Name:"

    align="left" />

    </panel>

    <panel childLayout="horizontal" align="right">

    <control name="textfield" id="name" maxLength="30" align="right"

    width="150px" />

    </panel>

    </panel>

    <panel height="8px"/>

    <control id="RadioGroup-1" name="radioButtonGroup"/>

    <panel childLayout="vertical" align="center">

    <panel childLayout="horizontal" align="center" width="150px">

    <panel childLayout="horizontal" backgroundColor="#8001"

    paddingLeft="7px" paddingRight="7px" paddingTop="4px"

    paddingBottom="5px" width="150px" height="80px" align="center">

    <effect>

    <onActive name="border" color="#6B4226"/>

    </effect>

    <panel childLayout="vertical" align="left" width="100">

    <control name="label" text="Warrior" align="left"/>

    <control name="label" text="Mage" align="left"/>

    <control name="label" text="Archer" align="left"/>

    </panel>

    <panel childLayout="vertical" align="center" width="20">

    <control name="radioButton" id="warrior" group="RadioGroup-1"

    align="left" backgroundColor="#0000" />

    <control name="radioButton" id="mage" group="RadioGroup-1"

    align="left" backgroundColor="#8001" selected="true" />

    <control name="radioButton" id="archer" group="RadioGroup-1"

    align="left" backgroundColor="#8001" />

    </panel>

    </panel>

    </panel>

    </panel>

    <panel height="18px"/>

    <control name="button" id="create" label="Create" align="center">

    <interact onClick="createChar()"/>

    </control>

    </panel>

    </layer>

    </screen>

    </nifty>

     
  • void256

    void256 - 2012-03-15

    @Nitters: Can you take a look at this one too please? =)

     
  • Anonymous

    Anonymous - 2012-03-29

    Any news about this bug?

     
  • void256

    void256 - 2012-04-01

    fixed in 1.3 branch! :) see this tracker item for details.

    The problem was that the Slick2d Nifty renderer actually worked correctly and
    frees texture resouces when being told so (which the LWJGLRenderer did not -
    until now). Another bug in Niftys effect processing disposed image resource
    too early for certain effects (the radiobutton style uses effects internally).
    This has now been fixed in the git 1.3 branch.

    Next nightly build of Nifty should be ok now.

    Thanks for your patience!

     
  • Anonymous

    Anonymous - 2012-04-03

    Thks for the fast suport!

    Nice work!

    =D

     

Log in to post a comment.