Go to Page... |
|
Thread Tools | Display Modes |
|
04-28-23, 06:46 AM | #1 |
Adding a ScrollFrame to a CharacterFrame tab
So I am trying to write my first addon, it would just list a table of results 2 columns on the tab.
My initial idea was to have next and previous buttons to look through the results. But I have since discovered there is a scroll frame, so was wanting to use a scroll frame instead. The table itself will have 1 row added to the results for each day that the character was logged into. A scroll frame should be ok right if it had a lot of data, as in a year or more? Lua Code:
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/ http://wowprogramming.com/FrameXML/UI.xsd"> <Frame name="AMD_TabOnCharacterFrame" parent="CharacterFrame" frameStrata="HIGH" enableMouse="true" movable="true" setallpoints="true" id="4"> <Size x="206" y="580"/> <Frames> <Frame name="$parent_History" parent="AMD_TabOnCharacterFrame"> <Size x="300" y="325"/> <Anchors> <Anchor point="CENTER" relativePoint="CENTER" relativeTo="CharacterFrame"/> </Anchors> <Frames> <Frame name="$parent_ScrollFrame" parent="AMD_TabOnCharacterFrame_History" inherits="UIPanelScrollFrameTemplate"> </Frame> </Frames> <Layers> <Layer level="OVERLAY"> <FontString name="History_Title" parentKey="History_title" inherits="GameFontNormal"> <Color r="1" g="1" b="1" a="1"/> <Anchors> <Anchor point="TOP"> <Offset x="0" y="20"/> </Anchor> </Anchors> </FontString> </Layer> </Layers> </Frame> </Frames> </Frame> </Ui> Code:
Interface/SharedXML/SecureUIPanelTemplates.lua:64: attempt to call method 'SetVerticalScroll' (a nil value) Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:120 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnScrollRangeChanged Code:
Interface/SharedXML/SecureUIPanelTemplates.xml:121 Frame AMD_TabOnCharacterFrame_History_ScrollFrame: Unknown script element OnVerticalScroll |
|
04-28-23, 10:38 AM | #2 |
Lists are complicated until you understand them.
This is a list example created by someone else and loosly based on what I know of your addon. The AppendListItem function is actually creating the the information table that is displayed in the list. XML XML Code:
lua: Lua Code:
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
04-30-23, 04:42 AM | #3 |
This is what I use right now to output the list contents to the frame.
I thought I would just use the same code but change the frame that was the output. Lua Code:
Last edited by AeroMaxxD : 04-30-23 at 05:19 AM. |
|
04-30-23, 05:25 AM | #4 |
On another note I also asked about how to add a tab to the character frame on the official Blizzard forums, someone there responded with the code below.
This is what gave me the idea of a scroll frame, initially, I dismissed it however, and was still going to go with the next and previous buttons, I've since changed my mind. Lua Code:
|
|
WoWInterface » Developer Discussions » General Authoring Discussion » Adding a ScrollFrame to a CharacterFrame tab |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|