View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0024043 | AI War 2 | Suggestion | Oct 28, 2020 9:57 pm | Nov 3, 2020 6:12 pm | |
Reporter | BadgerBadger | Assigned To | Chris_McElligottPark | ||
Status | assigned | Resolution | open | ||
Product Version | Beta 2.624 Revised Resource Bar | ||||
Summary | 0024043: show ship icon in Click-C menus | ||||
Description | So I'm actually trying to play a game of ai war 2! I don't really know the units very well, so being able to connect the icons/flairs with descriptions isn't always easy. Could the Click-C menu on the ARS and the hovertext for the "Picking the ship line from an ARS" hack show the ship flairs and icons for each ship line? I'm imagining the player who remembers "Some AI ships whose name I forgot killed a bunch of turrets. I don't remember the name, but when I see the icon/flair in the hacking tooltip I remember those were cool and I wanted to try them." | ||||
Tags | No tags attached. | ||||
related to | 0024058 | resolved | Chris_McElligottPark | UI Beta: Fleet stance icons are too bright when activated and lit up |
|
So... embedding images at places in text, especially with specialized control and whatnot, is pretty tough. Thankfully TextMeshPro is open source, and I have modded various parts of it to extend to things that I needed in some other areas. One of the things on my "someday" list is the ability to start doing sprite lookups from our own location, rather than from the Resources folder like it wants to do with its built-in methods. Even that will be somewhat limited, though, because for an image like you are describing that is two images in the same location with two different colors applied, and with one drawn before the other one so that they line up correctly. Actually, with flair it is three icons. I would like to make that happen, but that will require some more serious hooking into the TextMeshPro draw pipeline. The really good news is that in this compound-draw case only one sprite has to interact with kerning and text flow, since it's blocking out the space all 2-3 sprites will use. So I just need to override their stuff to be able to find our sprites, and then make some sort of special tag on their sprite tag that says "also draw these other things on top of it," I think. That way my added two images to be drawn don't mess with the general text flow at all. The obvious counter-solution to this problem is to manually place images and then just put text around it. That is what we did in AIWC. But especially in something like the C menu, that won't work here because we have paragraphs of information and we don't know what the y offset will be of any given paragraph at any given time (to solve that problem is just as complicated, if not more, than the sprite insertion problem, and way less flexible). If I get this working well, then it would be nice to be able to include more icons in the tooltips in general, and do other things that help reduce text to an extent and replace it with icons. I guess this is kind of climbing my priority list, but I'm not sure how deep a rabbit hole this will be, so I'm probably going to punt this until after DLC2 and MP work is done. |
|
Thanks for the explanation. I agree that you should put this off until after DLC2 and MP. |
Date Modified | Username | Field | Change |
---|---|---|---|
Oct 28, 2020 9:57 pm | BadgerBadger | New Issue | |
Oct 29, 2020 10:20 am | Chris_McElligottPark | Note Added: 0059413 | |
Oct 29, 2020 10:22 am | Chris_McElligottPark | Assigned To | => Chris_McElligottPark |
Oct 29, 2020 10:22 am | Chris_McElligottPark | Status | new => assigned |
Oct 29, 2020 10:23 am | BadgerBadger | Note Added: 0059414 | |
Nov 3, 2020 6:12 pm | BadgerBadger | Relationship added | related to 0024058 |