News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Automatic gui patch

Started by Dwachs, June 03, 2018, 03:30:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

I think then one should rather have a company window with a headquarter world view. That windows in a size compatible to the normal ones. Then a tab, one for choosing company color, The statistics tab would have the most important numbers (for me something like profit last month, runnung costs, maintenance, net balance) and a detail button that opens the finance window, and an AI settings tab, and scenario tab with the mission status.

Since the content of the tab makes them appear as different windows, these tabs should go full width (and thus the scrollbar at the border and the content to the botton with now space left.)

Dwachs

So here is the current state of the patch with respect to the finance window.
Parsley, sage, rosemary, and maggikraut.

An_dz

Wow, you can even check by transport? Now that's pro.

Yona-TYT

"Show finance for transport type" At last a description for it is filter, it will be easier to know what it is for.  :P

Dwachs

Quote from: An_dz on June 24, 2018, 09:36:50 PM
Wow, you can even check by transport? Now that's pro.
this has been added 5 years ago, only the label is new :)
Parsley, sage, rosemary, and maggikraut.

An_dz

What? Really? I should stop playing on free play :P


An_dz

@Frank, Now I remember it. It's a little hidden in current releases, that's another reason I totally forgot it.

Frank

Much of what is there has since been forgotten. Also a lot of what was started once again fell asleep.

Yona-TYT

I hope you have not forgotten the network filters..... hehehehe  ;D ;D ;D


Dwachs

I would like to change the gui coordinates scr_coord_val to sint32 (from sint16)? This is to prevent integer overflow in size calculations for long lists.
Parsley, sage, rosemary, and maggikraut.

prissi

Why not? As long as we can keep the in game corrdinates at 16 bit for all objects ...

Dwachs

Here is an updated patch. Almost all windows are converted.

Todo list:
- convert all lists, help, depot, line management, message option, server, scenario info.
- catch loading gui data from current savegames (I rewrote the rdwr routines, they are incompatible)
- code cleanup

Patch at https://simutrans-germany.com/files/upload/8608-scalable-gui.zip

Parsley, sage, rosemary, and maggikraut.

fam621

Can this be incorporated into Extended?

prissi

That will need more work, since quite a few dialogues are different. But usually thing find their way sooner or later. Also, for now it is not fully finished on Stnadard, so experimetnal will take longer, I think.

Yona-TYT

@dwachs
Can you publish an executable to do some tests?.

Dwachs

Parsley, sage, rosemary, and maggikraut.

An_dz

Extended also has lots of completely different UIs, they will require extra work and it makes more sense to wait for this patch to be completed first.

ACarlotti

I think what will actually happen is that the new gui features will be merged across eventually in the course of merging features (sequentially) from Standard. (Details here, I think it will take around a year to get to the gui features being merged.) Then someone will have to convert the rest of the Extended guis in the same manner.

Dwachs

Here is a new patch. Almost all windows are converted. Still not patched are help window, scenario info, message options, line management, and depot window (which is kind of the boss).

Please test!

https://simutrans-germany.com/files/upload/automatic-gui-r8637.zip
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

I am very happy to see progress in this great project, I would like an executable to do some tests, greetings!  ....  ;D

Dwachs

Did/Does the executable in the earlier post above work for you? I will post a more recent version later this day.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT


If it works, although in my case I must use wine.


And also I have compiled an executable for linux. ;)




I do not know if this has to do with the patch, but an error occurs when trying to change the font size. :o






Dwachs

Quote from: Yona-TYT on November 29, 2018, 10:31:10 AMI do not know if this has to do with the patch, but an error occurs when trying to change the font size. :o
Can you be more specific? Under what condition which error occurs? And you refer to which version of the patch: your executable with recent patch or the executable in the post above? Will test tonight.
Parsley, sage, rosemary, and maggikraut.

Dwachs

Here is an updated patch. It contains some small fixes (e.g. load-font window does not trigger assertion)

https://simutrans-germany.com/files/upload/automatic-gui-r8637.zip

Edit: here is a windows executable: https://simutrans-germany.com/files/upload/sim-gdi-autogui-8637.zip
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

#60

Quote from: Yona-TYT on November 29, 2018, 10:31:10 AMdo not know if this has to do with the patch, but an error occurs when trying to change the font size. :o

I can not replicate this anymore.  :P




I have found two details:

1 The preview of the map in the server window does not work well.

22 The preview on the roads does not appear.
edi.
3 A blinking bar appears in the filter of the finances window.
4 The minimap is not stretched when resizing the window.

