An icon manager which provides icons for entities

Registered by Erik Ogenvik on 2007-08-03

There's a real need for an icon manager which allows for easy creation of icons for entities. These icons should simply be a render of the Model corresponding to the specific entity, and should be used in inventories, give-dialogs, status windows etc..
Most of the foundation is already in place in the EntityCEGUITexture class, which allows for easy rendering of an entity to cegui texture. By expanding on this class it should be possible to create a powerful icon manager.

For performance reasons, it would be best if the amount of icon textures were kept down. The manager should therefore keep a list of textures which would contain the final renders of the icons. When a new icon is requested that haven't yet been rendered, it should first be rendered by the EntityCEGUITexture class to a render texture, and then copied to the correct place in the icon texture. We should probably support the sizes 16x16, 32x32 and 64x64. New sizes should be easily added.
We want to support icons for both entity base types (for example all entities of type "shirt") and for specific entities. In the latter case, when an entity is destroyed the icon must be released.

The calls to the icon manager would be really simple, preferrably something like:
CEGUI::Image* getIcon(int pixelSize, Eris::Entity* entity);
CEGUI::Image* getIcon(int pixelSize, Eris::TypeInfo* typeInfo);

(Or a simple "Icon" object would be returned from which Image could be obtained.)

Blueprint information

Status:
Complete
Approver:
Erik Ogenvik
Priority:
High
Drafter:
Erik Ogenvik
Direction:
Needs approval
Assignee:
Erik Ogenvik
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Erik Ogenvik on 2007-09-03
Completed by
Erik Ogenvik on 2007-12-22

Related branches

Sprints

Whiteboard

The icon manager is complete, I've now moved on to creating a framework for entity icon ans slots, to be used in the inventory widget.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.