View Feature Request
2 Feature requests
Feature #: 39
File: LibSimpleWidgets
Date: 04-21-12 10:19 AM
By: soulwhip
Status: Under Review
Hi Doxxx,

First thanks for the addon. I'm wondering why you prevent a item from being selected twice? If you can comment this out, I use it to expand or collapse a tree menu I've built.

Code:
local function SetSelectedIndex(self, index, silent)

  if index == self.selectedIndex then
	--Commented this line so we can select the same item twice and trigger tree menu collapses and expansions
    --return
  end
Also in function Library.LibSimpleWidgets.Layout(configTable, parent) can you replace this line

Code:
widget:SetPoint("TOPLEFT", parent, "TOPLEFT", nextX + spacing + leftCompensation, nextY + spacing + topCompensation)
with

Code:
	local useOffsets = false
	local XOffset = config.xoffset or 0
	local YOffset = config.yoffset or 0
	if config.xoffset ~= nil or config.yoffset ~= nil then
		widget:SetPoint("TOPLEFT", parent, "TOPLEFT", XOffset, YOffset)
	else
		widget:SetPoint("TOPLEFT", parent, "TOPLEFT", nextX + spacing + leftCompensation, nextY + spacing + topCompensation)
	end
It gives us full x,y control over widget placement to bypass the column stuff if needed.


RSS 2.0 Feed for Favorite CommentsNotes Sort Options
By: doxxx - 04-21-12 11:20 AM
Items are not allowed to be reselected because that can cause event notification loops if the ItemSelect or SelectionChange event handlers call SetSelected* again. What I can do is add an ItemClick event which is fired when the user clicks on an item.
By: doxxx - 04-21-12 11:21 AM
The major feature of the Layout function is that it calculates the positioning and sizing of the widgets automatically. Why are you using it if you want to manually position your widgets?
By: doxxx - 04-25-12 09:15 PM
I've added the ItemClick event for SimpleList in v1.9.5.
By: soulwhip - 04-26-12 03:39 PM
"Why are you using it if you want to manually position your widgets?"
To take advantage of the other layout features, tooltip, layer, label without having to create all the frames for those. I created a simple button but I don't want it in the column layout. It needs to be positioned somewhere else.
By: soulwhip - 04-26-12 03:42 PM
"Items are not allowed to be reselected because that can cause event notification loops if the ItemSelect or SelectionChange event handlers call SetSelected* again."

Ya I've already done that but it's pretty obvious to the programmer when you do it. I don't think the lib should prevent it. We may need to do other things on the second select.
By: soulwhip - 04-26-12 03:47 PM
Just saw you added ItemClick event. Awesome, thanks!
 
Menu
» Home



Stats
Files: 2
Downloads: 10,727
Favorites: 13

New & Updated


Riftui