PDA

View Full Version : 5E theme with with small right-side buttons?



MacDork
February 11th, 2019, 22:21
My current theme is "Wood Alternative 50", but I'd love to have small buttons on the right, as they're given more screen real-estate than they warrant during gameplay.

Are there any themes that cater to this idea? I've not found any that I like w/ small buttons, and it seems buttons are not independently-sizeable.

Zacchaeus
February 11th, 2019, 22:30
There are a couple of button extensions but I think those just add coloured ones rather than a resize. You could have a look at one of those and could probably change the button size.

Having said that the buttons would still take up the same real estate as the normal single row of buttons I suspect. Unless you also changed the size of the entire bar.

MacDork
February 11th, 2019, 22:35
Good call -- thanks!

Trenloe
February 11th, 2019, 22:39
The buttons get resized in FG code - so that a certain number fit within a single sidebar, and above a certain number they appear in two columns.

The calculations for the spacing of these "dock" buttons is contained in CoreRPG -> scripts\manager_desktop.lua It's a little complex as it has to cater to different FG screen/window sizes, variable number of buttons displayed (selected from the top of the library window), etc..

MacDork
February 11th, 2019, 22:41
Having said that the buttons would still take up the same real estate as the normal single row of buttons I suspect. Unless you also changed the size of the entire bar.

Just discovered that :(

Perhaps I can just decrease the size of the bar in the theme I like.

Trenloe
February 11th, 2019, 22:47
There's a function DesktopManager.setMaxDockColumns(nMax) that can be used to override the default maximum of 3 columns. You could write a mini extension to change this (if this is what you're aiming for).

There's also a function DesktopManager.setDockIconSizeAndSpacing(iw, ih, sw, sh) that could be used to override the expected default width, height and spacing of the dock button icon, which might help if you're looking to create an extension with smaller button icons.

Trying to set the max dock columns to 1 (or 2) might be a good starting point...

Trenloe
February 11th, 2019, 22:58
Try the attached as a starting point - you can mess around with the settings (change the current one, try DesktopManager.setDockIconSizeAndSpacing, etc.) to see what might work for you.

MacDork
February 11th, 2019, 23:08
You know what? That'll do just fine for me. Thank you :)

Trenloe
February 12th, 2019, 00:41
You know what? That'll do just fine for me. Thank you :)
Cool. :) The thing to keep in mind is that this is also active for the players. If they don't like the one column sidebar, we can put a little bit of code in to only do this for the GM.

damned
February 12th, 2019, 00:41
You might also look at the Curse of Strahd theme - it uses an alternative button representation.

MacDork
February 12th, 2019, 00:52
Cool. :) The thing to keep in mind is that this is also active for the players. If they don't like the one column sidebar, we can put a little bit of code in to only do this for the GM.

Doh. I didn't think of that. I love the extensibility; what's the LUA for isolating this to just the DM?

MacDork
February 12th, 2019, 01:10
You might also look at the Curse of Strahd theme - it uses an alternative button representation.


Excellent -- thank you!

Trenloe
February 12th, 2019, 06:09
Doh. I didn't think of that. I love the extensibility; what's the LUA for isolating this to just the DM?
Change the code in OnecolumnSidebar.lua to:

function onInit()
if User.isHost() then
DesktopManager.setMaxDockColumns(1);
end
end

You can remove the Debug command I left in from testing.

MacDork
February 12th, 2019, 10:28
Change the code in OnecolumnSidebar.lua to:

function onInit()
if User.isHost() then
DesktopManager.setMaxDockColumns(1);
end
end

You can remove the Debug command I left in from testing.

Thank you, again!