This commit is contained in:
Maksim Gamarnik 2016-02-09 00:52:07 +02:00
commit a54e288ff1
3 changed files with 6 additions and 13 deletions

View File

@ -2200,8 +2200,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
(hovering ? IT_ROT_HOVERED : IT_ROT_NONE); (hovering ? IT_ROT_HOVERED : IT_ROT_NONE);
if (phase == 0) { if (phase == 0) {
if (hovering) if (hovering) {
item_hovered = true; item_hovered = true;
driver->draw2DRectangle(m_slotbg_h, rect, &AbsoluteClippingRect); driver->draw2DRectangle(m_slotbg_h, rect, &AbsoluteClippingRect);
} else { } else {
@ -2242,7 +2241,6 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
drawItemStack(driver, m_font, item, drawItemStack(driver, m_font, item,
rect, &AbsoluteClippingRect, m_gamedef, rect, &AbsoluteClippingRect, m_gamedef,
rotation_kind); rotation_kind);
rect, &AbsoluteClippingRect, m_gamedef);
} }
// Draw tooltip // Draw tooltip
@ -2456,7 +2454,7 @@ void GUIFormSpecMenu::drawMenu()
if (!item_hovered) { if (!item_hovered) {
drawItemStack(driver, m_font, ItemStack(), drawItemStack(driver, m_font, ItemStack(),
core::rect<s32>(v2s32(0, 0), v2s32(0, 0)), core::rect<s32>(v2s32(0, 0), v2s32(0, 0)),
NULL, m_gamedef, false, true, false); NULL, m_gamedef, IT_ROT_HOVERED);
} }
/* TODO find way to show tooltips on touchscreen */ /* TODO find way to show tooltips on touchscreen */
@ -2978,7 +2976,7 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
else if (event.TouchInput.touchedCount == 2) { else if (event.TouchInput.touchedCount == 2) {
dont_send_event = true; dont_send_event = true;
} }
else if (event.TouchInput.touchedCount > 4) { else if (event.TouchInput.touchedCount > 5) {
errorstream errorstream
<< "GUIFormSpecMenu::preprocessEvent to many multitouch events " << "GUIFormSpecMenu::preprocessEvent to many multitouch events "
<< event.TouchInput.touchedCount << " ignoring them" << std::endl; << event.TouchInput.touchedCount << " ignoring them" << std::endl;

View File

@ -143,7 +143,6 @@ class GUIFormSpecMenu : public GUIModalMenu
{ {
} }
ImageDrawSpec(const std::string &a_name, ImageDrawSpec(const std::string &a_name,
v2s32 a_pos, v2s32 a_geom):
const std::string &a_item_name, const std::string &a_item_name,
const v2s32 &a_pos, const v2s32 &a_geom): const v2s32 &a_pos, const v2s32 &a_geom):
name(a_name), name(a_name),
@ -503,4 +502,3 @@ public:
}; };
#endif #endif

View File

@ -452,11 +452,8 @@ scene::IMesh *getItemMesh(IGameDef *gamedef, const ItemStack &item)
scene::IMesh *mesh; scene::IMesh *mesh;
// If wield_image is defined, it overrides everything else // If inventory_image is defined, it overrides everything else
if (def.wield_image != "") { if (def.inventory_image != "") {
mesh = getExtrudedMesh(tsrc, def.wield_image);
return mesh;
} else if (def.inventory_image != "") {
mesh = getExtrudedMesh(tsrc, def.inventory_image); mesh = getExtrudedMesh(tsrc, def.inventory_image);
return mesh; return mesh;
} else if (def.type == ITEM_NODE) { } else if (def.type == ITEM_NODE) {