Moving a control with - ESOUI
Thread Tools Display Modes
Prev Previous Post   Next Post Next
02/01/19, 05:23 PM   #1
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Moving a control with

Hey guys, I need some help with the following task:

I want the icon to be dragable, but only by clicks inside the green square in it's top left corner.

If I apply SetMouseEnabled(true) and SetMovable(true) to the base control, the whole control will react to mouse clicks, not only the green square.

If I apply SetMouseEnabled(true) and SetMovable(true) to the green square, then only the green square reacts to mouse clicks, but the icon does not move with it despite being it's parent element.

This is the XML code:

<!-- Icon aura -->
<Control name="AM_IconAuraControl" virtual="true" clampedToScreen="true">
	<!--<Anchor point="TOPLEFT" relativeTo="AuraMasteryTLW" anchorPoint="TOPLEFT" />-->
		<Control name="$(parent)_Anchor" hidden="true">
			<Dimensions x="12" y="12" />
			<Anchor point="TOPLEFT" relativeTo="$(parent)" anchorPoint="TOPLEFT" />
				<Backdrop name="$(parent)_Backdrop" centerColor="FF00FF00" edgeColor="FF000000" level="2">
					<AnchorFill />
					<Edge edgeSize="1" /> 
				<Label name="$(parent)_LabelCoords" font="$(BOLD_FONT)|16|soft-shadow-thin" color="00FF00" text="400,400">
					<Anchor point="TOP" relativeTo="$(parent)" anchorPoint="TOP" offsetY="-20" />	
		<Backdrop name="$(parent)_Backdrop">
			<AnchorFill />
		<Cooldown name="$(parent)_Cooldown" fillColor="000000BF" horizontalAlignment="TEXT_ALIGN_CENTER" verticalAlignment="TEXT_ALIGN_CENTER">
			<AnchorFill />
		<Label name="$(parent)_Label">
			<Anchor point="TOPLEFT" relativeTo="$(parent)" anchorPoint="TOPLEFT" offsetX="2" offsetY="2" />
			<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" anchorPoint="BOTTOMRIGHT" offsetX="-2" offsetY="-2" />
		<Texture name="$(parent)_Icon">
			<AnchorFill />

Last edited by Letho : 02/01/19 at 05:26 PM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Moving a control with

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off