View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006097 | Spring engine | Lua | public | 2018-12-09 01:11 | 2018-12-15 01:27 |
| Reporter | Floris | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | reopened | ||
| Summary | 0006097: request for Spring.GetUnitDefIcon | ||||
| Description | we can use Spring.SetUnitDefIcon, but there is not Get version. This could be then used to shown a unit radar icon on top of unit build menu. | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
should already be possible, check UnitDefs[udid].iconType before and after calling Spring.SetUnitDefIcon(udid, ...) |
|
|
UnitDefs[udid].iconType could be helpfull, but isnt returning what texture is used |
|
|
the texture used is whatever bitmap happens to be defined in gamedata/icontypes.{tdf,lua} for the icon with name UnitDefs[udid].iconType, or in BA's case the corresponding "png file" entry in the icons table in unit_customicons.lua. what else do you need? |
|
|
just a (proper) way for a widget to read that |
|
|
the engine doesn't keep track of icon type->file mappings. it would be much easier to just stick that information in a table, and less than 5 lines of code if you wrap SetUnitDefIcon. |
|
|
got it working |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-12-09 01:11 | Floris | New Issue | |
| 2018-12-10 22:42 | Kloot | Status | new => closed |
| 2018-12-10 22:42 | Kloot | Resolution | open => no change required |
| 2018-12-10 22:42 | Kloot | Note Added: 0019602 | |
| 2018-12-13 14:53 | Floris | Status | closed => feedback |
| 2018-12-13 14:53 | Floris | Resolution | no change required => reopened |
| 2018-12-13 14:53 | Floris | Note Added: 0019603 | |
| 2018-12-13 23:49 | Kloot | Note Added: 0019604 | |
| 2018-12-14 00:18 | Floris | Note Added: 0019605 | |
| 2018-12-14 00:18 | Floris | Status | feedback => new |
| 2018-12-14 19:57 | Kloot | Note Added: 0019606 | |
| 2018-12-14 21:31 | Floris | Note Added: 0019607 | |
| 2018-12-15 01:27 | Kloot | Status | new => closed |