View Issue Details

IDProjectCategoryView StatusLast Update
0006097Spring engineLuapublic2018-12-15 01:27
ReporterFloris Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionreopened 
Summary0006097: request for Spring.GetUnitDefIcon
Descriptionwe 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.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2018-12-10 22:42

developer   ~0019602

should already be possible, check UnitDefs[udid].iconType before and after calling Spring.SetUnitDefIcon(udid, ...)

Floris

2018-12-13 14:53

reporter   ~0019603

UnitDefs[udid].iconType could be helpfull, but isnt returning what texture is used

Kloot

2018-12-13 23:49

developer   ~0019604

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?

Floris

2018-12-14 00:18

reporter   ~0019605

just a (proper) way for a widget to read that

Kloot

2018-12-14 19:57

developer   ~0019606

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.

Floris

2018-12-14 21:31

reporter   ~0019607

got it working

Issue History

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