The International Simutrans Forum

 

Author Topic: Pinned the window  (Read 2154 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Pinned the window
« on: October 21, 2020, 03:59:30 AM »
Hi, there.
I found it useful to have the pinned feature commonly found in simulation games and MMORPGs in simutrans and made this patch to port it.

Currently pinned-like features exist in simutrans, but they don't pin the window. Therefore, the pin needle seems to be broken. The expression "pinned", and some theme icons, are incorrect. It only prohibits closing with the BackSpace key.

This is useful for keeping the toolbar at all times.
The minimized transparent bar doesn't disturb the game screen very much.


The patch I submit is for extended, but I think it can be applied to standard almost as it is.

Personally, I also wanted a lock function that prohibits closing with ESC, but I have not implemented it. (´・ω・`)
Would it be useful to have such an option?

What do you think about this?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Pinned the window
« Reply #1 on: October 21, 2020, 08:05:39 AM »
Pinned mean keeping the window open. How does making the window unmovable will help?

Offline freddyhayward

  • Devotee
  • *
  • Posts: 692
  • Languages: EN
Re: Pinned the window
« Reply #2 on: October 21, 2020, 08:18:18 AM »
Pinned mean keeping the window open. How does making the window unmovable will help?
To prevent accidentally moving it, and also to prevent accidentally closing it when habitually pressing ESC.

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: Pinned the window
« Reply #3 on: October 21, 2020, 08:39:09 AM »
To prevent accidentally moving it, and also to prevent accidentally closing it when habitually pressing ESC.
Yes, many other games have such a feature. Often a lock icon. So I initially misunderstood that simutrans would work that way too.
I felt strange that I could move it even though I pinned it.

I think that the function to hide other than the title bar by right-clicking is one of the excellent functions of simutrans.
But I think If it were made translucent, I think it would be less disturbing to the main screen.

How does making the window unmovable will help?
I'm sure there are some players who want to keep their frequently used toolbars in the same position all the time and never close.

Offline Roboron

  • Devotee
  • *
  • Posts: 364
    • Las Galácticas Aventuras de Komoyo Diga
  • Languages: ES, EN
Re: Pinned the window
« Reply #4 on: October 21, 2020, 11:19:11 AM »
I don't like that it is made transparent. This can be hard to see for some players (Accesibility).

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Pinned the window
« Reply #5 on: October 21, 2020, 12:19:58 PM »
Something that can also be useful is that it also keeps the window always in front (before I thought that was its function).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Pinned the window
« Reply #6 on: October 21, 2020, 12:25:01 PM »
The pinning is an ancient function from Solaris (Sun OS, from 1986 on) to permanently open right click popup windows. It likely predates most games with windowed GUI ...

Standard also remembers last window position/sizes, so even after close it should reopen at the same position.

Offline Mishasama

  • *
  • Posts: 52
  • BE NICE
  • Languages: JA, ZH, EN
Re: Pinned the window
« Reply #7 on: October 21, 2020, 01:51:59 PM »
I don't like that it is made transparent. This can be hard to see for some players (Accesibility).
I love this change, it looks very nice for a small game window. And even nicer if it can make the button transparent too.
Of cause, it should have a switch for accessibility.

Something that can also be useful is that it also keeps the window always in front (before I thought that was its function).
Yes, it would be great if it can keep the windows always in front.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Pinned the window
« Reply #8 on: October 21, 2020, 03:21:33 PM »
Yes, it would be great if it can keep the windows always in front.
It would be good to make an extension request for this, it will help a lot when playing with touch screens for example. ;)

Offline Matthew

  • Devotee
  • *
  • Posts: 631
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Pinned the window
« Reply #9 on: October 21, 2020, 03:50:04 PM »
Pinned mean keeping the window open.
Yes, many other games have such a feature. Often a lock icon. So I initially misunderstood that simutrans would work that way too.
I felt strange that I could move it even though I pinned it.

I shared Ranran's experience. My expectation of "pinned" and the pin icon is that the window stays open in the same place.

Quote
I think that the function to hide other than the title bar by right-clicking is one of the excellent functions of simutrans.

I rely on this very heavily when I have to play on 1366x768. It really is helpful; thank you to whoever coded it long ago!


Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: Pinned the window
« Reply #10 on: October 21, 2020, 05:28:32 PM »
I don't like that it is made transparent. This can be hard to see for some players (Accesibility).
Pinning means that the player always expects it to be there and the player knows it is there.
Transparency can be restored by releasing the pin.
This emphasizes that the window is more pinned than it is now. Its operation is based on other games. (In another example, the window background may be transparent)

And the larger the font, the larger the area of the bar tends to be. Because simutrans has the same font size for all fonts. It is not possible to enlarge only a specific texts. So I noticed that the title bar tended to be annoying.
A shadow of the same color as the title bar is added so that the font of the title bar is not difficult to read. I think it's working fine for now.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5695
  • Languages: EN, NO
Re: Pinned the window
« Reply #11 on: October 21, 2020, 05:47:15 PM »
Pinning for me means that the window does not get closed when I chose to close all windows. That is what I'm used to from everywhere else, and that is the only feature I need.

When I drag a window, I want it to move. It is a bigger problem for me that a window I want to move doesn't, than accidentally moving a window I don't want to move. So if a feature to lock a window's position is implemented, it should be a different button from the pin button. And preferably far away from other buttons I use, so I don't accidentally click it. (I tend to click on the help button a lot, despite never wanting to.)

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: Pinned the window
« Reply #12 on: October 21, 2020, 11:32:03 PM »
Thank you for your opinions.
Okey, now I submit a new version.

- Locked and Pinned have been separated.
- Locked prohibits closing windows by any ways.
- When locked, the title bar becomes translucent.
- Pinned prohibits moving windows.
- Pinned prohibits BackSpace from closing windows. (As before)




There should be a conflict in the processing of rdwr (from the extended ver.). I'm not sure about the standard version. I'm sorry but if you merge this, please fix it.

It also provides lock icons for standard and modern theme. For other themes it is lacking. It replaces with the text like any other icon.
I think the Aero theme is a Mac design, but I'm not a Mac user, so I have no idea what kind of design it is suitable for.
If you add lock icons anyway, it is recommended to update them.


Pinning for me means that the window does not get closed when I chose to close all windows.
I'm sorry. What I said was general theory.

Quote
So if a feature to lock a window's position is implemented, it should be a different button from the pin button.
This suggestion feels very strange to me. Because the role of the pin button is to lock the position.
Intuitively, we should associate the Lock icon with something that prevents it from closing and the Pinned icon with something that prevents it from moving.
When removing the pinned item, pull out the pin. In other words, it means that you should release the pin once. Otherwise it will be torn. Therefore, the player does not anticipate such a feature from that icon.

To me, the current mobile specs feel like they're just magnetically attached to a magnet board rather than pinned to a cork board. So it is movable and easy to remove(close).
It is inconsistent with the icons represented in many themes.

IMO, experienced players are accustomed to the current specifications, but the current specs are a source of confusion for new players. Because it's neither intuitive nor common compared to other games.
However, in many cases these are combined or have only a locking function. I didn't think the need to separate, so I initially tried to combine them into one.
I also had the idea of adding an option to give pinned a lock feature in simconf.tab.

P.S. Google Translate always translates pinned as "固定する". "固定する" means fixed.

EDIT:
There was a missing line in the first attached patch file so I reattached the correct file.
« Last Edit: October 21, 2020, 11:58:57 PM by Ranran »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Pinned the window
« Reply #13 on: October 22, 2020, 12:06:20 AM »
It occurs to me to combine the "lock" with the "pinning" to keep the window always visible, that would be great!.  8)
lock + pinning = window always in front

Offline Sirius

  • Devotee
  • *
  • Posts: 1651
  • Languages: DE, EN
Re: Pinned the window
« Reply #14 on: October 22, 2020, 02:57:17 AM »
I like that feature.
Imho, there are 3 things pinning should do:
- Keep the window in the same location
- Prevent the window from being (accidently) closed
- Keep the window in the foreground, but ensure other windows title bars won't get stuck behind it. (e.g. by using snapping or something)

Splitting this into two different buttons is fine.

Offline Leartin

  • Oh no, not him again!
  • Devotee
  • *
  • Posts: 1590
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Pinned the window
« Reply #15 on: October 22, 2020, 09:05:17 AM »
What pinning usually does, from my expierience, is keep something in place in an otherwise dynamic environment. If we were to look for examples in Simutrans, a usecase could be pinning a vehicle in the depot such that it will always be listed first, no matter which sorting order is used. Of course, that doesn't work with Simutrans menus since there is no dynamic environment.

The current Simutrans pinning feature is indeed strange, even if we forget about the Icon for a moment, as that can be changed with themes anyway. A new player would press the pin button and notice no difference whatsoever. Nothing changes - the dialog can still be moved or closed, and if you close it, it doesn't appear at the same position. If you pin a message that disappears on it's own (eg. "sucessfully loaded" on game start), it still disappears.

Now, if there was a button in the main menu "close all unpinned dialogs", the interaction would be obvious. But as is, it only ever has any effect when a player knows and uses a keyboard shortcut. In that case, wouldn't it be better to drop the button and use a keyboard shortcut for pinning the active window instead? (The other option being to include the close-button in the main menu, but that's just cluttering)
On the other hand, there is no visual indication that you can reduce dialogs to their titlebar (right click). Wouldn't that be more wanting of a button in the title bar?

Another thing: I think menus and other dialogs can't be put in the same bag here. For the menu, what you'd want is fixing them in place entirely and long-term. For other dialogs, you just want to pin something as a reminder to deal with it later, so it's not accidentially closed.
Perhaps a suggestion for menus: Allow players to drag menus to the left edge to add them to a custom menu-list. From there, they open without a titlebar and always in the defined order. Those menus could be unaffected by backspace, and because they have no titlebar, they are locked in place. (Mockup attached - of course this would look much better with themed menus like in the comic paksets)

Offline Roboron

  • Devotee
  • *
  • Posts: 364
    • Las Galácticas Aventuras de Komoyo Diga
  • Languages: ES, EN
Re: Pinned the window
« Reply #16 on: October 22, 2020, 09:20:38 AM »
It occurs to me to combine the "lock" with the "pinning" to keep the window always visible, that would be great!. 

I'm with Yona here, having both buttons combined into one is the simplest solution, and doesn't require dealing with existing themes. Besides, the "pin" button should "pin" the windows (fixed position), because that's what the "pin" visually represents.

Offline Isaac Eiland-Hall

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3926
  • Providing hosting for Simutrans projects
    • pc2.io
  • Languages: EN
Re: Pinned the window
« Reply #17 on: October 22, 2020, 02:34:41 PM »
In certain versions of Windows, certain software had a "pin" button that meant "keep this window on top".

The meaning can vary.

It seems to me that it's not a bad thing to figure out what would be useful for players and then attempt to provide useful options.

Trying to meet existing expectations is a good thing, but should not limit functionality, particularly when not everyone will agree on what constitutes expected behaviour, and also because it is trivially easy to learn what functions do.

That being said, exposing more UI elements is often no bad thing. Complexity can be bad, but if we ended up with a button or two added to the buttons that control the toolbar, I don't think that would be overly complex.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Pinned the window
« Reply #18 on: October 23, 2020, 01:51:00 AM »
For me, unmoving toolbars would very annoying, while I use the backspace button to close all unpinned windows frequently. So I would rather have both.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5695
  • Languages: EN, NO
Re: Pinned the window
« Reply #19 on: October 27, 2020, 06:59:57 PM »
What pinning usually does, from my expierience, is keep something in place in an otherwise dynamic environment. If we were to look for examples in Simutrans, a usecase could be pinning a vehicle in the depot such that it will always be listed first, no matter which sorting order is used. Of course, that doesn't work with Simutrans menus since there is no dynamic environment.
Yes, that is also something I'm used to, often in combination with what I wrote last time, but sometimes not. When pinning overrides dynamic ordering, it is usually possible to rearrange the pinned things in the pinned area by manually by dragging them around.

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: Pinned the window
« Reply #20 on: October 31, 2020, 09:36:39 AM »
The expression pinned is certainly used in the windows task tray. MSVC also had similar functions and expressions.
Apologies for my poor insight. (´・ω・`)
I've come up with another approach so I drop this patch. I apologize for the inconvenience.
However, if you find this useful, you can use it.

I like the idea of the task tray. But I think it might be another big project.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Pinned the window
« Reply #21 on: October 31, 2020, 12:18:18 PM »
I still think having a pinning button for people who like unmoving windows is a good idea, there was lot of support. Probably most helpful for tablet palyers, since there an accidental move could happen much easier than with the mouse.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Pinned the window
« Reply #22 on: October 31, 2020, 02:21:13 PM »
I still think having a pinning button for people who like unmoving windows is a good idea, there was lot of support. Probably most helpful for tablet palyers, since there an accidental move could happen much easier than with the mouse.
Certainly immobilized windows are a good idea for use on mobile devices for example.

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: Pinned the window
« Reply #23 on: November 01, 2020, 04:51:06 AM »
Thank you for your thoughts. I was a little less confident.

What I came up with the idea is adding hide_all_window to the simple tool.
This is similar to the ability to display the desktop in windows. It hides all windows. But in simutrans the title bar remains.
This action calls open_all_windows if all windows are hidden and conversely opens all windows.

I thought that these two behaviors might reduce the need for window locks a bit.
It is a function independent of the submitted patch, so if the currently submitted patch is useful as it is, you can use it.