• 0

    posted a message on change frame template ?
    ;D yea, it is local, it's just not pasted in the code
    Posted in: Lua Code Discussion
  • 0

    posted a message on change frame template ?
    thank you , both of you!
    hooksecurefunc works good.
    actually I use this, so anything called MultiBarRight:SetPoint(no matter what),
    it will set to bottomright
    local function SetPoint(bar, ...)
         setting = true
         bar:ClearAllPoints()
         bar:SetPoint("BOTTOMRIGHT", UIParent, 0, 5)
         setting = nil
    end
    Posted in: Lua Code Discussion
  • 0

    posted a message on change frame template ?
    thank you for the tips
    3) I dont quite get this one,
    the purporse was to fix the MultiBarRight's position . so anything call MultiBarRight:SetPoint will not change it

    hooksecurefunc(MultiBarRight, "SetPoint", function(bar, ...) ...

    from what I understand , the 1st time MultiBarRight:SetPoint is called,
    both the original function MultiBarRight:SetPoint and the local function SetPoint(bar, ...) will be called,
    and later, this will not stop anything from resetting the frame's position

    I think I'm looking for a right way to disable a method without breaking it
    Posted in: Lua Code Discussion
  • 0

    posted a message on change frame template ?
    many thanks, this works
    MultiBarRight:ClearAllPoints()
    MultiBarRight:SetSize(MultiBarBottomLeft:GetWidth(),MultiBarBottomLeft:GetHeight())
    MultiBarRight:SetPoint("BottomRight",UIParent,"BottomRight",0,5)
    MultiBarRight.SetPoint = function() end
    
    MultiBarLeft:ClearAllPoints()
    MultiBarLeft:SetSize(MultiBarBottomLeft:GetWidth(),MultiBarBottomLeft:GetHeight())
    MultiBarLeft:SetPoint("BottomLeft",MultiBarRight,"TopLeft",0,5)
    
    for i = 1,12 do
    	_G["MultiBarLeftButton"..i]:ClearAllPoints()
    	_G["MultiBarRightButton"..i]:ClearAllPoints()
    	if i == 1 then
    		_G["MultiBarLeftButton"..i]:SetPoint("BottomLeft",0,0)
    		_G["MultiBarRightButton"..i]:SetPoint("BottomLeft",0,0)
    	else
    		_G["MultiBarLeftButton"..i]:SetPoint("Left",_G["MultiBarLeftButton"..tostring(i-1)],"Right",6,0)
    		_G["MultiBarRightButton"..i]:SetPoint("Left",_G["MultiBarRightButton"..tostring(i-1)],"Right",6,0)
    	end
    end
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on change frame template ?
    <Frame name="MultiBarBottomLeft" inherits="HorizontalMultiBar1" parent="MainMenuBar">
    ...
    <Frame name="MultiBarRight" inherits="VerticalMultiBar3" parent="UIParent">
    ...
    these are from blizzard ui MultiActionBars.xml

    the idea is to make MultiBarLeft and MultiBarRight Horizontal
    so what is the right way to do this ? any help would be appreciated
    Posted in: Lua Code Discussion
  • 0

    posted a message on I hope this would help
    let me give you an example,
    saying you want to search "UnitBuff" , you can directly get what you want on the site
    wowprogramming.com/docs/api/UnitBuff
    but for a newbie, I've no idea what the name is. probably "PlayerBuff", "GetPlayerBuff" or anything . so I search "buff" and that gave me too many results on the site
    so that's why it is no difference for you , but make a big difference for me
    Posted in: AddOn HELP!
  • 0

    posted a message on I hope this would help
    sorry , I'm afraid there is no difference for you Mr. big deal
    but it do help me find what I need quickly for me, Newbie

    I'm not locally storing a copy of the API, but I had to store the url like "wowprogramming.com/docs/api/" + Name .
    Internet shortcut does the same ,rt? we all know they copyright the original authors
    Posted in: AddOn HELP!
  • 0

    posted a message on I hope this would help
    I'm sorry I don't know whether it is denied if I do this on my explorer:
    "add to favourite" for each function page on your site, just because I can search them faster. and when I click an item , it just redirect to the page.
    this tool does the same thing. the difference is this one is more clean
    with all my respect , if this do the authors/publisher any injury, I'll erase everything
    Posted in: AddOn HELP!
  • 0

    posted a message on I hope this would help
    sorry , zip filesize must be < 97.7 kb
    I don't know how to upload it
    Posted in: AddOn HELP!
  • 0

    posted a message on I hope this would help
    the ones who's new to wow programing , like me
    I think you may need this:

    2866 api functions in 105 categories,
    3546 widget functions in 39 widget types,
    708 game events,
    all the data are coming from wowprogramming.com,

    this is a C# app, so you need this runtime from microsoft if you can not get it run
    http://www.microsoft.com/download/en/details.aspx?id=17718
    Posted in: AddOn HELP!
  • 0

    posted a message on Making a frame with History scrolling text
    1. you need this
    2.&4. read about this and AceConfig
    3. AceDB , and you need do some research on "CHAT_MSG_BN_WHISPER" & "CHAT_MSG_WHISPER" 2 events, which will fired when you got wisper message
    Posted in: AddOn HELP!
  • 0

    posted a message on FontString on top of Cooldown?
    thank you, Phanx
    yea, I agree that Lua is more readable.
    I've learn lua less than a month , wow api less than 2 weeks.
    I just dont know the method names in lua. But in xml , there is intellisense in the IDE, and that helps. for example in xml I can guess what enableMouse means. but in lua , I have no idea why the setting method is Frame:EnableMouse but not Frame:SetEnableMouse . for God's sake it's not like SetMovable or Set anything else.:confused:
    Posted in: AddOn HELP!
  • 0

    posted a message on FontString on top of Cooldown?
    with the help of Phanx, my first addon is functional.
    I wanna do a little enhancement
    here is the xml
    <Frame name="RR_mainFrame" hidden="true" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="180" y="60" />
    		</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="400" y="-300" />
    			</Anchor>
    		</Anchors>
    		<Frames>
    			<Frame name="[COLOR="Blue"]RR_rsFrame[/COLOR]" hidden="true">
    				<Size>
    					<AbsDimension x="60" y="60" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset x="0" y="0" />
    					</Anchor>
    				</Anchors>
    				<Backdrop bgFile="Interface/Tooltips/UI-Tooltip-Background" edgeFile="Interface/Tooltips/UI-Tooltip-Border" tile="true">
    					<BackgroundInsets>
    						<AbsInset left="1" right="1" top="1" bottom="1" />
    					</BackgroundInsets>
    					<TileSize>
    						<AbsValue val="12" />
    					</TileSize>
    					<EdgeSize>
    						<AbsValue val="12" />
    					</EdgeSize>
    				</Backdrop>
    				<Layers>
    					<Layer level="OVERLAY">
    						<FontString name="[COLOR="Lime"]RR_rsCountString[/COLOR]" inherits="GameFontHighlightLarge" text="1">
    							<Color r="0" g="1" b="0" a="1" />
    							<Size>
    								<AbsDimension x="14" y="20" />
    							</Size>
    							<Anchors>
    								<Anchor point="BOTTOMRIGHT">
    									<Offset x="0" y="0" />
    								</Anchor>
    							</Anchors>
    						</FontString>
    					</Layer>
    				</Layers>
    			</Frame>
    			<Frame name="RR_dsFrame" hidden="true">
    				<Size>
    					<AbsDimension x="60" y="60" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset x="60" y="0" />
    					</Anchor>
    				</Anchors>
    				<Backdrop bgFile="Interface/Tooltips/UI-Tooltip-Background" edgeFile="Interface/Tooltips/UI-Tooltip-Border" tile="true">
    					<BackgroundInsets>
    						<AbsInset left="1" right="1" top="1" bottom="1" />
    					</BackgroundInsets>
    					<TileSize>
    						<AbsValue val="12" />
    					</TileSize>
    					<EdgeSize>
    						<AbsValue val="12" />
    					</EdgeSize>
    				</Backdrop>
    				<Layers>
    					<Layer level="OVERLAY">
    						<FontString name="RR_dsCountString" inherits="GameFontHighlightLarge" text="1">
    							<Color r="0" g="1" b="0" a="1" />
    							<Size>
    								<AbsDimension x="14" y="20" />
    							</Size>
    							<Anchors>
    								<Anchor point="BOTTOMRIGHT">
    									<Offset x="0" y="0" />
    								</Anchor>
    							</Anchors>
    						</FontString>
    					</Layer>
    				</Layers>
    			</Frame>
    		</Frames>
    	</Frame>
    	<Cooldown name="RR_rsFrameCooldown" parent="[COLOR="Blue"]RR_rsFrame[/COLOR]">
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="0" y="0" />
    			</Anchor>
    			<Anchor point="BOTTOMRIGHT">
    				<Offset x="0" y="0" />
    			</Anchor>
    		</Anchors>
    	</Cooldown>

    when the Cooldown animation starts it will cover the FontString on the right bottom. so my question is , how I can make the FontString on top Cooldown in the z-index?
    there is a Database error when I am trying to upload the image. sorry I can not show you the picture
    Posted in: AddOn HELP!
  • 0

    posted a message on how to set spell icon to frame background
    Thank you for your reply, Torhal . I'll keep that in mind.
    Phanx, that helps me. \Thank you . and I love Grid :)
    Posted in: AddOn HELP!
  • 0

    posted a message on how to set spell icon to frame background
    I was trying to set a spell icon to a frame.background
    I have no idea if it is the right way , I'm not quite familiar with ace.
    here is the code
    function TestAddon:OnInitialize()
    	TestAddon:RegisterChatCommand("testaddon", "HandelCommand")
    	mainFrame = CreateFrame("Frame")
    	mainFrame:Hide()
    	mainFrame:SetParent(UIParent)
    	mainFrame:SetHeight(65)
    	mainFrame:SetWidth(65)
    	mainFrame:EnableMouse(true)
    	mainFrame:SetMovable(true)
    	mainFrame:SetPoint("TOPLEFT",400,-300)
    	mainFrame:SetScript("OnMouseDown", function(self,button) if button == "RightButton" and IsControlKeyDown() then self:StartMoving() end end)
    	mainFrame:SetScript("OnMouseUp", function(self,button) if button == "RightButton" then self:StopMovingOrSizing() end end)
    	mainFrame:SetScript("OnUpdate", function(self) TestAddon:Update() end)
    end
    
    function TestAddon:OnEnable()
    	local _,_,dsIcon = GetSpellInfo(49998)
    	--[[
    	mainFrame:SetBackdrop({ bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
    							tile = true, tileSize = 12, edgeSize = 12,
    							insets = { left = 4, right = 4, top = 4, bottom = 4 }})
    	]]
    	mainFrame:SetBackdrop({ bgFile = dsIcon, edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
    							tile = true, tileSize = 12, edgeSize = 12,
    							insets = { left = 4, right = 4, top = 4, bottom = 4 }})
    	mainFrame:SetBackdropColor(0,0,0,1)
    	mainFrame:Show()
    end
    

    everything works so fine except "bgFile = dsIcon"
    this is what I got

    I am trying to do something like this

    any one help?
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.