The International Simutrans Forum

 

Author Topic: Automatic gui patch  (Read 3585 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Automatic gui patch
« Reply #35 on: June 24, 2018, 11:33:38 AM »
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.)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #36 on: June 24, 2018, 05:16:21 PM »
So here is the current state of the patch with respect to the finance window.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Automatic gui patch
« Reply #37 on: June 24, 2018, 09:36:50 PM »
Wow, you can even check by transport? Now that's pro.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #38 on: June 24, 2018, 10:40:29 PM »
"Show finance for transport type" At last a description for it is filter, it will be easier to know what it is for.  :P

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #39 on: June 25, 2018, 06:13:58 AM »
Wow, you can even check by transport? Now that's pro.
this has been added 5 years ago, only the label is new :)

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Automatic gui patch
« Reply #40 on: June 25, 2018, 12:36:41 PM »
What? Really? I should stop playing on free play :P

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Automatic gui patch
« Reply #41 on: June 25, 2018, 12:46:08 PM »
What? Really? I should stop playing on free play :P


Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Automatic gui patch
« Reply #42 on: June 25, 2018, 06:01:44 PM »
@Frank, Now I remember it. It's a little hidden in current releases, that's another reason I totally forgot it.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Automatic gui patch
« Reply #43 on: June 25, 2018, 06:37:55 PM »
Much of what is there has since been forgotten. Also a lot of what was started once again fell asleep.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #44 on: June 26, 2018, 01:23:57 AM »
I hope you have not forgotten the network filters..... hehehehe  ;D ;D ;D


Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #45 on: September 15, 2018, 09:19:40 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Automatic gui patch
« Reply #46 on: September 15, 2018, 02:45:06 PM »
Why not? As long as we can keep the in game corrdinates at 16 bit for all objects ...

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #47 on: October 13, 2018, 09:51:41 AM »
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


Offline mammothim2906 england

  • *
  • Posts: 690
  • Languages: EN
[Question] Automatic gui patch
« Reply #48 on: October 13, 2018, 10:48:15 AM »
Can this be incorporated into Extended?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9309
  • Languages: De,EN,JP
Re: Automatic gui patch
« Reply #49 on: October 13, 2018, 02:01:56 PM »
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.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #50 on: October 13, 2018, 08:06:19 PM »
@dwachs
Can you publish an executable to do some tests?.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #51 on: October 14, 2018, 10:24:09 AM »

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Automatic gui patch
« Reply #52 on: October 15, 2018, 12:33:15 AM »
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.

Offline ACarlotti

  • *
  • Posts: 244
Re: Automatic gui patch
« Reply #53 on: October 15, 2018, 03:42:29 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #54 on: November 28, 2018, 07:26:30 PM »
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

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #55 on: November 28, 2018, 11:41:55 PM »
I am very happy to see progress in this great project, I would like an executable to do some tests, greetings!  ....  ;D

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #56 on: November 29, 2018, 07:24:14 AM »
Did/Does the executable in the earlier post above work for you? I will post a more recent version later this day.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #57 on: November 29, 2018, 10:31:10 AM »

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






Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #58 on: November 29, 2018, 12:26:34 PM »
I 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #59 on: November 29, 2018, 07:14:25 PM »
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

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #60 on: November 29, 2018, 10:54:23 PM »

do 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.
« Last Edit: November 29, 2018, 11:33:52 PM by Yona-TYT »

Offline Leartin

  • Devotee
  • *
  • Posts: 1079
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Automatic gui patch
« Reply #61 on: November 30, 2018, 05:02:01 AM »
Is it intentional that this executable does not support ttf fonts, while r8600 does? Would be nice to test it with scaled fonts.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #62 on: November 30, 2018, 07:14:48 AM »
@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.

Offline ceeac

  • *
  • Posts: 11
Re: Automatic gui patch
« Reply #63 on: November 30, 2018, 03:55:16 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #64 on: November 30, 2018, 08:19:31 PM »
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

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #65 on: November 30, 2018, 10:53:43 PM »
Some components of the windows are superimposed to the news ticker.  :o




Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #66 on: November 30, 2018, 11:00:28 PM »
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.
« Last Edit: December 01, 2018, 12:39:11 AM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4493
  • Languages: EN, DE, AT
Re: Automatic gui patch
« Reply #67 on: December 01, 2018, 09:13:26 AM »
which components are drawn in the ticker region? From your screenshots is looks like title bar and minimap. Thanks for testing

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1148
    • Simutrans-BLOG
  • Languages: ES
Re: Automatic gui patch
« Reply #68 on: December 01, 2018, 10:10:20 AM »
For the moment I've only got those two, I'm going to do more tests in search of others, greetings!... ;)

Offline Leartin

  • Devotee
  • *
  • Posts: 1079
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Automatic gui patch
« Reply #69 on: December 01, 2018, 01:04:59 PM »
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.)