These forums are in read-only mode. Please see this news post for more information.

New forums can be found here

Go Back   WowAce Forums > General > Lua Code Discussion
Lua Code Discussion You scared? Terrified. Mortified. Petrified. Stupefied... by [coding].

Thread Tools
Old 04-10-2012   #11
Seal Cub Clubbing Club
Phanx's Avatar
Join Date: May 2005
Posts: 8,483
Default Re: WorldStateAlwaysUpFrame/AlwaysUpFrame String/Frame alignment

I'd leave the vertical position alone (eg. still anchor it by its TOP to the TOP of the parent frame) and just change the horizontal offset to 0:

hooksecurefunc("WorldStateAlwaysUpFrame_Update", function()
	WorldStateAlwaysUpFrame:SetPoint("TOP", UIParent, "TOP", 0, -40)

	local _, _, _, _, y = AlwaysUpFrame1:GetPoint()
	AlwaysUpFrame1:SetPoint("TOP", WorldStateAlwaysUpFrame, "TOP", 0, y)

	for i = 1, NUM_ALWAYS_UP_UI_FRAMES do
		local frame = _G["AlwaysUpFrame"..i]
		local text = _G["AlwaysUpFrame"..i.."Text"]
		text:SetPoint("CENTER", frame, "CENTER", 0, 0)
		local icon = _G["AlwaysUpFrame"..i.."Icon"]
		icon:SetPoint("RIGHT", text, "LEFT", -5, 0)

		local dynamicIcon = _G["AlwaysUpFrame"..i.."DynamicIconButton"]
		dynamicIcon:SetPoint("LEFT", text, "RIGHT", 5, 0)
Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge
Troubleshoot an addon | Turn any code into an addon | More addon resources
Need help with your code? Attach or paste your whole, real files.
Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead!
Phanx is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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

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

Forum Jump

All times are GMT. The time now is 03:24 PM.