Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game lobby extra panel improvements #484

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Aug 30, 2023

  • PlayerExtraOptionsPanel is now once again XNAPanel instead of XNAWindow. What this means is that PlayerExtraOptionsPanel.ini is no longer read and the controls can now be customized in game lobby INIs (prefixed with PlayerExtraOptionsPanel_) and can use the dynamic properties from INItializableWindow as well. For a quick migration, can simply port the contents of PlayerExtraOptionsPanel.ini (if any) to GameLobbyBase.ini and prefix any PlayerExtraOptionsPanel child controls with PlayerExtraOptionsPanel_.
  • It is now possible to set $ToggleableControl on XNAClientButton & derivatives that are children of INItializableWindow. What this does is make the button toggle visibility of said control. Only restrictions are that it won't work on the parent window itself and the target control must be fully initialized before the button (e.g the button or its parent(s) must be defined after the target or its parent(s) in the children list of [GameLobbyBase] or any other game lobby window control). Main use case would be additional panels for game options to conserve space where needed.

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Nightly build for this pull request:

@FS-21
Copy link

FS-21 commented Jul 19, 2024

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

new xna-client-feature-01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants