Thread Tools Display Modes
10-27-10, 06:54 PM   #1
Æxò
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 9
PlayerFrameHealthBar:SetPos()

Hi,

I'm trying to move PlayerFrameHealthBar (after having modified its height) but it does not react to :ClearAllPoints() and :SetPoints(), and stays put whatever I try. Any idea what is blocking it?

I have seen addons (e.g. SuperClassic, here on WoWI) doing it, so I assume it's doable.

Thank you.
  Reply With Quote
10-27-10, 07:44 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
It's SetPoint() not SetPoints()
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-27-10, 07:46 PM   #3
Æxò
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 9
Originally Posted by Seerah View Post
It's SetPoint() not SetPoints()
Well, that's what I used actually, just made a typo here :P

Code:
PlayerFrameHealthBar:ClearAllPoints()
PlayerFrameHealthBar:SetPoint("TOPLEFT", 10, −10)
PlayerFrameHealthBar:SetHeight(32)
  Reply With Quote
10-27-10, 11:05 PM   #4
Æxò
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 9
Well, nevermind. I had to go through some kind of weird script loading via an XML frame… Anyway, it worked.
  Reply With Quote
12-20-10, 11:56 AM   #5
ramono
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1
Would be nice if you'd told us what youve done.

aka, same problem. googled it, ended up here.
  Reply With Quote
12-23-10, 03:35 PM   #6
Æxò
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 9
XML:
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://www.blizzard.com/wow/ui/ 
 ..\..\FrameXML\UI.xsd">
	<Script File="Unitframes.lua"/>
	<Frame name="MovePlayerFrame">
	 <Scripts>
		<OnUpdate>
		 	MovePlayerFrame();
		</OnUpdate>
	 </Scripts>
	</Frame>
</Ui>
LUA:
Code:
function MovePlayerFrame()

	-- Move to CENTER, LEFT
	PlayerFrame:ClearAllPoints()
	PlayerFrame:SetPoint("CENTER", UIParent, "CENTER", -400, 50)
	
end
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » PlayerFrameHealthBar:SetPos()


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