Thread Tools Display Modes
09-01-12, 09:50 AM   #1
r3v4n
A Murloc Raider
Join Date: Jul 2012
Posts: 4
Modifing Blizzard Unitframes via lua-editing

Hey there everyone,

first of all: sorry for my bad English, but it's not my native language

Here's my problem: I want to modify my UI (Blizzard Unitframes) by lua editing. Without using any addon.
I searched the internet and I'm pretty sure, that I've done quiet well for my first ... second time in lua editing:

lua Code:
  1. PlayerFrame:ClearAllPoints() PlayerFrame:SetPoint("center", -175, -140)
  2. TargetFrame:ClearAllPoints() TargetFrame:SetPoint("center", 175, -140)

This should place my player and target frame pretty near the center at the same hight.
But it doesnt.
Target frame is almost(!) placed where it should be and my player frame is just uneffected.

I've activated the "show me lua errors" in game but there are none ...

Can anyone help me with this?
I would be very grateful
  Reply With Quote
09-01-12, 10:02 AM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
There is probably some Blizzard code that causes it to move. If you want I can look it up, but did you know you can right-click the frames to unlock them and move them around? That might be easier.
  Reply With Quote
09-01-12, 10:04 AM   #3
r3v4n
A Murloc Raider
Join Date: Jul 2012
Posts: 4
Originally Posted by Haleth View Post
If you want I can look it up, but did you know you can right-click the frames to unlock them and move them around? That might be easier.
Seriously?

Shame on me
Since when is this possible ...?

Anyhow, that information helped me a lot, thank you very much

Last edited by r3v4n : 09-01-12 at 10:18 AM.
  Reply With Quote
09-01-12, 11:37 AM   #4
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Originally Posted by r3v4n View Post
Seriously?

Shame on me
Since when is this possible ...?

Anyhow, that information helped me a lot, thank you very much
I believe since the beginning of Cataclysm on live servers......

Blizzard didn't make a huge announcement that you could do that, but It was somewhere in the expansion notes.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 09-01-12 at 11:40 AM.
  Reply With Quote
09-03-12, 08:18 PM   #5
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Actually it was implemented in patch 4.1 anyways to get them to move by .lua I found this method works for BobUI causes some taint though still trying to work that out


Lua Code:
  1. --SetPoints
  2.     TargetFrame:ClearAllPoints() TargetFrame:SetPoint(cfg.Targetpoint, cfg.TargetpositionX, cfg.TargetpositionY)
  3.     TargetFrameToT:ClearAllPoints() TargetFrameToT:SetPoint("LEFT",TargetFrame,"Top", -15, -1)
  4.     TargetFrameToTTextureFrameName:ClearAllPoints() TargetFrameToTTextureFrameName:SetPoint("LEFT",TargetFrameToT,"Top", -1, -8)
  5.     --Playerframe fix
  6.     local function ScrewYouPlayerFrame()
  7.         PlayerFrame:ClearAllPoints()
  8.         PlayerFrame:SetPoint(cfg.Playerpoint, cfg.PlayerpositionX, cfg.PlayerpositionY)
  9.     end
  10.     hooksecurefunc("PlayerFrame_AnimateOut", function() PlayerFrame:SetAlpha(0); ScrewYouPlayerFrame() end)
  11.     hooksecurefunc("PlayerFrame_SequenceFinished", function() PlayerFrame:SetAlpha(1); ScrewYouPlayerFrame() end)
  12.     hooksecurefunc("PlayerFrame_UpdateStatus", ScrewYouPlayerFrame)
  13.     --Scaling
  14.     PlayerFrame:SetScale(cfg.UnitFramescale)
  15.     TargetFrame:SetScale(cfg.UnitFramescale)
  16.     ComboFrame:SetScale(cfg.UnitFramescale)
  17.     FocusFrame:SetScale(cfg.UnitFramescale)
__________________
Tweets YouTube Website

Last edited by 10leej : 09-03-12 at 09:32 PM. Reason: adding additional info
  Reply With Quote
09-04-12, 02:02 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by 10leej View Post
Actually it was implemented in patch 4.1 anyways to get them to move by .lua I found this method works for BobUI causes some taint though still trying to work that out
Why don't you just call the same functions that moving the frame using the built-in feature calls? That way, you wouldn't have to hook stuff and taint evertyhing, because the game wouldn't even know the user hadn't dragged the frame into position themselves.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-04-12, 03:39 AM   #7
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
This was lighter on memory, I mean I could do that but at the same time this works fine except for the taint

Also, didn't think about it. Probably will now that you mention it, lmao
__________________
Tweets YouTube Website

Last edited by 10leej : 09-04-12 at 03:42 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Modifing Blizzard Unitframes via lua-editing


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