|
03/11/15, 06:29 PM | #1 |
Stumped By GUILD_ROSTER Changes
So, for some time now I've had a neat feature in ddSK that re-does the whole Guild Roster screen so that members sales data can be shown/ranked in the winder.
But now, for the life of me I can't get the UI to recognize the <Label> controls in individual rows--the data is there, and the text is there, but the controls ain't loading. Prior to 1.6, this is the code I used to add those controls to ZO_GuildRosterList: Code:
ZO_ScrollList_AddDataType(GUILD_ROSTER.list, 2, "ddSKRosterRow", 30, function(control, data) GUILD_ROSTER:SetupGuildMember(control, data) end) Obviously, GUILD_ROSTER is now a mess of keyboard and gamepad changes. Here's the best effort I have to simply adapt to the new Roster classes: Code:
ZO_ScrollList_AddDataType(GUILD_ROSTER_KEYBOARD.list, 2, "ddSKRosterRow", 30, function(control, data) GUILD_ROSTER_MANAGER:SetupRow(control, data) end) I've also updated the XML file so that: Code:
<Control name="ddSKRosterRow" mouseEnabled="true" virtual="true" inherits="ZO_GuildRosterRow"> is now: Code:
<Control name="ddSKRosterRow" mouseEnabled="true" virtual="true" inherits="ZO_KeyboardGuildRosterRow"> What am I missing here? I just need the labels themselves, the fancy things that make the window display text, from my ddSKRosterRow control to show up. |
|
03/11/15, 07:07 PM | #2 |
|
Lua Code:
So you need to hook BuildMasterList on GUILD_ROSTER_MANAGER, and FilterScrollList on GUILD_ROSTER_KEYBOARD. Also for FilterScrollList, I wouldn't replace the function, but call the original and then rewrite all entries' typeId. Or, and this may seem dirty but is nonetheless awesome, don't hook it at all, and make the original create entries with your typeId: Lua Code:
|
03/11/15, 07:56 PM | #3 | |
Code:
function ddShopkeeper.SetupGuildMember(self, control, data) origSetupGuildMember(self, control, data) local UserId = GetControl(control, "DisplayName") local Zone = GetControl(control, "Zone") local Class = GetControl(control, "Class") local Level = GetControl(control, "Level") local Vet = GetControl(control, "Veteran") local Note = GetControl(control, "Note") UserId:SetText(data.sortIndex.." "..data.displayName) local tRosterSales = ddShopkeeper.Ledger.Options.cRosterSales.getFunc() local tRosterPurchases = ddShopkeeper.Ledger.Options.cRosterPurchases.getFunc() local tRosterTax = ddShopkeeper.Ledger.Options.cRosterTax.getFunc() local Sales = GetControl(control, "SalesLabel") local Purchases = GetControl(control, "PurchaseLabel") local Tax = GetControl(control, "TaxLabel") local SalesText = ddShopkeeper.LocalizedNumber(data.sales).." "..zo_iconFormat("esoui/art/currency/currency_gold.dds", 14, 14) local PurchText = ddShopkeeper.LocalizedNumber(data.purchases).." "..zo_iconFormat("esoui/art/currency/currency_gold.dds", 14, 14) local TaxesText = ddShopkeeper.LocalizedNumber(data.tax).." "..zo_iconFormat("esoui/art/currency/currency_gold.dds", 14, 14) So, "SalesText" etc. can easily go to chat with a simple display function ( d(SalesText) ) and it'll post 500 lines of it to chat. Likewise, I can manipulate all the original controls like Vet and Note. But the "Sales", etc., variables, based on a GetControl("MyddSKRosterRowLabelName") function, come up nil. As best I can tell, the issue is that my control(s) never get added like they used to, from this function: Code:
ZO_ScrollList_AddDataType(GUILD_ROSTER_KEYBOARD.list, 2, "ddSKRosterRow", 30, function(control, data) GUILD_ROSTER_MANAGER:SetupRow(control, data) end) |
||
03/11/15, 09:40 PM | #4 | |
|
Btw, you should give that "2" type a name, it'll be easier to find where it's used in the code And final note for tonight. ZO_ScrollList_AddDataType with setup function that calls the base version, and then overriding the base version, is complicated and wrong -- if you're adding data type 2, you should not be changing the setup procedure for data type 1. Instead, provide a function that will call the base setup, and then your additional setup: Lua Code:
|
|
03/11/15, 09:47 PM | #5 | |
|
1. game starting 2. original BuildMasterList 3. original FilterScrollList => all entries have typeId == 1 4. ddSK installs hooks 5. list is shown, row controls are created for type 1 6. ddSK SetupGuildMember wonders where are children for type 2 |
|
03/12/15, 02:35 AM | #6 |
MailBuddy
I've also had similar problems with MailBuddy. ZO_FriendsList was renamed and we've tried to account for it by changing the name in the code, but it still doesn't anchor AT ALL... stumped...
|
|
03/12/15, 08:15 PM | #7 | |
|
||
03/11/15, 07:13 PM | #8 |
I didn't try it and don#t know your addon, so i couldn't test it, but couldn't you just use GUILD_ROSTER_MANAGER:SetupGuildMember() again to add the controls?
|
|
ESOUI » Developer Discussions » General Authoring Discussion » Stumped By GUILD_ROSTER Changes |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|