Hello!
First of all: My deep respect to all you who already programmed an Addon and thank you for your great work!
You inspired me to try programming myself, even though I didn't have ANY idea of XML, LUA or ANY programming language at all (i still don't get it -_-).
To cut things short: I sat down with all guidance gained and tried programming an Addon which would add a button to the UI that could be pressed to set "focus" on the current target or does nothing if the player didn't have a target. If pressed again the player would "clear" his "focus".
After hours messing with XML and Photoshop (completing the needed graphics and setting up the XML file) I finally started to work on (an until then empty) LUA file and though:
"Oookeeh. All you need is the proper API function and then find out how it works. Let's search WoWWiki for the API-List."
"Aaah, there it is. FocusUnit("unit") - Perfect! ....... What does "PROTECTED" mean?"
"AIIIEEE!!! Does that mean I can't program the button, because of some stupid bots?!?"
"AAAIIIIIEEEE!!! All my labor was in vain!?!?"
"Wait a second - there is a link to 'API Secure Templates'."
"...."
".... I don't get it." *bursts into tears*
Although my tears have dried by now, I still don't have the slightest idea how to go on with the addon - supposed i CAN continue!
My question would be: Is it possible to make the Addon I planned? How do I use the SecureUnitButtonTemplate? I couldn't make that out from WoWWiki alone.
I'm sorry to bother you all with my inferiority, but I just didn't want the whole day to go to waste. Thank you for the trouble reading my post. >_<
PS: I don't know wether this interests or bugs you but here is the XML I made so far.
<Script file="FocusEye.lua"/>
<Button name="FocusButton" parent="UIParent" toplevel="true" hidden="false" enableMouse="true" movable="true">
<NormalTexture file="Interface\AddOns\FocusEye\Focussed"/>
<DisabledTexture file="Interface\AddOns\FocusEye\Clear"/>
<Size>
<AbsDimension x="20" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT"/>
<Offset>
<AbsDimension x="-200" y="-200"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
FocusToggle();
</OnClick>
</Scripts>
</Button>
|
The LUA didn't develop at all, since I don't know which function to use/since I'm afraid everything was good for nothing...
function FocusToggle()
if
elseif
end
end
|
Lousy, right? Sorry to get on your nerves.
PPS: Sorry about my warped english!