Skip to content

Remove dead RAYLIB/SOKOL #if blocks in Forms DialogBox#3546

Merged
vchelaru merged 1 commit into
mainfrom
3544-dialogbox-dead-if-cleanup
Jul 8, 2026
Merged

Remove dead RAYLIB/SOKOL #if blocks in Forms DialogBox#3546
vchelaru merged 1 commit into
mainfrom
3544-dialogbox-dead-if-cleanup

Conversation

@vchelaru

@vchelaru vchelaru commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Part of #3543's dead-#if reduction. Cleans up MonoGameGum/Forms/Controls/Games/DialogBox.cs per-block, per #3544.

Changes

  • Removed the #if RAYLIB and #if SOKOL using-blocks — neither symbol is ever defined in GumCommon's compile (the sole owner of this file); RaylibGum.csproj and SokolGum.csproj both <Compile Remove> this file and only pull it in via the GumCommon project reference. Confirmed dead everywhere.
  • Collapsed the two GamepadButton alias declarations (#if !FRB && !XNALIKE and inside #if XNALIKE) into a single unconditional using GamepadButton = Gum.Input.GamepadButton;. Every FRB-defining csproj in the FlatRedBall repo also defines MONOGAME, FNA, or KNI (confirmed across FlatRedBall.Forms.DesktopGlNet6, .iOSMonoGame, .AndroidMonoGame, .FNA, .Kni.Web, .Kni.DesktopGL), so FRB always implies XNALIKE and the alias was already active in every real build configuration — the two declarations were never actually gated differently.
  • Left all live #if FRB / #if XNALIKE behavioral splits untouched (Tweener typewriter, IInputDevice input, TimeManager.CurrentTime, the XNA vs Gum.Forms.Input Keys selection, etc.) per the issue's guidance.

Verification

Behavior-preserving dead-code removal — no new test needed per the tdd skill's exemption. Verified via:

  • dotnet build MonoGameGum.Tests/MonoGameGum.Tests.csproj — clean, DialogBoxTests 15/15 pass
  • dotnet build Runtimes/RaylibGum/RaylibGum.csproj — clean
  • dotnet build Runtimes/SkiaGum/SkiaGum.csproj — clean
  • FRB canary (FlatRedBall.Forms.DesktopGlNet6.csproj), built from the primary checkout: baseline (main) clean, branch clean, 0 new errors

Closes #3544

🤖 Generated with Claude Code

…padButton alias

Neither RAYLIB nor SOKOL is ever defined in GumCommon's compile (the sole
owner of this file) or in FRB's; RaylibGum and SokolGum both <Compile Remove>
it and pull it in only via GumCommon. The two GamepadButton alias
declarations collapse to one unconditional using, since every FRB-defining
csproj also defines MONOGAME/FNA/KNI, so FRB always implies XNALIKE and the
alias was already active in every real build configuration.

Closes #3544

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vchelaru vchelaru enabled auto-merge (squash) July 8, 2026 14:06
@vchelaru vchelaru merged commit 4bcc837 into main Jul 8, 2026
3 checks passed
@vchelaru vchelaru deleted the 3544-dialogbox-dead-if-cleanup branch July 8, 2026 14:13
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.

Clean up dead RAYLIB/SOKOL #if blocks in Forms DialogBox (per-block; preserve live FRB/XNALIKE splits)

1 participant