Skip to content

bugfix: Remove superfluous borders from all Special Power buttons in the sidebar#128

Open
Stubbjax wants to merge 1 commit into
TheSuperHackers:mainfrom
Stubbjax:remove-special-power-command-button-shortcut-borders
Open

bugfix: Remove superfluous borders from all Special Power buttons in the sidebar#128
Stubbjax wants to merge 1 commit into
TheSuperHackers:mainfrom
Stubbjax:remove-special-power-command-button-shortcut-borders

Conversation

@Stubbjax

@Stubbjax Stubbjax commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This change removes superfluous borders from all Special Power buttons in the sidebar.

This affects the following Special Power buttons:

  • (Early) Emergency Repair
  • Intelligence
  • Nuclear Missile
  • Particle Uplink Cannon
  • Radar Van Scan
  • Scud Storm
  • Sneak Attack
  • Spectre Gunship

Plus a few single-player exclusives, such as the battleship powers.

Button borders are used for distinguishing button types in the control bar, but serve no function in the sidebar, where all buttons are actions.

For reference:

🟦 Blue = build
🟩 Green = action
🟧 Orange = upgrade
🟨 Yellow = system

Before

image

After

image

@Stubbjax Stubbjax self-assigned this Jul 9, 2026
@Stubbjax Stubbjax added Bug Something isn't working GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour labels Jul 9, 2026
Options = NEED_TARGET_POS CONTEXTMODE_COMMAND NEED_SPECIAL_POWER_SCIENCE OK_FOR_MULTI_SELECT
TextLabel = OBJECT:SpyDrone
ButtonImage = SAScout
; ButtonBorderType = ACTION

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about write it like so

; ButtonBorderType = ACTION ; Special Power Shortcut buttons are not supposed to show a border

This comment will be erased on Mod Build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rule for leaving in commented logic vs deleting it?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It documents that adding this field is not intended for this button. If this information is missing, then the next person looking at it may think: "hmm, why does this button have no border? let's add it!"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that next person have at least some vague idea of what they're doing?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EA made this mistake, so we can expect many modders will do the same mistake.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is likely? I can't imagine anyone doing that without knowing what the field does.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very likely. We cannot expect modders to be smarter than EA, and EA already butchered this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that not the case with every other field in the game that is removed when not needed?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is difficult to quantify mistake rate. For buttons I expects copy-pasting, because 2 buttons need to be created, one for Control Bar and one for Special Power Bar. On this copy step mistake will happen. The fact that EA made this mistake many times is enough evidence that this is super easy to make in this particular case and is best avoided by documenting that shortcuts are not supposed to have borders. It tells the modder to pay special attention. Otherwise there is no feedback and it can go unnoticed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can chime in and say from what I have personally done when modding/map.ini and what I've seen other do it is blantly copy paste of other CommandButtons and small incremental changes until the feature wanted "works". So there is a high change that this will be added to places where it is not needed.

Maybe a better solutions could be having a glossary at the top similar to the CommandSet explaining the field structure and how it maps to the CommandBar.

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the reference change 18 ButtonBorderType's were removed. Here just 17.

@xezon

xezon commented Jul 12, 2026

Copy link
Copy Markdown

This change does not apply to Generals?

@xezon

xezon commented Jul 12, 2026

Copy link
Copy Markdown

This pull is not linked to TheSuperHackers/GeneralsGamePatch#1573 in Migration Project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants