xna-cncnet-client
xna-cncnet-client copied to clipboard
Allow INItializableWindow buttons/checkboxes to toggle visibility of other controls
Closes #775
- It is now possible to set
$TogglesonXNAButtonorXNACheckBox& derivatives that are children ofINItializableWindow. What this does is make the button/checkbox toggle visibility of the listed controls. Main use case would be additional panels for game options to conserve space where needed.
Nightly build for this pull request:
- artifacts-Ares.zip
- artifacts-TS.zip
- artifacts-YR.zip This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.
Since this PR has almost 1 year old I merged latest sources and this PR in a local repository for testing this variable $ToggleableControl that is mentioned in the main message and seems very useful. I have declared both controls in;
[GameLobbyBase]
...
$CC29=SuperWeaponsOptionsPanel:XNAExtraPanel ;PlayerExtraOptionsPanel
$CC30=btnSuperWeaponsOptionsOpen:XNAClientButton
Then:
[btnSuperWeaponsOptionsOpen]
...
$ToggleableControl=SuperWeaponsOptionsPanel
[SuperWeaponsOptionsPanel]
$Width=400
$Height=200
$X=0
$Y=0; - LABEL_SPACING - DEFAULT_LBL_HEIGHT + 100
SolidColorBackgroundTexture=0,0,0,128
DrawMode=Stretched
BackgroundTexture=50.png
And works very well in this panel example :-D