aboutsummaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 4784d7314..116688e95 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -2196,6 +2196,8 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
&& m_selected_item->listname == s.listname
&& m_selected_item->i == item_i;
bool hovering = rect.isPointInside(m_pointer);
+ ItemRotationKind rotation_kind = selected ? IT_ROT_SELECTED :
+ (hovering ? IT_ROT_HOVERED : IT_ROT_NONE);
if (phase == 0) {
if (hovering) {
@@ -2238,7 +2240,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
{
drawItemStack(driver, m_font, item,
rect, &AbsoluteClippingRect, m_gamedef,
- selected, hovering, false);
+ rotation_kind);
}
// Draw tooltip
@@ -2284,7 +2286,7 @@ void GUIFormSpecMenu::drawSelectedItem()
if (!m_selected_item) {
drawItemStack(driver, m_font, ItemStack(),
core::rect<s32>(v2s32(0, 0), v2s32(0, 0)),
- NULL, m_gamedef, false, false, true);
+ NULL, m_gamedef, IT_ROT_DRAGGED);
return;
}
@@ -2297,7 +2299,7 @@ void GUIFormSpecMenu::drawSelectedItem()
core::rect<s32> imgrect(0,0,imgsize.X,imgsize.Y);
core::rect<s32> rect = imgrect + (m_pointer - imgrect.getCenter());
- drawItemStack(driver, m_font, stack, rect, NULL, m_gamedef, false, false, true);
+ drawItemStack(driver, m_font, stack, rect, NULL, m_gamedef, IT_ROT_DRAGGED);
}
void GUIFormSpecMenu::drawMenu()
@@ -2434,7 +2436,7 @@ void GUIFormSpecMenu::drawMenu()
// Viewport rectangle on screen
core::rect<s32> rect = imgrect + spec.pos;
drawItemStack(driver, m_font, item, rect, &AbsoluteClippingRect,
- m_gamedef, false, false, false);
+ m_gamedef, IT_ROT_NONE);
}
/*
@@ -2452,7 +2454,7 @@ void GUIFormSpecMenu::drawMenu()
if (!item_hovered) {
drawItemStack(driver, m_font, ItemStack(),
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 */