Skip to content

Commit

Permalink
Fix calculation of selected item (for not drawing it) in formspec
Browse files Browse the repository at this point in the history
The previous code did not work when the list did not start at index 0
of the inventory list (issue #779).
  • Loading branch information
kahrl committed Jun 17, 2013
1 parent 816ffa9 commit c8ed61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guiFormSpecMenu.cpp
Expand Up @@ -698,7 +698,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase)
bool selected = m_selected_item
&& m_invmgr->getInventory(m_selected_item->inventoryloc) == inv
&& m_selected_item->listname == s.listname
&& m_selected_item->i == i;
&& m_selected_item->i == item_i;
bool hovering = rect.isPointInside(m_pointer);

if(phase == 0)
Expand Down

0 comments on commit c8ed61b

Please sign in to comment.