Go to Page... |
|
Thread Tools | Display Modes |
|
10/29/14, 03:19 PM | #1 |
Probably a very Simple XML question but need some help here
This is just a part of what I'm working on. It's pretty simple. I'm just trying to get this to look like a window with some information in it covering QuestLurker. So people can look at each zone I have in there and just be able to plan ahead if they want. Here is my xml so far and if you'll scroll down passed it you'll see how I want it to appear on the window.
xml Lua Code:
How I would like it to look. However I may have to make it where you can scroll down the window. I don't really know the tags to scroll and to set this to look nice and neat. It would help to have a sample of the code with just the Aldmeri Dominion zone and Daggerfall Covenant. This should give me enough understanding on how to put this much text on a window in the game. If you know how to make the window scroll it would help a lot as well. This is the first part I plan on hiding this when someone starts there game and they can just type a simple slash command to pull it up and down anytime they want to look at it. QuestLurkerBook Aldmeri Dominion *Khenarthis Roost: 11 *Auridon: 51 *Grahtwood: 44 *Greenshade: 50 *Malabal Tor: 45 *Reaper's March: 60 Daggerfall Covenant *Stros M'Kai: 15 *Betnikh: 9 *Glenumbra: 67 *Stormhaven: 70 *Rivenspir: 48 *Alik'r Desert: 53 *Bangkorai: 47 Ebonheart Pact *Bleakrock Isle: 12 *Bal Foyen: 9 *Stonefalls: 76 *Deshaan: 67 *Shadowfen: 64 *Eastmarch: 52 *The Rift: 73 Quest for all factions *Coldharbour: 32 *Craglorn: 18 *Cyrodill: 566 Quest by Guild *Fighters Guild: 5 *Mages Guild: 8 *Undaunted: Unknown |
|
10/29/14, 04:22 PM | #2 |
If I have to make it only using the XML, it would look like this:
Lua Code:
However it is not a good idea to have too much LUA code in XML (it's hard to catch bugs in there), so it would be probably better if you in OnInitialize call some function instead of direct using of lua code. In my example I have used control which inherits ZO_ScrollContainer template. It will add scrollable window with scroll bar, so you do not need to create everything on your own. Just remember if you use this template, all controls inside should have parent and anchor set to <container_name>.."ScrollChild". If you want to force line break in label control use new line character - "\n". I have created table from your text and then it is concatenated using the table.concat with new line character separator. So the concatenated string is something like "Aldmeri Dominion\n*Khenarthis Roost: 11\n*Auridon: 51..." (this is just a start of the string). Preview: Last edited by Garkin : 10/29/14 at 04:27 PM. |
|
10/29/14, 05:51 PM | #3 |
Ok I see how to do the main text now in the window. I've tried a few different things trying to put a title above Aldmer Dominion. I wanted to center it above Aldmeri Dominion with a space between. The best I've gotten so far is in my xml below. I've tried to do it with another label but that cancels things out. I'm still playing around with it right now.
Lua Code:
|
|
10/29/14, 08:04 PM | #4 |
You don't have to use just one label, you can use how many controls you want. Lets make labels in LUA.
Modified XML without label: xml Code:
And to the lua add function which will create labels. Each label can have set different font, alignment, color. Make sure that you call that function after addon is initialized, so for example from the EVENT_ADD_ON_LOADED. In this example I'm calling BookInit() from the slash command which toggles visibility of the main window. Lua Code:
Here is preview: |
|
10/30/14, 08:19 AM | #5 |
I wanted to test out the code and play around with it however I'm getting this error. I'm pretty sure part of it might be my slash command I been trying to figure out slash commands but I just can't seem to wrap my mind around the tutorial that they have. So with that in mind the only code I'm using is the xml and lua you suggested last. Before that was the other xml which had everything in it. I was able to play around with that one and understand it. Also I haven registered an event. When I load the addon I get no error but when I type /qlb is when I get the error below.
user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: attempt to index a nil value stack traceback: user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: in function 'AddLine' user:/AddOns/QuestLurker/QuestLurkerBook.lua:40: in function 'BookInit' user:/AddOns/QuestLurker/QuestLurkerBook.lua:83: in function 'fn' EsoUI/Ingame/SlashCommands/SlashCommands.lua:110: in function 'DoCommand' EsoUI/Ingame/ChatSystem/ChatSystem.lua:1850: in function 'ChatSystem:SubmitTextEntry' EsoUI/Ingame/ChatSystem/ChatSystem.lua:2679: in function 'ZO_ChatTextEntry_Execute' 14406795741938050902:3: in function '(main chunk)' (tail call): ? |
|
10/30/14, 03:09 PM | #6 | |
I have tested the code in modified version of your addon, this is the full copy of code I have used to create preview image: QuestLurker.txt: Code:
## APIVersion: 100009 ## Title: |cFFFFB0QuestLurker|r 1.5 ## Description: QuestLurker lets you know how many quest are in the current zone you are in. This Addon will work great with other addons that let you know what quests you have finished. ## Author: |c00C000Zireko & KatKat42|r ## Version: 1.5 ## SavedVariables: Que_Variables QuestLurker.xml QuestLurker.lua Xml Code:
QuestLurker.lua: Lua Code:
Last edited by Garkin : 10/30/14 at 03:20 PM. |
||
ESOUI » Developer Discussions » General Authoring Discussion » Probably a very Simple XML question but need some help here |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|