mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Support both mouse and touch input in GUIs in a single binary (#14146)
This commit is contained in:
parent
4f1dbb127a
commit
32e492837c
5 changed files with 95 additions and 83 deletions
|
@ -152,10 +152,10 @@ void GUIInventoryList::draw()
|
|||
|
||||
// Add hovering tooltip
|
||||
bool show_tooltip = !item.empty() && hovering && !selected_item;
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
// Make it possible to see item tooltips on touchscreens
|
||||
show_tooltip |= hovering && selected && m_fs_menu->getSelectedAmount() != 0;
|
||||
#endif
|
||||
if (m_fs_menu->getPointerType() == PointerType::Touch) {
|
||||
show_tooltip |= hovering && selected && m_fs_menu->getSelectedAmount() != 0;
|
||||
}
|
||||
if (show_tooltip) {
|
||||
std::string tooltip = orig_item.getDescription(client->idef());
|
||||
if (m_fs_menu->doTooltipAppendItemname())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue