Cool VL Viewer forum
http://sldev.free.fr/forum/

move the lua side bar to a different location on the screen
http://sldev.free.fr/forum/viewtopic.php?f=6&t=2347
Page 1 of 1

Author:  DonFranko [ 2023-03-02 21:53:18 ]
Post subject:  move the lua side bar to a different location on the screen

Hi!

I would like to move the lua side-bar to a different place on the screen and haven't found any infos regarding that. Where and how can that be done?

Author:  Henri Beauchamp [ 2023-03-02 22:56:58 ]
Post subject:  Re: move the lua side bar to a different location on the scr

DonFranko wrote:
I would like to move the lua side-bar to a different place on the screen and haven't found any infos regarding that.
It's in the documentation (currently page 28) as a note for the SideBarButton() Lua function...

Quote:
Where and how can that be done?
Citing the said note:
Quote:
NOTE 2: by default, the side bar appears on the right side of the viewer window, but if you prefer, you may place it on the left side via the "Advanced" -> "User interface" -> "Lua side-bar on left" toggle.

Author:  DonFranko [ 2023-03-03 00:27:09 ]
Post subject:  Re: move the lua side bar to a different location on the scr

ah. ja.. I remember that one.

My question was not precise enough. I'm searching for a way to place it somewhere higher on either side to a place that is not so much occupied by other things.. like starting in the top right corner..

Would that be possible?

Author:  Henri Beauchamp [ 2023-03-03 12:31:58 ]
Post subject:  Re: move the lua side bar to a different location on the scr

Sorry, but I won't add more coded options for the Lua side bar placement.

This said, as often for UI related things in the viewer, you may override the current Lua side bar panel definition so to change its layout and (in a limited way) placement.

Start with copying the skins/default/xui/en-us/panel_lua_sidebar.xml file present in the viewer installation directory into a ~/.secondlife/skins/default/xui/en-us/ directory (for Linux) or %AppData%\SecondLife\skins\default\xui\en-us\ folder (Windows), then edit that copy and change it as you wish (the changed file will be taken into account on next viewer restart).

E.g. to move the side bar buttons higher towards the upper right corner, you may simply make the panel taller. For a 1080-1200 pixels high viewer window, you could change height="360" for height="800", for example. Then (i.e. still with the panel height increased), if you want to move the buttons to the lower corner, change the first button's bottom_delta="-30" offset for bottom_delta="-600" or so. You may of course need to adjust these values for your needs (topmost or bottommost button position, viewer window height).
Just as well, you may reorder the buttons in the panel, so that, for example, they are added from top to bottom in increasing order, instead of each side and around the center of the panel.

Example (for a panel shifted towards the top of the window, with buttons added from top to bottom):
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel name="lua_side_bar" enabled="true" hidden="false" mouse_opaque="false"
 width="32" height="800" follows="top|left">
   <button name="btn1" label="1" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn2" label="2" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn3" label="3" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn4" label="4" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn5" label="5" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn6" label="6" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn7" label="7" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn8" label="8" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn9" label="9" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn10" label="10" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
   <button name="btn11" label="11" font="SansSerif" visible="false"
    left="2" bottom_delta="-0" width="28" height="28" follows="top|left" />
   <button name="btn12" label="12" font="SansSerif" visible="false"
    left="2" bottom_delta="-30" width="28" height="28" follows="top|left" />
</panel>

Author:  DonFranko [ 2023-03-06 14:27:09 ]
Post subject:  Re: move the lua side bar to a different location on the scr

Thank you Henri,

that is exactly what I was looking for - the relating .xml file. I don't know how you could know but your kindly provided example nailed and put the bar exactly at the place where I want it.. really.. exactly.. gosh.. spooky!

Thank you very much, Henri.

That gave me 1,5 cm more space for the floaters -- amazing. you rock!!!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/