Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Linux/Proton) All checkboxes are thin, unable to tell if ticked or unticked #8

Closed
lyssieth opened this issue Dec 12, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@lyssieth
Copy link

Description of the bug

As with a similar mod for I think Kingmaker, the checkboxes are thin and there's no obvious content.

Steps To Reproduce

  1. Install the game on Linux
  2. Install ToyBox
  3. Open the menu

Expected Behavior

Checkboxes whose contents are obviously ticked or unticked

Log Files

Not relevant

Save File

Not relevant

Screenshots

image
image

Settings

Not relevant

Toybox Version

1.5.8a

Operating System

Linux

What game are you using Toybox on?

Rogue Trader

Game Version

1.0.62

Anything else?

If I remember correctly, this issue is due to fonts. An issue I submitted in 2021 shows the same information.

cabarius#499

@lyssieth lyssieth added the bug Something isn't working label Dec 12, 2023
@lyssieth
Copy link
Author

lyssieth commented Dec 12, 2023

The best (temporary) solution for now is to use Unifont as the UnityModManager font.

@xADDBx
Copy link
Owner

xADDBx commented Dec 12, 2023

https://gist.github.com/Ishindri/4a87c15c6e162e0daa462a114e2796c8 ?
Nvm; even that suggests using Unifont so my guess is that that's what you're supposed to use in Unix Systems.

@lyssieth
Copy link
Author

Yeah. The other option is to not use emoji as the checkbox things, or having an option to use basic ASCII.

@xADDBx
Copy link
Owner

xADDBx commented Dec 13, 2023

Anyways; adding an alternative option is probably too much work at this time (too many other issues with RT just being released).
Thanks for bringing this up again, I already forgot that this issues existed and what the workaround is. I'll close this for now as unplanned; Using Unifont is a functioning workaround, which should be good enough for now.
If anyone wants to take a shot at implementing a workaround, feel free, but none of the current Contributor (Cas, Narria and me) will work on this for now.

@xADDBx xADDBx closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
@lyssieth
Copy link
Author

lyssieth commented Dec 13, 2023

I took a look at the code, and it seems that there is a check for this in place, actually, but only works for linux-native games.
https://github.com/xADDBx/ToyBox/blob/4fcfe27c6d6462e130952f0f8cd1e2fcd3ac0846/ModKit/UI/Glyphs.cs#L23

I looked around, and it seems the best runtime way to detect being run under Proton/Wine seems to be checking a registry key, specifically HKCU\Software\Wine. Which doesn't seem like a great idea, but is certainly one potential path.

Or alternatively a checkbox in the settings that interacts with this?

@xADDBx xADDBx reopened this Dec 13, 2023
@xADDBx
Copy link
Owner

xADDBx commented Dec 13, 2023

I took a look at the code, and it seems that there is a check for this in place, actually, but only works for linux-native games.

https://github.com/xADDBx/ToyBox/blob/4fcfe27c6d6462e130952f0f8cd1e2fcd3ac0846/ModKit/UI/Glyphs.cs#L23

I looked around, and it seems the best runtime way to detect being run under Proton/Wine seems to be checking a registry key, specifically HKCU\Software\Wine. Which doesn't seem like a great idea, but is certainly one potential path.

Or alternatively a checkbox in the settings that interacts with this?

Feel free to open a PR, though I don't have a running Linux setup to test this.

@lyssieth
Copy link
Author

I'll have a look tomorrow, it's getting late here.

@lyssieth
Copy link
Author

Looks like developing this on Linux is impossible in the current state. Sad, but I don't have a Windows machine (or a VM) available to me.

@xADDBx
Copy link
Owner

xADDBx commented Feb 17, 2024

I took a look at the code, and it seems that there is a check for this in place, actually, but only works for linux-native games.

https://github.com/xADDBx/ToyBox/blob/4fcfe27c6d6462e130952f0f8cd1e2fcd3ac0846/ModKit/UI/Glyphs.cs#L23

I looked around, and it seems the best runtime way to detect being run under Proton/Wine seems to be checking a registry key, specifically HKCU\Software\Wine. Which doesn't seem like a great idea, but is certainly one potential path.

Or alternatively a checkbox in the settings that interacts with this?

Now that I do have some time I reread this and noticed I didn't really understand the issue/idea.

So technically there are (excluding MAC) 3 situations:

  • Run on Windows

  • Run on Linux

  • Run on Linux using Proton/Wine which pretends to be Windows

Now ToyBox uses Glyphs as long as it's not Linux. Since Wine pretends to be Windows it will use those certain Glpyhs. Since they aren't installed by default this leads to an issue. Your suggestion was now additionally scanning for the Wine/Proton or provide an optional setting.

Alternatively trying to find out whether the current system supports said Glyphs might be possible?

@lyssieth
Copy link
Author

Your suggestion was now additionally scanning for the Wine/Proton or provide an optional setting.

Alternatively trying to find out whether the current system supports said Glyphs might be possible?

My suggestion was scanning or providing as setting, yeah. That alternate option would work as well, but I think that'd be harder than simply swapping out the runtime info for a checkbox? Of course, I'm not certain how exactly the UI works, so it might be more difficult than "simply" implies.

@xADDBx
Copy link
Owner

xADDBx commented Feb 18, 2024

Could you the latest version

  • After starting and opening the mod GUI a check is done whether the current system supports glyphs; if not they will be disabled after restarting the game
  • Added an Override Option to the Settings which will allow disabling said check (and after that choosing whether to disable or enable default glyphs)

It works on my system but I don't have a system which doesn't support Glyphs
Relevant changes are in 85b060c

@lyssieth
Copy link
Author

lyssieth commented Mar 6, 2024

Sorry for getting to this so late, I've been distracted and kind of forgot. I'm reinstalling the game now, so I'll get back to you when I've verified.

@lyssieth
Copy link
Author

lyssieth commented Mar 7, 2024

Yup, it's been fixed now. It requires a game restart to apply, so maybe add a disclaimer to the "Use Default Glyphs" checkbox, but other than that comment tyvm :3

@lyssieth lyssieth closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants