diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-14 18:38:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-14 20:11:10 +0300 |
commit | 21d0f7cd7b0d8474f1043ae4f283a58ea6d8b352 (patch) | |
tree | c72ace46fabdfd0b83b1cd3b9c5efd89e462da1d | |
parent | a442a20199c27838604da514ffc67ae87d4f8433 (diff) | |
download | plus-21d0f7cd7b0d8474f1043ae4f283a58ea6d8b352.tar.gz plus-21d0f7cd7b0d8474f1043ae4f283a58ea6d8b352.tar.bz2 plus-21d0f7cd7b0d8474f1043ae4f283a58ea6d8b352.tar.xz plus-21d0f7cd7b0d8474f1043ae4f283a58ea6d8b352.zip |
Add card item type.
-rw-r--r-- | src/enums/gui/themecolorid.h | 2 | ||||
-rw-r--r-- | src/enums/resources/itemsoundevent.h | 3 | ||||
-rw-r--r-- | src/gui/popups/itempopup.cpp | 1 | ||||
-rw-r--r-- | src/gui/theme.cpp | 2 | ||||
-rw-r--r-- | src/resources/db/itemdb.cpp | 1 | ||||
-rw-r--r-- | src/resources/itemtype.h | 1 | ||||
-rw-r--r-- | src/resources/itemtypemapdata.h | 4 |
7 files changed, 13 insertions, 1 deletions
diff --git a/src/enums/gui/themecolorid.h b/src/enums/gui/themecolorid.h index 963d85ef0..1d668ba92 100644 --- a/src/enums/gui/themecolorid.h +++ b/src/enums/gui/themecolorid.h @@ -193,6 +193,8 @@ enumStart(ThemeColorId) WARNING_OUTLINE, CHARM, CHARM_OUTLINE, + CARD, + CARD_OUTLINE, PLAYER_ADVANCED, PLAYER_ADVANCED_OUTLINE, BUBBLE_NAME, diff --git a/src/enums/resources/itemsoundevent.h b/src/enums/resources/itemsoundevent.h index 5b9a4157b..714ba311b 100644 --- a/src/enums/resources/itemsoundevent.h +++ b/src/enums/resources/itemsoundevent.h @@ -39,7 +39,8 @@ namespace ItemSoundEvent PUT, // put into container EQUIP, UNEQUIP, - USE + USE, + USECARD }; } // namespace ItemSoundEvent diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 6121c288f..1c38e9eec 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -265,6 +265,7 @@ void ItemPopup::setLabelColor(Label *label, const ItemType::Type type) const caseSetColor(ItemType::EQUIPMENT_CHARM, ThemeColorId::CHARM) caseSetColor(ItemType::SPRITE_RACE, ThemeColorId::UNKNOWN_ITEM) caseSetColor(ItemType::SPRITE_HAIR, ThemeColorId::UNKNOWN_ITEM) + caseSetColor(ItemType::CARD, ThemeColorId::CARD) default: { return label->setForegroundColorAll(getThemeColor( diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 62cc2a03b..000994368 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -815,6 +815,8 @@ static int readColorType(const std::string &type) "WARNING_OUTLINE", "CHARM", "CHARM_OUTLINE", + "CARD", + "CARD_OUTLINE", "PLAYER_ADVANCED", "PLAYER_ADVANCED_OUTLINE", "BUBBLE_NAME", diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 2b1601c76..ad6d8f3e9 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -187,6 +187,7 @@ static void initStatic() mSoundNames["pickup"] = ItemSoundEvent::PICKUP; mSoundNames["take"] = ItemSoundEvent::TAKE; mSoundNames["put"] = ItemSoundEvent::PUT; + mSoundNames["usecard"] = ItemSoundEvent::USECARD; } void ItemDB::load() diff --git a/src/resources/itemtype.h b/src/resources/itemtype.h index e159a6e0b..2035ce272 100644 --- a/src/resources/itemtype.h +++ b/src/resources/itemtype.h @@ -36,6 +36,7 @@ namespace ItemType EQUIPMENT_TWO_HANDS_WEAPON, EQUIPMENT_TORSO, EQUIPMENT_ARMS, // 5 + CARD, EQUIPMENT_HEAD, EQUIPMENT_LEGS, EQUIPMENT_SHIELD, diff --git a/src/resources/itemtypemapdata.h b/src/resources/itemtypemapdata.h index 952329a24..24bee6bcc 100644 --- a/src/resources/itemtypemapdata.h +++ b/src/resources/itemtypemapdata.h @@ -92,6 +92,10 @@ ItemTypeMap itemTypeMap[] = // TRANSLATORS: inventory button N_("Equip"), N_("Unequip") }, + {"card", ItemType::CARD, + // TRANSLATORS: inventory button + N_("Insert"), std::string() + }, {"racesprite", ItemType::SPRITE_RACE, std::string(), std::string() }, |