BepInEx / BepInEx.ConfigurationManager

Plugin configuration manager for BepInEx
https://www.patreon.com/ManlyMarco
GNU Lesser General Public License v3.0
231 stars 53 forks source link

Custom GUI Style / GUI scaling #23

Open 4Magma opened 3 years ago

4Magma commented 3 years ago

How can i change font size, color and background color? BCM appears in white on grey in small font size.

ManlyMarco commented 3 years ago

You have to compile your own build with a custom gui skin, or make a plugin that hooks config manager and change the gui skin from there. Something like this https://github.com/ManlyMarco/RuntimeUnityEditor/blob/master/RuntimeUnityEditor/UI/InterfaceMaker.cs#L43

4Magma commented 3 years ago

Isn't there a easier way? I use BCM with Valheim, but the small white text on gray is bad to read. The Pic on the intro page shows BCM in white on black.

ManlyMarco commented 3 years ago

At the moment the game's own skin is used, there's no built in way to change this. The only way would be to change the code to use a custom skin like in runtime editor.

Baccanno commented 3 years ago

I'm interested in this too, every UI is very small on my QHD panel. I got the source code, now I'm just wondering how I should override the GUISkin.

ManlyMarco commented 3 years ago

You would have to recalculate sizes of at least fonts for all the different gui styles based on resolution. Create a copy of GUI.skin, make your changes, and then set your copy as the skin to use on every ongui call.

Baccanno commented 3 years ago

I would also have to do it for all plugins additional UI calls? It does not seem manageable. Maybe going with dnSpy and changing some values ? Also, any idea of the base police size on Unity ?

ManlyMarco commented 3 years ago

Yes, this would have to be done in every plugin separately. Some plugins would work fine with just a copy of the code, but others would require major rewrites if they use GUI instead of GUILayout and autoscaling windows. A custom skin like this could be exposed from some API library to make it easier to add it to plugins, like what RuntimeUnityEditor does with its own custom skin.

Faithfinder commented 2 years ago

Yes please?

shaojiaxu commented 1 year ago

You have to compile your own build with a custom gui skin, or make a plugin that hooks config manager and change the gui skin from there. Something like this https://github.com/ManlyMarco/RuntimeUnityEditor/blob/master/RuntimeUnityEditor/UI/InterfaceMaker.cs#L43

The link is 404 now :(

ManlyMarco commented 1 year ago

@shaojiaxu https://github.com/ManlyMarco/RuntimeUnityEditor/blob/093c859332fc02dbab87428090b522b0e5ca515b/RuntimeUnityEditor/UI/InterfaceMaker.cs

JoewAlabel commented 1 year ago

I found a good solution for this problem:

1- Find the exe file of your game, and RMB click it. 2- Click at > Properties 3- Click at Compatibility tab. 4- Click the button: Change high DPI settings 5- Check (enable) the first option below Program DPI 6- Check (enable) the last option below High DPI scaling override 7- At this drop-down list, select > System

Screen Shot

Stroichik commented 10 months ago

I can add, that if i run Valheim with Vulkan from Steam - i get whitewashed GUI from Config Menu. If i run it from exe or without Vulkan - GUI looks normal colored.

ManlyMarco commented 10 months ago

@JoewAlabel @Stroichik Can you check if the latest version of RuntimeUnityEditor also has this GUI issue?

Stroichik commented 10 months ago

@ManlyMarco If i run with Vulkan - it looks same whitewashed image

And this is how it both looks without Vulkan

image

Its not something very critical, but a fix would be appreciated

ManlyMarco commented 10 months ago

The second screenshot is how it should always look like, I have no idea how Vulkan can affect this outside of it being an Unity bug. I guess it could be partially resolved by having a darker version of the skin but there's no way to fix it automatically.

Stroichik commented 10 months ago

Well, as i said, its not really that critical.