Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
open the inventory directly to a specific folder http://sldev.free.fr/forum/viewtopic.php?f=6&t=2354 |
Page 1 of 3 |
Author: | DonFranko [ 2023-03-25 17:37:51 ] | |||||||||
Post subject: | open the inventory directly to a specific folder | |||||||||
Hi again! Is it possible to make the inventory floater open directly into a particular folder ? If not natively, would it be possible to achieve that via a lua sidebar button ? I've tried to add an UUID to the command, but it's not doing it.
|
Author: | Henri Beauchamp [ 2023-03-25 22:43:10 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Post subject: | Re: open the inventory directly to a specific folder | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The normal inventory floater does not take a parameter/target, but you can create your own custom inventory floaters... An example is given in appendix B of the Lua manual. A simpler floater could be (save this file as "skins/default/xui/en-us/floater_lua_inventory.xml" in your Secondlife user settings folder (i.e. "~/.secondlife/" under Linux, "%AppDAta%\Secondlife" under WIndows):
Then to open it, type in chat
And to change the root of the inventory to the Objects folder:
Or to a "Subfolder" of Objects (when it exists):
Or to your folder UUID:
And thus, for your side bar button:
|
Author: | DonFranko [ 2023-03-26 12:42:50 ] |
Post subject: | Re: open the inventory directly to a specific folder |
That works - Thank you ! .. and I'm learning more and more to not ask you so many questions in future Please allow me two more questions on this topic: - do these own floaters always start in the middle of the screen or is there a way to make them learn the last position as it is the case with the built in floaters? - I'm also working on the new radar example to finally some day get the infos that I want to have (it's only a bit code needed but I still don't know how to address radar data into the different columns.. anyhow.. in that example the code takes a detour to bet to the wanted inventory folder within that new radar. Would it be possible to avoid that second click (which opens all folders what makes it really messy to get to the desired folder) and to get to the desired folder directly as in that easy floater example in here? |
Author: | DonFranko [ 2023-03-26 13:04:13 ] |
Post subject: | Re: open the inventory directly to a specific folder |
some happy news: I managed to create a working cancel-button in that new floater.. juchuuuuuuuuuuuuuuuu )) |
Author: | Henri Beauchamp [ 2023-03-27 09:08:34 ] | |||||||||||||||||||||||||||
Post subject: | Re: open the inventory directly to a specific folder | |||||||||||||||||||||||||||
For next release, I however added yet another boolean parameter to OpenLuaFloater() so that you can tell it not to open the floater immediately, allowing you to setup its UI elements as you see fit (e.g. the inventory list root) before showing the floater with a new ShowLuaFloater() function (that will also be usable to hide a custom Lua floater without closing it). |
Author: | DonFranko [ 2023-04-01 11:17:16 ] |
Post subject: | ...LuaFloater improvements |
Hi Henry, thank you for the improvements of the OpenLuaFloater function ! |
Author: | DonFranko [ 2023-04-01 12:10:13 ] | ||||||||||||||||||
Post subject: | Re: open the inventory directly to a specific folder | ||||||||||||||||||
Unfortunately I don't know where to place it in that code; what I tried so far broke the sidebar: That is the working sidebar button:
|
Author: | DonFranko [ 2023-04-01 12:30:45 ] | ||||||||||||||||||
Post subject: | Re: open the inventory directly to a specific folder | ||||||||||||||||||
For that I took your example and edited a bit as far as my knowledge took me. I attached my current automation.lua and the relevant .xml.
In that example of yours the lua takes a detour to select one specific folder using lineedit1 input.. Now I think it's not needed anymore, is that correct? My current biggest problem is how to put the avatar info into separated columns to get a step further with it. And I have no clue how to get to that AvatarPieMenu to color-tag avatars. So much to learn. Thank you very very much for your help! |
Author: | Henri Beauchamp [ 2023-04-01 13:30:40 ] |
Post subject: | Re: open the inventory directly to a specific folder |
I am sorry, but I am not going to write Lua code for you (no time for this, sorry). You need to read the documentation (*) (everything is explained there, in minute details, with examples even) and learn by yourself by trial and error. (*) The documentation was updated for OpenLuaFloater() (page 25), but make sure your browser is not using a cached (and deprecated) copy of the PDF file: clear the browser cache before pointing the browser to the PDF file (this is also true for the viewer built-in browser plugin: in "Preferences" -> "Network & Web", click on "Clear browser cache" before using "Help" -> "Lua scripting help..."). |
Author: | DonFranko [ 2023-04-01 15:56:12 ] | ||||||||||||||||||
Post subject: | Re: open the inventory directly to a specific folder | ||||||||||||||||||
Henri, I didn't and I don't want to bother you. I was not asking for code. I attached the file because you said
I wanted you to get some clue about the code and yes, I was hoping for a little hint, nothing more. I have the documentation open, but I have not yet figured out what all the brackets mean
I beg your pardon, but I'm a coding beginner who is just asking for some help. |
Page 1 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |