item prices: always show tooltip when alching if option is enabled
This commit is contained in:
@@ -89,7 +89,7 @@ public interface ItemPricesConfig extends Config
|
|||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "showWhileAlching",
|
keyName = "showWhileAlching",
|
||||||
name = "Show prices while alching",
|
name = "Show prices while alching",
|
||||||
description = "Show the price overlay while using High Alchemy",
|
description = "Show the price overlay while using High Alchemy. Takes priority over \"Hide tooltips on Inventory Items\"",
|
||||||
position = 6
|
position = 6
|
||||||
)
|
)
|
||||||
default boolean showWhileAlching()
|
default boolean showWhileAlching()
|
||||||
|
|||||||
@@ -93,12 +93,13 @@ class ItemPricesOverlay extends Overlay
|
|||||||
final MenuAction action = MenuAction.of(menuEntry.getType());
|
final MenuAction action = MenuAction.of(menuEntry.getType());
|
||||||
final int widgetId = menuEntry.getParam1();
|
final int widgetId = menuEntry.getParam1();
|
||||||
final int groupId = WidgetInfo.TO_GROUP(widgetId);
|
final int groupId = WidgetInfo.TO_GROUP(widgetId);
|
||||||
|
final boolean isAlching = menuEntry.getOption().equals("Cast") && menuEntry.getTarget().contains("High Level Alchemy");
|
||||||
|
|
||||||
// Tooltip action type handling
|
// Tooltip action type handling
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case ITEM_USE_ON_WIDGET:
|
case ITEM_USE_ON_WIDGET:
|
||||||
if (!config.showWhileAlching() || !menuEntry.getOption().equals("Cast") || !menuEntry.getTarget().contains("High Level Alchemy"))
|
if (!config.showWhileAlching() || !isAlching)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -118,7 +119,7 @@ class ItemPricesOverlay extends Overlay
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
case WidgetID.INVENTORY_GROUP_ID:
|
case WidgetID.INVENTORY_GROUP_ID:
|
||||||
if (config.hideInventory())
|
if (config.hideInventory() && !(config.showWhileAlching() && isAlching))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user