Leartin

Is it intentional that this executable does not support ttf fonts, while r8600 does? Would be nice to test it with scaled fonts.

Dwachs

@Yona thanks for testing. Will investigate these things tonight.

@Leartin: That is the point of the patch. That is a failure in my cross compiling setup, it was compiled without this support. Sorry, will post new executable tonight.
Parsley, sage, rosemary, and maggikraut.

ceeac

Found another bug: When expanding the factory window of a factory with details (e.g. pak128 oil field) to the right, the size of the text area increases, but it does not shrink when making the window smaller again.

Dwachs

Updated patch. Windows executable should now have truetype font support.

@Yona: Fixed these issues, except (1) which is a trunk bug (happens for graphicless servers)
@ceeac: thanks for the report, not yet fixed.


Patch: https://simutrans-germany.com/files/upload/automatic-gui-r8637.zip

Windows exec: https://simutrans-germany.com/files/upload/sim-gdi-autogui-8637.zip
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Some components of the windows are superimposed to the news ticker.  :o




Yona-TYT

#66
A curious detail:

A small box appears when the lists are empty, why not remove this box when there is nothing?.

Edi.



I also think it would be nice to fill the bottom of the list with a lighter color, as seen in the example image.

Dwachs

which components are drawn in the ticker region? From your screenshots is looks like title bar and minimap. Thanks for testing
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

For the moment I've only got those two, I'm going to do more tests in search of others, greetings!... ;)

Leartin

What I think are bugs:
  • Possibly has nothing to do with your patch: The rectangle in the map that shows you where you are gets distorted if a corner is outside the map.
  • Inspection windows, which could not be rescaled before, now can. However, line breaks don't change, so making the box broader does not help with long text.
  • In the factory window on the details-tab, when you expand the window, lines of text get longer. However, if you make the window smaller, they don't change.
  • You are now able to drag a dialog so far down it's title disappears behind the bottom info line, but you can't grab them once they are there. Same is true with the ticker, which also displays artifacts as already mentioned. I'm not entirely sure how I would get my messages-dialog back in the visible playing field, any ideas? I did not test that yet :(
  • In the dialog to build an industry, the list of industries does not scale it's wideness. Technically, the info to the right doesn't either, but that's only visible if it's so short a scrollbar appears, and I'm not sure that side is even required to scale at all.
  • In the dialog to build a curiosity, descriptive text does not auto-break. (also that's one of the worst "initial window sizes", see below)
  • Changing the sorting in the goods-list makes it so it does not spread over the window size anymore.
  • In the finance window, when you click with the mouse in the graph to see older values, the value flickers.
  • If you change the station names to be displayed in yellow with a square of the player color to the left, the square reaches into the name if the font is larger then the default. [I mean, I never used that, and I don't know anyone who does, and the outlines of the yellow text are naturally disgusting at that size anyway, but it's there, so it needs to be supported]
  • Changing font sizes is very funky. If I'm on a ttf font on scale 19 and change it to 18 (using the scroll wheel, not sure if that affects anything) the font actually becomes bigger. It becomes smaller when I go to 17, and then smaller once again when I go up to 18.
  • Also, would it be possible to keep font selection when changing languages, or is that impossible due to non-latin writing systems?

    What I think isn't technically a bug, but needs improvement:
  • The build-industry dialog changes it's wideness automatically according to the building preview, which now features the complete building. One should be aware that there are ridiculously large buildings: In P192C, it's the oremine with 6x6, which causes that dialog to fill more than half of my screen (3840*2160). I really like the full-view buildings and would even ask to display upper layers and frontimages, but only if there was a way to restrict them in size. Would it be possible to define a minimum area of a tile-sized square and not draw any part of the building outside that area, making the appearence in the smallest window similar to how it was before, but show more of the building if the window is rescaled?
  • Maybe that's already possible via themes by now, but I really think there should be a "GUI-Scaling-Factor" that changes the default size of dialogs. I used the largest font size (18 - see above) and the larger theme to open the goods list, and in the initial window size I only saw pax and mail, and of those not the weight. The goods list does not retain size, so I always have to resize it for it to be of any use.
  • Similarly, some elements drawn by the game would need scaling as well. Eg. in the finance window, it would make sense to use a two-pixel line and larger dots, or the lines of goods waiting in a station in the overworld.

    (full disclosure: My 4k is a really small one, and I have it side-by-side with a FullHD of the same size. I think the goal should be to have P96C on one screen and P192C on the other and not see much of a difference in the menu elements.)