Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

GBC overhead icon for idle etc.. mode

Open GoogleFrog opened this issue 10 years ago • 9 comments

There should be overhead icons for the idle mode. The most common mode should not have an icon. The unit_icons widget provides a framework.

GoogleFrog avatar Nov 16 '16 09:11 GoogleFrog

This might even just be an option. Ideally GBC would behave intuitively enough for you to not even need to see which state your units are in.

GoogleFrog avatar Nov 16 '16 11:11 GoogleFrog

I could make it optional and on by default. I've picked out some icons already and I'll probably be working on it next. Note that there are still situations where units can get stuck in various ways, so it's usually still good to know what they're trying to do. Icons may actually make that even easier.

aeonios avatar Nov 16 '16 11:11 aeonios

This is not done. Technically, GBC should not draw any icons. It should use the icon interface in WG.icons defined in unit_icons.lua. Also, it should not draw text underneath the unit.

GoogleFrog avatar Nov 18 '16 12:11 GoogleFrog

I couldn't figure out how to make WG.icons disable an icon for a specific unit. It allows you to set the icon but I checked that function and nil is not a valid argument. It also allows you to disable an icon by name, but that's a blanket removal for all units with the same icon.

EDIT: nvm, I need to test and see what it actually does.

aeonios avatar Nov 18 '16 13:11 aeonios

Ok I got that working and it's basically as good as how I was drawing it. There is one disadvantage though, which is that if GBC crashes the icons continue to be drawn, so it isn't immediately obvious that it has died.

aeonios avatar Nov 18 '16 14:11 aeonios

Seems fixed.

GoogleFrog avatar Nov 18 '16 16:11 GoogleFrog

I'm fine with the overhead icon remaining if the widget crashes, there is not much to be done about that. However, if I disable the widget then it should remove the icons in Shutdown.

GoogleFrog avatar Nov 18 '16 16:11 GoogleFrog

that got fixed in the latest PR. EDIT: wait no that's only when speccing.

aeonios avatar Nov 18 '16 17:11 aeonios

This asked GBC to show its state icons through WG.icons, draw no text under units, and remove its icons in Shutdown when the widget is disabled. https://github.com/ZeroK-RTS/Zero-K/commit/addfab737a28b62a0d90ebbb531a951bd47fc406 moved the icons to WG.icons and removed the text, and https://github.com/ZeroK-RTS/Zero-K/commit/51a368c0f2ca7e19805f076020a95f3a306b2cf8 hides both GBC icons in widget:Shutdown (made a few minutes after the last comment here). A bench test on current master: disabling the GBC widget as a player removed its overhead icons (3 before, 0 after). This looks resolved; it can be closed if the reporter agrees.

Found with help from Claude Code.

moss-orbit-9f339e avatar Oct 24 '26 08:10 moss-orbit-9f339e