-
Posted by Xers on Tue, 06 Jul 2010 12:17:24
Hello everybody
I've got another question for you :)
Is it possible to prevent a frame to be dragged out of the window ?
here is my code
<Frame name="Frame1" parent="UIParent" enableMouse="true" movable="true">
<Size x="0" y="0"/> <Layers> <Layer level="OVERLAY"> <FontString name="$parent_Title" parentKey="title" inherits="GameFontNormal" text="XRS-Addon Pack"> <Anchors> <Anchor point="TOP"> <Offset x="0" y="0"/> </Anchor> </Anchors> </FontString> </Layer> <Layer level="BORDER"> <Texture file="Interface\BarberShop\UI-Barbershop"> <Anchors> <Anchor point="TOPLEFT"/> </Anchors> </Texture> </Layer> </Layers> <Scripts> <OnLoad> self:RegisterForDrag("LeftButton") </OnLoad> <OnDragStart> self:StartMoving() </OnDragStart> <OnDragStop> self:StopMovingOrSizing() </OnDragStop> </Scripts> </Frame>
thanks in advance
Xers
-
Posted by jnwhiteh on Tue, 06 Jul 2010 13:04:10
You can add clampedToScreen="true" to the XML definition.
-
Posted by Xers on Tue, 06 Jul 2010 13:13:32
great I will try this when I'm back at home :)