Unfortunately, changing the loop counter to 16 and the FauxScrollFrame_Update parameters to 50,16,12 didn't make a blind bit of difference.
The Splash screen is still showing it's 6 items as before, no difference whatsoever. And the profile screen is still showing nother except the scrollbar and the scroll frame border. None of the individual text lines on the profile are showing at all.
This is now the changed blocks of code:
Lua Code:
------------------------------------------------------------------------------
-- Scroll Frame Update Routine
------------------------------------------------------------------------------
function XrystalUI_ProfileList_Update(self)
local offset = FauxScrollFrame_GetOffset(self)
FauxScrollFrame_Update(self,50,16,12)
self.List = self.List or {}
if #self.List == 0 then return end
if not addonData.profileManager then return end
local profiles = addonData.profileManager:ListProfiles()
if not profiles then return end
for i = 1,16 do
local idx = offset + i
if idx < 50 + 1 and profiles[idx] then
self.List[i]:SetText("Content " .. idx)--(profiles[idx])
self.List[i]:Show()
else
self.List[i]:SetText("Empty " .. idx)--("")
self.List[i]:Show()
end
print(self.List[i]:GetText()) -- This display's "Content 1" and then several lines of "Empty x"
end
end
------------------------------------------------------------------------------
-- Scroll Frame OnLoad Routine
------------------------------------------------------------------------------
function XrystalUI_ProfileList_OnLoad(self)
self.ScrollFrame.List = {}
self.ScrollBar = self.ScrollFrame.ScrollBar
for i = 1,16 do
self.ScrollFrame.List[i] = self:CreateFontString(nil,"OVERLAY","XrystalUI_ScrollingText")
self.ScrollFrame.List[i]:SetWidth(self.ScrollFrame:GetWidth() - 25)
self.ScrollFrame.List[i]:SetHeight(12)
if i == 1 then
self.ScrollFrame.List[i]:SetPoint("TOPLEFT",self.ScrollFrame,"TOPLEFT",5,-5)
else
self.ScrollFrame.List[i]:SetPoint("TOPLEFT",self.ScrollFrame.List[i - 1],"BOTTOMLEFT",0,0)
end
self.ScrollFrame.List[i]:SetJustifyV("TOP")
self.ScrollFrame.List[i]:SetJustifyH("LEFT")
end
self.ScrollBar:SetValue(0) -- go to top
XrystalUI_ProfileList_Update(self.ScrollFrame) -- update list
end
Lua Code:
------------------------------------------------------------------------------
-- Fill the font strings with information to display in the scroll frame
------------------------------------------------------------------------------
function XrystalUI_SplashScroll_Update(self)
local offset = FauxScrollFrame_GetOffset(self)
FauxScrollFrame_Update(self,50,16,12)
self.List = self.List or {}
if #self.List == 0 then return end
if not addonData.versionHistory then return end
local versionHistory = addonData.versionHistory
if not versionHistory then return end
for i = 1,16 do
local idx = offset + i
if idx < 50 + 1 and versionHistory[idx] then
self.List[i]:SetText(versionHistory[idx].Version .. " : " .. versionHistory[idx].Content)
self.List[i]:Show()
else
self.List[i]:SetText("")
self.List[i]:Hide()
end
end
end
------------------------------------------------------------------------------
-- Create Font Strings
------------------------------------------------------------------------------
function XrystalUI_SplashUpdates_OnLoad(self)
self.ScrollFrame.List = {}
self.ScrollBar = self.ScrollFrame.ScrollBar
for i = 1,16 do
self.ScrollFrame.List[i] = self:CreateFontString(nil,"OVERLAY","XrystalUI_ScrollingText")
self.ScrollFrame.List[i]:SetWidth(self.ScrollFrame:GetWidth() - 25)
self.ScrollFrame.List[i]:SetHeight(12)
if i == 1 then
self.ScrollFrame.List[i]:SetPoint("TOPLEFT",self.ScrollFrame,"TOPLEFT",5,-5)
else
self.ScrollFrame.List[i]:SetPoint("TOPLEFT",self.ScrollFrame.List[i - 1],"BOTTOMLEFT",0,0)
end
self.ScrollFrame.List[i]:SetJustifyV("TOP")
self.ScrollFrame.List[i]:SetJustifyH("LEFT")
end
self.ScrollBar:SetValue(0) -- go to top
XrystalUI_SplashScroll_Update(self.ScrollFrame) -- update list
end
As you can see they are almost identical. So, should work in an almost identical manner but it doesn't.
Could this be caused by how the Options screen works with those special config panel functions ?
Lua Code:
------------------------------------------------------------------------------
-- Define the config frame
------------------------------------------------------------------------------
function XrystalUI_Config_ProfileManager_OnLoad(panel)
-- Set the name for the Category for the Panel
panel.name = addonData.Translate("Profile Manager")
-- the panel.name value of the parent configuration panel, used to display a hierarchical category tree.
-- If the parent panel is not specified or does not exist, the panel is displayed as a top-level panel
panel.parent = XrystalUI_Options.name
-- called when the player presses the Okay button, indicating that settings should be saved.
panel.okay = function(self) ClosePanel(self) end
-- called when the player presses the Cancel button, indicating that changes made should be discarded
panel.cancel = function(self) CancelOrLoadPanel(self) end
-- called when the frame is initially displayed, and after requesting the default values to be restored
panel.refresh = function(self) RefreshPanel(self) end
-- called when the player presses the Defaults button, indicating that default settings for the addon should be restored
panel.default = function(self) DefaultPanel(self) end
-- Add the panel to the Interface Options
InterfaceOptions_AddCategory(panel)
end
Panel Functions - At present only the title is updated .. I tried updating the Scroll Frame here but it didn't make a difference either.
Lua Code:
local function ClosePanel(panel)
UpdateVariables(panel)
end
local function CancelOrLoadPanel(panel)
end
local function RefreshPanel(panel)
panel.Title:SetText(addonData.Translate("Profile Manager"))
end
local function DefaultPanel(panel)
end