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

Add KSC mod tray and ability for mods to add their button to the tray #261

Merged
merged 5 commits into from
Sep 7, 2023

Conversation

Falki-git
Copy link
Contributor

This is similar to how app buttons are added in Flight and OAB scenes.
KSC tray is indended for mods that are used outside Flight and OAB.
Upcoming HUMANS and (probably) Life Support mods will use it.

Difference in relation to Flight/OAB trays is that KSC menu doesn't operate as a toggle, but rather like a general button; meaning there is no toggled state.

Example usage:

Appbar.RegisterKSCAppButton(
      "Text that will be displayed for the button",
      ToolbarKscButtonID,
      AssetManager.GetAsset<Texture2D>($"{SpaceWarpMetadata.ModID}/images/icon.png"),
      () =>
      {
            _isWindowOpen = !_isWindowOpen;
      }
);

KscTray

@Falki-git Falki-git changed the title Add KSC mod tray and ability for mods to and their button to the tray Add KSC mod tray and ability for mods to add their button to the tray Sep 7, 2023
@cheese3660
Copy link
Member

LGTM, will merge when I get home

Falki-git added a commit to Falki-git/SpaceWarp.Template that referenced this pull request Sep 7, 2023
Falki-git added a commit to Falki-git/SpaceWarp.Template that referenced this pull request Sep 7, 2023
@cheese3660 cheese3660 merged commit e7f641a into SpaceWarpDev:dev Sep 7, 2023
2 checks passed
@Falki-git Falki-git deleted the KscAppTray branch December 20, 2023 11:49
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