View Full Version : Fun with Desktop and Panels
celestian
April 24th, 2020, 05:20
I've been attempting to reorganize the desktop a bit. My first task was to get rid of the "sidebar" and add a more modern method of navidation.
I came up with this during my proof of concept work.
https://i.imgur.com/FsF07dr.png
As you can see, it's a simple menu that mimics the pretty standard location and function.
The problem I'm having is that it appears that the panel "covers" the items below it even when not showing. If you've not opened the menu you can right click on a portrait and see the standard "kick/chat/etc" menu option on the portrait. However after I open and close the "Menu" drop down it then just gives the typical "right click" desktop options when clicking on the portrait again.
So then I tried...
I thought maybe I could just have a standalone window come up then, because I know it can overlay and when closed doesn't cause a problem... however when I tried that the Interface.openWindow() window is just stuffed into the panel and not over the desktop and obviously the to small for that.
Here is a example of what I'm working with right now for the panel entry.
<!-- menu button panel -->
<panel name="menulist" modes="host,client">
<class>menulist_window</class>
<anchored height="30" width="50">
<left offset="1" />
<top />
</anchored>
</panel>
If there is a way to use the desktop panels and not collide with chat window and portraits I'd be interested in suggestions.
Worst case I could put the Menu button on the chat window but ... I'd rather not. I'm hoping to go for something almost everyone will be familiar with.
celestian
April 24th, 2020, 23:26
So, I did a bit of testing various things and figured out a way to get it to work.
First I changed the panel entry to be dynamic.
<!-- menu button panel -->
<panel name="menulist" modes="host,client">
<class>menulist_window</class>
<anchored width="0">
<left />
<top />
<bottom offset="-32" />
</anchored>
<dynamic />
</panel>
Then, in the window that is show with menu links I check for visibility. If it's NOT visible we setSize the window to just the original tiny panel for for "Menu" button.
function onVisibilityChanged()
local bVisible = isVisible();
if bVisible then
window.rollOutMenu();
else
window.rollUpMenu();
window.setSize(50,25);
end
end
After that change I was able to get the clickable working as it should for windows behind the window.
https://i.imgur.com/o5e70ns.gif
Next issue, sort out how to get it to show over top of everything (it shows behind the Combat Tracker).
Moon Wizard
April 24th, 2020, 23:39
Just as a point of feedback. I find that drop-down menus with 20+ options are actually harder for users to use, and to find information in general. I wouldn't want this in a standard UI for every user. It seems more like a UI for "advanced users who value screen real estate over quick access".
Regards,
JPG
superteddy57
April 24th, 2020, 23:39
That concept looks familiar
superteddy57
April 24th, 2020, 23:41
Could add a fork in the code to build the menu button or build the sidebar. Also I believe you can force it to remain it atop of all frames when the list displays.
celestian
April 24th, 2020, 23:54
Just as a point of feedback. I find that drop-down menus with 20+ options are actually harder for users to use, and to find information in general. I wouldn't want this in a standard UI for every user. It seems more like a UI for "advanced users who value screen real estate over quick access".
Regards,
JPG
This is my early version. I'm considering having two buttons, one for lesser used menus (like the bulk of records) with the current "desktop dock" being the ones in the primary list. Pretty much like the standard file menu. [Menu] [Records] sorta thing. (names are still up in the air ;)
Honestly I was thinking this would work better for new users as the user interface style for file/options is far more likely to be a button on the top left.
Could add a fork in the code to build the menu button or build the sidebar. Also I believe you can force it to remain it atop of all frames when the list displays.
That's the bit I cannot figure out. bringToFront() does not work on panels.
Mortar
April 24th, 2020, 23:55
Nice! I like it.
Valyar
April 25th, 2020, 11:54
This is very interesting concept. Saving screen real estate is important, especially if you don't have two monitors or higher than FullHD screen size. If there is way to have this implemented only for the host, it will be stellar.
celestian
April 26th, 2020, 01:46
Second pass...
Still working on it... but I'm going to add a few more buttons that don't exist or are "layered" in other menus currently. Like "Exit" and "Modules".
https://i.imgur.com/X4awmPT.gif
damned
April 26th, 2020, 03:57
Looking Good Celestian
celestian
April 26th, 2020, 22:08
I've put the code into a extension bundle so folks can look at what I'm doing and make suggestions. This is CoreRPG. Should work with any CoreRPG layered ruleset.
There are still a few outstanding issues I'd like to resolve. One of which is I want these to overlay ALL windows but not sure how to get to that point yet. For example if you have the Combat Tracker below the menu buttons the list of menus will be placed below the CT, not over it.
https://i.imgur.com/LWtxiGv.gif
Keep in mind I am not planning to keep this extension maintained, it's just proof of concept work seeking feedback.
(Removed the attached extension, please use the better version of it found here (https://www.fantasygrounds.com/forums/showthread.php?58226-Better-Menus-(CoreRPG-5E-etc)).)
celestian
May 4th, 2020, 22:46
So I got the bulk of the topics sorted out but there is one lingering option that escapes me.
Is it possible to set a panel as "ALWAYS ON TOP" of any window?
I've tried various options to bring it to the front but none of those work with panels. Right now, for example, the Menu/Records drop downs will be placed behind the Combat Tracker window... which is quite annoying as I like to have the CT at the top (just under them).
Here is a short video (https://youtu.be/bMYSx-g2s_4) to what I've working so far.
celestian
May 6th, 2020, 06:37
Well, it seems to be working now after a 3rd re-write.
https://i.imgur.com/gJvreQf.gif
Since there isn't any built in functionality for this sorta thing (layer placement of windows) it required a little bit of work with individual windows and moving them about but... user won't know any better.
Heilemann
May 21st, 2020, 03:15
So I'm having the opposite problem, and not to hijack your thread (I love this concept by the way), but can you share what you did to be always on top?
celestian
May 21st, 2020, 03:23
So I'm having the opposite problem, and not to hijack your thread (I love this concept by the way), but can you share what you did to be always on top?
Are you talking about the menu buttons? The way I did that was to make them their own window (the drop downs). In effect its spawning a window that is minimized when not active. To be fair it's not always on top, it just opens on-top when used. It's much like the Combat Tracker window, when you open it, it's on top.
Panels are ... not a easy to deal with and other than the buttons themselves I don't use them for anything else (the panel for buttons allow the menu to be moved). They certainly don't have any means of changing the position (Z axis if you will) more than a very rudimentary level. I found that using <bounds> instead of the <anchored> options for panels that it would place it on a higher level than some of the other panels. My doing that for the characterlist (portraits) and dicetower they would then show up ON TOP of a "desktop view" map/image.
But, programmatically moving them above others was not a option in the API that I could find.
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.