Change default window size?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
TJen
Engineer
Engineer
Posts: 4
Joined: 16 Jan 2013 20:50

Change default window size?

Post by TJen »

Hi.

Is there any way to change the default window size for all the different windows?

For example, whenever I buy a new vehicle, I always enlarge the "new vehicle" window so that I can see more vehicles at a time. It would have been much better if I could set it so that it always opened up enlarged.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Change default window size?

Post by planetmaker »

Currently that's not feasible.
Kevlar31
Engineer
Engineer
Posts: 11
Joined: 09 May 2013 13:45
Location: Down Under

Re: Change default window size?

Post by Kevlar31 »

Is it possible to load a save game with the windows showing that you had open previously?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Change default window size?

Post by Alberth »

Nope, it's on the "todo" list: http://wiki.openttd.org/Todo_list (search for "Save GUI settings savegame specific")
Kevlar31
Engineer
Engineer
Posts: 11
Joined: 09 May 2013 13:45
Location: Down Under

Re: Change default window size?

Post by Kevlar31 »

Wow! Thanks for the quick reply!

I don't know how many people open different versions (newer/older savegames) wouldn't most people play the same version which would mean opening the latest with the last set of windows .... maybe?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Change default window size?

Post by Alberth »

Kevlar31 wrote:I don't know how many people open different versions (newer/older savegames) wouldn't most people play the same version which would mean opening the latest with the last set of windows .... maybe?
I don't know what you mean exactly, but I play a different version every time, since I build my versions from trunk.
There are also a lot of people playing nightly versions.

The main problem is to find a good place for such settings. The savegame won't work, as it gets copied to other users (eg in MP, or through the forum, or some other website) that have different size screens etc.
The openttd.cfg file won't work, as the set of windows is not related to a particular game any more (ie play one game, save and exit, start anew with a different game, and you get the set of windows of the previous game).

You're welcome to work on this problem, and make a patch to fix it.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Change default window size?

Post by planetmaker »

I wonder whether there's not place for a solution which is good enough in many cases, nor would it probably block another solution which works for more or all savegames and / or network games:

store window settings in config file along with the savegame name (if locally) or server name+address (if on multiplayer server). Ignore these settings when they don't match the loaded savegame and overwrite upon leaving the current game.

Alternatively it could be stored in the savegame. And window positions only restored, if the viewport matches in size or is bigger. Otherwise windows are moved so long to the left and to the top till they fit. If that doesn't fit, try drawing them in their default size. If that doesn't fit: close them. Stored in savegame is probably more difficult and likely has more (hidden) issues than the cfg solution.

But neither thought is based on long thinking, thus may have more drawbacks.
Kevlar31
Engineer
Engineer
Posts: 11
Joined: 09 May 2013 13:45
Location: Down Under

Re: Change default window size?

Post by Kevlar31 »

Ahhh! I see that the answer is a lot more complex than my narrow view, I play single player and use the same windows each time. I was thinking that a separate file containing the window preferences (sizes, position etc.) could be loaded with each game that is played. In my mind you could start a new game set up your preferred windows, click a button that saves them to a file (.cfg?) and they would be loaded automatically for your machine, monitors, desktop. *shrugs* It's easy for me to suggest stuff as I don't code at all. :?
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Change default window size?

Post by adf88 »

I think the problem is wider. The problem is interface scaling, in general. I suggest to improve it.
OpenTTD Suggestions :: Interface scaling
Last edited by adf88 on 15 May 2013 08:35, edited 1 time in total.
:] don't worry, be happy and checkout my patches
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Change default window size?

Post by Eddi »

i don't think this has anything to do with "interface scaling" at all.

in fact, they are contradicting goals. "scaling" would change window sizes the same way as window content, so there's always the same content in the window (or less, if the window would get bigger than the screen). but here you want to resize the window so it displays more content.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 647
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Change default window size?

Post by prissi »

I think the savegame would work; just discard the settings, if loaded with a different OpenTTD size then ...
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com
Shadow86
Engineer
Engineer
Posts: 5
Joined: 06 Oct 2018 23:07

Re: Change default window size?

Post by Shadow86 »

I apologize for the necroposting, but is this still on the to-do list? The wiki seems to indicate so.

The overall font faces and sizes tend to be too small on large resolutions (i.e. 1920x1080), and while those can be tweaked, some windows, like the vehicle purchase one, end up too small by default and need to be constantly resized.

Doubling the interface size seems like too much, and doubling the size of the UI sprites is a tad ugly.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Change default window size?

Post by Eddi »

with most windows, you can now save a new default size
User avatar
jfs
Tycoon
Tycoon
Posts: 1758
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Change default window size?

Post by jfs »

Eddi wrote:with most windows, you can now save a new default size
To elaborate, all resizable windows should now have a "default size" button:
Image
When you've set your preferred size of the window, hold Ctrl and click the "small square" button next to the pin button.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Google [Bot] and 15 guests