1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #include "ItemType.h"
- #include <InMemoryBuffer.h>
- #include "Registries.h"
- ItemType::ItemType(
- int id, ModelInfo model, Framework::Text name, Framework::Text tooltipUIML)
- : ReferenceCounter(),
- id(id),
- model(model),
- icon(0),
- name(name),
- tooltipUIML(tooltipUIML)
- {}
- ItemType::~ItemType()
- {
- if (this->icon) this->icon->release();
- }
- int ItemType::getId() const
- {
- return id;
- }
- void ItemType::setBild(Framework::Bild* icon)
- {
- if (this->icon) this->icon->release();
- this->icon = icon;
- }
- Framework::Bild* ItemType::zIcon() const
- {
- return icon;
- }
- Framework::Model3DData* ItemType::getItemModel() const
- {
- return model.getModel();
- }
- Framework::Model3DTextur* ItemType::getItemTextur() const
- {
- return model.getTexture();
- }
- const Framework::Text& ItemType::getName() const
- {
- return name;
- }
- const Framework::Text& ItemType::getTooltipUIML() const
- {
- return tooltipUIML;
- }
- float ItemType::getSize() const
- {
- return model.getSize();
- }
|