08-26-22, 06:53 AM | #1 |
Drag'm drop and tooltip conflict
The goal is to create a very simple addon able to keep track of the materials I want to farm. ATM, however, there are two contrasting effects: if I enable drag'n drop in the buttons (drag the item from the bag to the button, in order to keep track of it), the object tooltip is not displayed. By setting the "hidden" parameter to "true" in XML code, the tooltip becomes visible but it is no longer possible to drag 'n dop.
Is it possible to resolve this conflict? LUA code: Lua Code:
XML code: Code:
<Button name="UnitFarm_IconTemplate" virtual="true" enableMouse="true" enableKeyboard="true"> <Size> <AbsDimension x="48" y="48"/> </Size> <Layers> <!-- <Layer level="HIGHLIGHT"> <Texture name="$parentHighlight" parentKey="highlight" file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD" setAllPoints="true"> <Size> <AbsDimension x="30" y="30"/> </Size> </Texture> </Layer> --> <Layer level="ARTWORK"> <Texture name="$parentIcon" parentKey="texture" file="Interface\PaperDoll\UI-Backpack-EmptySlot.blp" setAllPoints="true"> <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"/> </Texture> </Layer> <Layer level="OVERLAY"> <FontString name="$parentCharge" parentKey="charge" inherits="GameFontNormal" justifyH="RIGHT"> <Anchors> <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT"> <Offset> <AbsDimension x="-2" y="2"/> </Offset> </Anchor> </Anchors> </FontString> </Layer> </Layers> <Scripts> <OnLoad> self:RegisterForDrag("LeftButton"); </OnLoad> <OnDragStart> self:GetParent():StartMoving(); </OnDragStart> <OnDragStop> UnitFarm:OnDragStop(self, button); </OnDragStop> <OnMouseDown> UnitFarm_ButtonOnMouseDown(self, button); </OnMouseDown> <OnHide> self:GetParent():StopMovingOrSizing(); </OnHide> </Scripts> <Frames> <Frame name="$parent_UnitFarmDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true" hidden="true"> <Anchors> <Anchor point="TOP"/> </Anchors> <Scripts> <OnLoad> UnitFarm_DropDownOnLoad(self) </OnLoad> <OnShow> UnitFarm_DropDownOnLoad(self) </OnShow> </Scripts> </Frame> <Frame name="$parentTooltip" parentKey="tooltip" enableMouse="true" setAllPoints="true" hidden="true"/> </Frames> <!-- <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/> --> </Button> Last edited by Benalish : 08-26-22 at 10:28 AM. |
|
WoWInterface » Developer Discussions » Lua/XML Help » Drag'm drop and tooltip conflict |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|