Update KTK, fix tooltips
This commit is contained in:
@@ -151,28 +151,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ReadOnlySeString? Tooltip {
|
|
||||||
get;
|
|
||||||
set {
|
|
||||||
field = value;
|
|
||||||
switch (value) {
|
|
||||||
case { IsEmpty: false } when !TooltipRegistered:
|
|
||||||
AddEvent(AtkEventType.DragDropRollOver, ShowTooltip);
|
|
||||||
AddEvent(AtkEventType.DragDropRollOut, HideTooltip);
|
|
||||||
|
|
||||||
TooltipRegistered = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case null when TooltipRegistered:
|
|
||||||
RemoveEvent(AtkEventType.DragDropRollOver, ShowTooltip);
|
|
||||||
RemoveEvent(AtkEventType.DragDropRollOut, HideTooltip);
|
|
||||||
|
|
||||||
TooltipRegistered = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DragDropInsertHandler(AtkEventListener* thisPtr, AtkEventType eventType, int eventParam, AtkEvent* atkEvent, AtkEventData* atkEventData) {
|
private void DragDropInsertHandler(AtkEventListener* thisPtr, AtkEventType eventType, int eventParam, AtkEvent* atkEvent, AtkEventData* atkEventData) {
|
||||||
atkEvent->SetEventIsHandled();
|
atkEvent->SetEventIsHandled();
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class TextInputWithHintNode : SimpleComponentNode {
|
|||||||
TexturePath = "ui/uld/CircleButtons.tex",
|
TexturePath = "ui/uld/CircleButtons.tex",
|
||||||
TextureCoordinates = new Vector2(112.0f, 84.0f),
|
TextureCoordinates = new Vector2(112.0f, 84.0f),
|
||||||
TextureSize = new Vector2(28.0f, 28.0f),
|
TextureSize = new Vector2(28.0f, 28.0f),
|
||||||
Tooltip = new SeStringBuilder()
|
TextTooltip = new SeStringBuilder()
|
||||||
.Append("Supports Regex Search")
|
.Append("Supports Regex Search")
|
||||||
.AppendNewLine()
|
.AppendNewLine()
|
||||||
.Append("Start input with '$' to search by description")
|
.Append("Start input with '$' to search by description")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using AetherBags.Helpers;
|
|||||||
using AetherBags.Inventory;
|
using AetherBags.Inventory;
|
||||||
using AetherBags.Nodes.Layout;
|
using AetherBags.Nodes.Layout;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||||
using KamiToolKit.Classes;
|
using KamiToolKit.Classes;
|
||||||
using KamiToolKit.Nodes;
|
using KamiToolKit.Nodes;
|
||||||
@@ -74,7 +75,7 @@ public class InventoryCategoryNode : SimpleComponentNode
|
|||||||
|
|
||||||
_categoryNameTextNode.String = _fullHeaderText;
|
_categoryNameTextNode.String = _fullHeaderText;
|
||||||
_categoryNameTextNode.TextColor = value.Category.Color;
|
_categoryNameTextNode.TextColor = value.Category.Color;
|
||||||
_categoryNameTextNode.TooltipString = value.Category.Description;
|
_categoryNameTextNode.TextTooltip = value.Category.Description;
|
||||||
|
|
||||||
UpdateItemGrid();
|
UpdateItemGrid();
|
||||||
RecalculateSize();
|
RecalculateSize();
|
||||||
@@ -209,7 +210,7 @@ public class InventoryCategoryNode : SimpleComponentNode
|
|||||||
CreateInventoryDragDropNode);
|
CreateInventoryDragDropNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private InventoryDragDropNode CreateInventoryDragDropNode(ItemInfo data)
|
private unsafe InventoryDragDropNode CreateInventoryDragDropNode(ItemInfo data)
|
||||||
{
|
{
|
||||||
InventoryItem item = data.Item;
|
InventoryItem item = data.Item;
|
||||||
|
|
||||||
@@ -228,16 +229,18 @@ public class InventoryCategoryNode : SimpleComponentNode
|
|||||||
},
|
},
|
||||||
IsClickable = true,
|
IsClickable = true,
|
||||||
OnEnd = _ => System.AddonInventoryWindow.ManualInventoryRefresh(),
|
OnEnd = _ => System.AddonInventoryWindow.ManualInventoryRefresh(),
|
||||||
OnPayloadAccepted = (n, p) => OnPayloadAccepted(n, p, data),
|
OnPayloadAccepted = (node, payload) => OnPayloadAccepted(node, payload, data),
|
||||||
OnRollOver = n =>
|
OnRollOver = node =>
|
||||||
{
|
{
|
||||||
BeginHeaderHover();
|
BeginHeaderHover();
|
||||||
n.ShowInventoryItemTooltip(item.Container, item.Slot);
|
node.ShowInventoryItemTooltip(item.Container, item.Slot);
|
||||||
},
|
},
|
||||||
OnRollOut = n =>
|
OnRollOut = node =>
|
||||||
{
|
{
|
||||||
EndHeaderHover();
|
EndHeaderHover();
|
||||||
n.HideTooltip();
|
|
||||||
|
ushort addonId = RaptureAtkUnitManager.Instance()->GetAddonByNode(node)->Id;
|
||||||
|
AtkStage.Instance()->TooltipManager.HideTooltip(addonId);
|
||||||
},
|
},
|
||||||
ItemInfo = data
|
ItemInfo = data
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
Submodule KamiToolKit updated: 6499c4c309...9519b07c8d
Reference in New Issue
Block a user