Go to Page... |
|
Thread Tools | Display Modes |
|
07-03-09, 01:01 AM | #1 |
sending/showing information to frame
hello,
i made a frame which has a background and 1 active button i can send information using out function . but it send them to chat window how can i send inofrmation or just showing texts into my main frame area ? hope i'm clear and this is the right section to post this thank you for your help |
|
07-03-09, 02:58 AM | #2 |
You would need a FontString in your frame to display text.
Can you list your code? |
|
07-03-09, 03:53 AM | #3 |
//this site is mian source : http://fara.webeddie.com/frames/
AD.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="AD.lua"/> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Frame name="AD_GeneralScripts" hidden="true"> <Scripts> <OnLoad> AD_OnLoad(); </OnLoad> </Scripts> </Frame> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Frame name="AD" hidden="true" toplevel="true" virtual="true" frameStrata="DIALOG" parent="UIParent"> <Size> <!-- dimension of the Frame seen on the screen --> <AbsDimension x="200" y="200"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true"> <TileSize> <AbsValue val="32"/> </TileSize> <EdgeSize> <AbsValue val="32"/> </EdgeSize> <BackgroundInsets> <AbsInset left="11" right="12" top="12" bottom="11"/> </BackgroundInsets> </Backdrop> </Frame> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- we now create this frame, which innherits all of the virtual frame "AD" --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Frame name="AD1" hidden="true" movable="true" inherits="AD"> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Layers> <Layer level="ARTWORK"> <FontString name="$parent_Text" inherits="GameFontNormal" text="Click to Move"> <Anchors><Anchor point="CENTER"/></Anchors> </FontString> </Layer> </Layers> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Scripts> <OnMouseDown> AD1:StartMoving(); </OnMouseDown> <OnMouseUp> AD1:StopMovingOrSizing(); </OnMouseUp> <OnDragStop> AD1:StopMovingOrSizing(); </OnDragStop> </Scripts> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> <Frames> <Button name="AD1_Button" inherits="UIPanelButtonTemplate" text="Hello" id="4"> <Size> <AbsDimension x="80" y="22"/> </Size> <Anchors> <Anchor point="TOP" relativeTo="AD1" /> </Anchors> <Scripts> <OnClick> AD_OnClick(arg1)</OnClick> </Scripts> </Button> </Frames> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> </Frame> <!-- ///////////////////////////////////////////////////////////////////////////////////////// --> </Ui> AD.lua : Code:
function out(text) DEFAULT_CHAT_FRAME:AddMessage(text) UIErrorsFrame:AddMessage(text, 1.0, 1.0, 0, 1, 10) end function AD_OnLoad() out("AD: OnLoad"); SLASH_AD1 = "/adad"; SLASH_AD2 = "/ad"; SlashCmdList["AD"] = function(msg) AD_SlashCommandHandler(msg); end for i=1,20 do local frame = getglobal("AD" .. i) if (frame) then tinsert(UISpecialFrames, frame) end end end function AD_SlashCommandHandler(msg) out("AD: " .. msg) if (msg == "0") then ReloadUI(); end AD_Toggle(msg); end function AD_Toggle(num) local frame = getglobal("AD" .. num) if (frame) then if( frame:IsVisible() ) then frame:Hide(); else frame:Show(); end end end function AD_OnClick(arg1) id = this:GetID(); out("AD: OnClick: " .. this:GetName() .. " ,ID: " .. id .. " ,Button:" ..arg1); thank you |
|
07-03-09, 04:39 AM | #4 |
So what is this addon supposed to do?
|
|
07-03-09, 11:43 AM | #5 |
i understand your asking
the aim of this addon is not to do somthing but simmply understand how addons work it's just a way of learning so if you have any idea to make me understad how send texts or infomations to this frame , well it would be appreciated |
|
07-03-09, 12:37 PM | #6 |
i think one solution could be
make a frame using lua functions : CreateFrame(..) |
|
WoWInterface » Developer Discussions » General Authoring Discussion » sending/showing information to frame |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|