Skip to content

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Oct 21, 2025

Add a button to the GM chat dialog that switches an active impersonation chat to scripted comms, if the impersonated entity supports it.

Depends on #2556, #2557, and #2558. Resolves #2551.

Demo:

Screencast_20251021_142915.webm

…arams

Rather than relying on Boolean values consistently across GuiLabel and
GuiAutoSizeLabel, and instead of manipulating the font flags inconsistently
across them, refactor GuiLabel to manipulate font flags more directly instead
of using a Boolean value to determine whether to apply sp::Font::FlagVertical.

- Add a bitwise font_flag parameter to GuiLabel and default it to 0x01
  (FlagLineWrap only, same as existing label behavior)
- Simplify renderer.drawText logic in onDraw to use font_flag instead of
  conditionally applying some or no sp::Font flags during every draw
- Refactor setVertical() to set font_flag to sp::Font::FlagVertical instead of
  flipping the vertical Bool and applying the flag conditionally at onDraw()
- Add setUnwrapped() and setClipped() functions to unset FlagLineWrap and set
  FlagClip, respectively, in font_flag
- Remove unused Boolean parameters for vertical (removed) and bold
  (never implemented)
- Remove redundant GuiAutoSizeLabel::onDraw() to inherit GuiLabel::onDraw
  instead
@oznogon oznogon force-pushed the 2551-gm-chat-script-switch branch 3 times, most recently from bf60a69 to 589e3bf Compare October 24, 2025 09:08
oznogon and others added 8 commits October 24, 2025 09:48
…2555)

When a comms entity is being hailed by or has an open channel with
a GM that isn't created via the GM screen "Hail ship" button, it
can be created via GameMasterScreen::getChatDialog with an
uninitialized position and size. This can result in an unusuable
dialog and infinite GUI layout loop.

Assign a default position (0, 0) and size (300, 300) to any dialog
created via getChatDialog.
* Support Center alignment of button icons

* Support rotated sprites on GuiToggleButton
Defaulting to LineWrap breaks existing label behavior when a label
has a small width, typically 0, as on the main menu's credits and
in the autoconnect screen. Revert to no default flag.
- Use rotating icon for minimize GuiToggleButton
- Use layout properties instead of absolute positioning
- Use GuiAutoSizeLabel for title bar and clip overflow title text
Add a Script button to GM chat dialogs for entities with comms
scripts or callbacks. When clicked, the button closes the GM chat
and opens a standard chat channel from the player ship to the
entity with no hailing delay. This either launches any configured
scripted chat on the receiving entity or closes the channel.
@oznogon oznogon force-pushed the 2551-gm-chat-script-switch branch from 589e3bf to 81f20a3 Compare October 24, 2025 16:55
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.

[Enhancement] GM Message Intercept also shows CommsMenu answers

1 participant