The International Simutrans Forum

 

Author Topic: Coming issue: Font size and dialog size issue  (Read 518 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1412
  • Languages: ja
Coming issue: Font size and dialog size issue
« on: September 26, 2020, 04:50:23 AM »
Font size and dialog size issue

Incorporating from the standard will allow for a choice of font sizes and themes. As a result, new problems arise.
Extended has added a lot of new items to the dialog inherited from the standard. Sometimes it's packed with a lot of information. Unfortunately, it may already exceed the displayable limit.
That's a problem because it packs such information into dialogs that don't have scrollbars. Unless you buy a large monitor, you will not be able to see the information in the lower row of the dialog. (´・ω・`)
For example like this.

Note that most other dialogs do not require this large dialog height.

For example, in the building information window, information on nearby stations occupies many lines.
There are also many lines in road information window.
A simple fix is to add scrollbars here, but ideally these should have their own info dialogs.
And it's also a good idea to tab it to organize the information.
Now you can remove the restriction from the information that is intentionally reduced.
For example, connection information of surrounding stations and roads.

Sadly I don't know how to create a new window and I don't have time to work on it. There are tons of other issues that need to be resolved. (´・ω・`)

Unfortunately, font size selection or some dialogs will still have this problem until it is implemented.
I came to inform you of it today. Thank you.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10439
  • Languages: De,EN,JP
Re: Coming issue: Font size and dialog size issue
« Reply #1 on: September 26, 2020, 12:46:12 PM »
Adding tabs is very easy, since they can be also part of a container. Since this is probably a multiline string, it looks like very straight forward. But then GUI work is quite an effort most programmers often tend to avoid.

Offline Matthew

  • *
  • Posts: 511
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Coming issue: Font size and dialog size issue
« Reply #2 on: September 26, 2020, 01:02:02 PM »
Ranran, I can see from Github that you have been very busy incorporating Standard's new GUI framework into Extended. This does not have many results yet, but this very large project is so important for the long-term future of Simutrans. Thank you so much for all your efforts!



(Image: Wikimedia Commons/Ie zzeblex, CC-BY-SA)

Offline Ranran

  • Devotee
  • *
  • Posts: 1412
  • Languages: ja
Re: Coming issue: Font size and dialog size issue
« Reply #3 on: January 13, 2021, 01:28:19 PM »
Well, I'm going to dismantle the notepad style windows and start renovating little by little.
They don't have scrollbars as mentioned above, so they have the problem of not being able to read everything if the font is large.
Therefore, we will add tabs, add scrollbars, align, graphicalize, modernize, and transform to improve readability while making it compact.

As the first step, I made a patch to renovate the Building info window.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/building-info-overhaul

The outline is
- It is unified with the appearance of halt detail.
- Redundant display integration is intended. As a result, 7 translatable words are no longer needed instead of 5 translatable words. You will need to check those labels and content.
Code: [Select]
Trip data
Visitor arrivals
Commuter arrivals
Statistics
Signalbox info.

- A dedicated tab is added in signalbox. The connected signals are now listed.

Unfortunately it's time for yakiniku. I have to go.
See you at the next restaurant. (´・ω・`)

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20648
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Coming issue: Font size and dialog size issue
« Reply #4 on: January 13, 2021, 06:01:41 PM »
Thank you for this. Can I confirm whether this is ready for testing and possible integration?

Offline Ranran

  • Devotee
  • *
  • Posts: 1412
  • Languages: ja
Re: Coming issue: Font size and dialog size issue
« Reply #5 on: January 14, 2021, 03:10:44 AM »
Thank you for this. Can I confirm whether this is ready for testing and possible integration?
Yes. I made some additional changes last night and that's it.
The fourth tab of the factory info dialog has also been modified to use the same UI functions, so the appearance will change as well.

Offline Ranran

  • Devotee
  • *
  • Posts: 1412
  • Languages: ja
Re: Coming issue: Font size and dialog size issue
« Reply #6 on: January 14, 2021, 12:55:22 PM »
Oops, I forgot to explain. (´・ω・`)

The UI has been updated, but this dialog can display a lot of information, so it can now have a help file.
The name of the help file is "building_info.txt". Keep in mind that signalbox may have its own tabs. The signalbox will preferentially try to open that tab.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20648
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Coming issue: Font size and dialog size issue
« Reply #7 on: January 14, 2021, 11:06:44 PM »
This looks very good, thank you for this. One query: although this has never been implemented in Pak128.Britain and many of the other Extended specific paksets, Simutrans has long had a feature allowing extended text to be shown in the building information window. This can be seen in Pak128, I believe, and possibly also Pak64. Has this feature been tested with the new UI? I did hope possibly to implement this for some buildings in Pak128.Britian-Ex in the future. One possible implementation would be to give this extended text its own tab, perhaps labelled "building details" or similar.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10439
  • Languages: De,EN,JP
Re: Coming issue: Font size and dialog size issue
« Reply #8 on: January 14, 2021, 11:51:03 PM »
This extended text is just the translation of the name. For attractions the convention is to have "Short Name\n\ndescription text", so the list can rip these apart by checking for "\n\n" to separate short from long description.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20648
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Coming issue: Font size and dialog size issue
« Reply #9 on: January 15, 2021, 09:52:53 PM »
Thank you for the  update. One thing that I notice when testing is that there is often a horizontal scroll bar in the building information window, and, when the names of the connected stops are long, the right hand side of the information is truncated; but it is not possible to make the window any wider. Is it possible to address this, or would this be complex and/or difficult?

Offline Ranran

  • Devotee
  • *
  • Posts: 1412
  • Languages: ja
Re: Coming issue: Font size and dialog size issue
« Reply #10 on: Yesterday at 06:03:36 AM »
Quote
This extended text is just the translation of the name. For attractions the convention is to have "Short Name\n\ndescription text", so the list can rip these apart by checking for "\n\n" to separate short from long description.
Thank you for the explanation.
Unfortunately, the original building name is often a meaningless name such as COM_00_06, so it seems that there are many examples of explaining the building without even inserting line breaks in the Japanese text...

In addition, c ++ doesn't have a function like split, so I have to create it myself.

Quote
One query: although this has never been implemented in Pak128.Britain and many of the other Extended specific paksets, Simutrans has long had a feature allowing extended text to be shown in the building information window. This can be seen in Pak128, I believe, and possibly also Pak64. Has this feature been tested with the new UI?
As explained by prissi, it's a tricky use of name translation, and that part is contained in the upper text area.
That part of the code is still the same as the standard and such translated text will greatly expand the upper space.

Quote
I did hope possibly to implement this for some buildings in Pak128.Britian-Ex in the future.
Do you expect this to be achieved by translating the name as explained above?
As you explain, I don't think that translation method is used in the pakset currently available in extended.
I'm not sure if that's a good way to implement such a feature.

Quote
One possible implementation would be to give this extended text its own tab, perhaps labelled "building details" or similar.
It may also be able to move to that tab with Appears from and Author information.


Quote
One thing that I notice when testing is that there is often a horizontal scroll bar in the building information window
Thank you for your feedback.
This was the reason why the width of the heading always displayed the scroll bar. I think it has been fixed.

Quote
when the names of the connected stops are long, the right hand side of the information is truncated; but it is not possible to make the window any wider. Is it possible to address this, or would this be complex and/or difficult?
This was because early testing of the implementation was causing layout corruption and therefore prohibited lateral expansion.
However, it seems that the problem has been solved now, so it has been changed so that it can be expanded horizontally.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20648
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Coming issue: Font size and dialog size issue
« Reply #11 on: Yesterday at 02:16:35 PM »
Thank you for this - I have now incorporated this.

I have to say, I was not aware of the extended translation system actually used - I agree with Ranran that, with a modern UI at least, this is not an optimum way of doing it.

I should be interested in feedback on a potentially better way of doing this - perhaps having a separate description field in a building which can be translated separately and put into a tab?