EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

Add tube size labels to missile fire button

Open hawson opened this issue 6 months ago • 17 comments

Adds labels to missile tube fire buttons; closes #1728?

hawson avatar Jun 16 '25 02:06 hawson

I think that could potentially be confusing, and it causes text overflow on most languages (granted, IT would overflow anyways, but this would make it worse).

it cz fr de

aBlueShadow avatar Jun 16 '25 12:06 aBlueShadow

perhaps something like this instead?

(icons are smaller with a - for small tubes, larger with a + for large tubes, unchanged from present for medium)

unsure which characters exactly it should be, but from a quick peek at the current translation files we probably can't do untranslated S-M-L in context of other translated strings, and probably not even translated ones:

Language "S" "M" "L"
CZ M S V
DE K M G
FR L M L
IT P M G

GinjaNinja32 avatar Jun 16 '25 22:06 GinjaNinja32

The text overflow is a fair critique, but as you said: it happens anyway; it has been brought up in #1275 and elsewhere. Relatively speaking, I don't think it is worse, as the patch increases the existing button size slightly. Off the top of my head, the only "simple" and fast way of automatically resizing buttons (presumably within constraints) is to memoize some sort of button_size_from_text() function and add that everywhere.

I like the - and + additions. I don't think I would be able to tell the different between small and medium icons without close study. It also moves the notation to the icon, which is better than putting it in text anyway.

One idea I had was to use stacked dots (or bars), like these: ⠁⠃⠇ or ⠸⠰⠠ (unicode Braille). This requires glyphs in the appropriate font, which I suspect don't exist. Seems easy enough to a few new icons for small/med/large. I'll fiddle with that a bit.

hawson avatar Jun 16 '25 23:06 hawson

One idea I had was to use stacked dots (or bars), like these: ⠁⠃⠇ or ⠸⠰⠠ (unicode Braille).

Could pips in the icons themselves indicate this?

image

oznogon avatar Jun 17 '25 00:06 oznogon

One idea I had was to use stacked dots (or bars), like these: ⠁⠃⠇ or ⠸⠰⠠ (unicode Braille). Could pips in the icons themselves indicate this?

Why, yes they could. missile_pips

And the code patch is one line (plus adding a few new files):

-            rows[n].fire_button->setIcon("gui/icons/missile", sp::Alignment::CenterLeft, tube.direction);
+            rows[n].fire_button->setIcon("gui/icons/missile-pips-"+getMissileSizeString(tube.size), sp::Alignment::CenterLeft, tube.direction);

hawson avatar Jun 17 '25 03:06 hawson

The text overflow is a fair critique, but as you said: it happens anyway; it has been brought up in #1275 and elsewhere.

It happens on italian anyway, but rarely on the other languages. But with that PR, it does overflow on all currently supported languages except english edit: okay, by looking at it again, the difference is only about half character due to the wider buttons, so all except de overflow anyways. But I would still prefer no increase of overflow rates, and the graphical ideas look pretty nice IMO

aBlueShadow avatar Jun 17 '25 21:06 aBlueShadow

I find the "pips" a bit hard to see on small screens, so I re-worked the icons with "bars" instead: montage Since all of the icons are 128x128, try viewing at 33% or 25% zoom.

hawson avatar Jun 18 '25 02:06 hawson

Bars I really like. I didn't even know there were tube sizes before this issue!

Ownezx avatar Jun 18 '25 11:06 Ownezx

Bars I really like. I didn't even know there were tube sizes before this issue!

Yeah, I added those because i felt that fighters were too strong. Although we often gave them a small amount of missiles, if you had 5 fighters, they could each fire their single missile and devastate a huge ship.

So now most fighters have small tubes (and some bombers have a single medium one)

In the same vein you can also have medium ships with a single huge missile if they are meant to be more like an "artillery" class.

nallath avatar Jun 18 '25 12:06 nallath

+1 to bars

oznogon avatar Jun 18 '25 15:06 oznogon

Can we see an assortment of missile icons rotated to say 30 degrees and 60 degrees? I know most ship designs don't do this, but I've got some that do. I'd like to see what the dotted icons look like vs the barred icons when they're rotated

Xansta avatar Jun 18 '25 16:06 Xansta

I'm spending more time rotating images than I am coding. At least the rotation and tiling is scripted. ;-) tile

hawson avatar Jun 19 '25 00:06 hawson

And here's an in-game display of all 3 sizes at once: missle_bars

hawson avatar Jun 19 '25 00:06 hawson

"Ribbed for extra pleasure"

daid avatar Jun 19 '25 11:06 daid

Perhaps using 1/2/4 lines would make more sense with the damage of the missiles (see #2453)

Ownezx avatar Jun 24 '25 22:06 Ownezx

I don't think the icons are large enough to support 4 lines/bars? Three bars use most of the linear space on the current icons, but if the icon is reworked to be a bit "longer," it might work. I'll see what I can do with the SVGs (and thus new PNGs).

The Database mentions the damage ratios in passing on the "Weapons" page: "...wary of [large missiles] doubled damage potential" and "[small missiles] only deal half the damage of their basic counterparts...", but it's a little buried.

hawson avatar Jun 25 '25 00:06 hawson

I very slightly re-worked the icons, based off of a missile.svg file created from the original missile.png. You really have to look hard, but these are a hair sharper than the old ones. image And a new tile for comparison: tile

hawson avatar Jun 25 '25 01:06 hawson