Thread Tools Display Modes
06-12-11, 04:35 PM   #1
tobindax
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 53
Smile I need code for 1 simple thing if possible, please.

I want to start learning making an addon by editing something simple that already works.

I need code that has a very simple 'window' on the screen (frame?), with 1 single number that is printed, like those you see on those 'world coordinates' addons or "speed meter' addons (a small draggable rectangle).

Also, can such a thing be restricted to lua allone? I do not want to deal with XML. I'm used to 'raw' code in C, C++, perl, bash. Never was confortable with "HTML".

I think I will probably figure out the event code that I will need to draw the number printed.
  Reply With Quote
06-12-11, 05:57 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
As far I know, the only thing that cannot be made in Lua is secure templates.

Just do a search for "coord" in the searchbox on your top right and you should find plenty of addons to play around with.
  Reply With Quote
06-12-11, 08:05 PM   #3
tobindax
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 53
Yeah I figured it's easy with lua alone. As someone with experience in 'raw code', I'm happy to see it's possible to do such things with code alone.

I heard it's also possible to only need /reload if done that way.

btw, I noticed some discrepancies. e.g. SetTextColor and SetShadowColor do not work when used globally (e.g. color does change but if it's used in AddMessage) but I don't know if it's a bug or something I missed.
  Reply With Quote
06-13-11, 12:20 AM   #4
brotherhobbes
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 313
/reload works if you do not add additional files. Even if you have everything in .lua files, if you add a new file or change one of the file names, you'll need to restart WoW.
  Reply With Quote
06-13-11, 06:58 AM   #5
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by tobindax View Post
Yeah I figured it's easy with lua alone. As someone with experience in 'raw code', I'm happy to see it's possible to do such things with code alone.

I heard it's also possible to only need /reload if done that way.

btw, I noticed some discrepancies. e.g. SetTextColor and SetShadowColor do not work when used globally (e.g. color does change but if it's used in AddMessage) but I don't know if it's a bug or something I missed.
Usage: fontstring:SetTextColor(r, g, b)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » I need code for 1 simple thing if possible, please.


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