View Single Post
  #7  
Unread 07-09-2012, 06:20 PM
D.H1cks's Avatar
D.H1cks D.H1cks is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 162
Ok, tried it out and here is what I found to make it work properly.

First, added the line following line to the very start of the IconWindow.lua file:

Code:
import "Deusdictum.UI";
Added the following right before the 'wIcon.MouseEnter = function (sender, args)' line:

Code:
wIcon.DragBar = Deusdictum.UI.DragBar( wIcon, "R.A. Icon" );
Completely removed the MouseMove function. Then added the following in its place:


Code:
	wIcon.PositionChanged = function(sender, args )
		SETTINGS.ICONX, SETTINGS.ICONY = wIcon:GetPosition();

		if SETTINGS.ICONX < 0 then SETTINGS.ICONX = 0 end
		if SETTINGS.ICONX > (SCREENWIDTH-32) then SETTINGS.ICONX = (SCREENWIDTH-32) end
		if SETTINGS.ICONY < 0 then SETTINGS.ICONY = 0 end
		if SETTINGS.ICONY > (SCREENHEIGHT-32) then SETTINGS.ICONY = (SCREENHEIGHT-32) end

		wIcon:SetPosition(SETTINGS.ICONX,SETTINGS.ICONY);
	end
Everything appears to be working.
Reply With Quote