Author Topic: Global UI scaling?  (Read 915 times)

0 Members and 1 Guest are viewing this topic.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Helpful: 22
  • Languages: EN
Global UI scaling?
« on: December 07, 2017, 07:34:48 PM »
Is there a way to scale the User Interface in simutrans?  Bigger buttons, bigger fonts, etc?  Not talking about the paksets, I know we have zoom for those. I mean making the buttons and labels (stop names etc) take up more pixels.

I've recently started using my computer with a different screen setup, and it's all rather small now. Most software (web browsers etc) have some kind of scale setting you can tweak to make stuff bigger or smaller, according to preference. Does simutrans?

I've put this under the extended subforum because that is what I play, unsure if the answer would differ for standard.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17063
  • Country: gb
  • Helpful: 187
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Global UI scaling?
« Reply #1 on: December 07, 2017, 10:48:20 PM »
I think that UI scaling was incorporated into Extended from an update in Standard a while ago - the code is the same as between Standard and Extended, but, as I do not use UI scaling myself, I cannot recall the details of how to set it up.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Helpful: 22
  • Languages: EN
Re: Global UI scaling?
« Reply #2 on: December 11, 2017, 08:13:14 PM »
Given the above, I asked the same question as above over on the Standard forum, and got two responses:

1.
You have to select a large gui theme: main menu -> display -> select theme (wide button in first line of window).
However it seems Extended doesn't have a "select theme" option in the Display settings dialogue. 

Not sure if its absence is intentional or not?

2.
Starting the .exe with the '-autodpi' argument (and GDI or SDL2 backends only) will scale the game based on your OS configured scaling. Of course this type of scaling only really works with integral factors - 2x, 3x, etc.  trying 1.25 gives unreadable text.
This is pretty useless because as TurfIt noted, the text is unreadable at something like x1.25 or x1.5, and also because it seems to 'clip' the game maps so you can't interact with a chunk of the terrain.

So it seems neither ideal.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17063
  • Country: gb
  • Helpful: 187
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Global UI scaling?
« Reply #3 on: December 11, 2017, 11:57:53 PM »
I was referring to the second method - this is indeed global DPI scaling. Simutrans-Extended does not fully support themes - this is because of the amount of work that it would take to implement fully compared with the amount of time that I have available. The themes code is partially implemented, however.

If anyone would like to work on porting the remaining parts of the Standard themes code to Extended, I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.