News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Pinned the window

Started by Ranran(retired), October 21, 2020, 03:59:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

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?
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

prissi

Pinned mean keeping the window open. How does making the window unmovable will help?

freddyhayward

Quote from: prissi on October 21, 2020, 08:05:39 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.

Ranran(retired)

Quote from: freddyhayward on October 21, 2020, 08:18:18 AMTo 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.

Quote from: prissi on October 21, 2020, 08:05:39 AMHow 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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Roboron

I don't like that it is made transparent. This can be hard to see for some players (Accesibility).

Yona-TYT

Something that can also be useful is that it also keeps the window always in front (before I thought that was its function).

prissi

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.

Mishasama

Quote from: Roboron 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).
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.

Quote from: Yona-TYT 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).
Yes, it would be great if it can keep the windows always in front.
Because of some reason. I am looking for volunteers who can help me update the Pak64.Nightly.

I'm helping to build the Chinese community for now.
如果您是使用中文的玩家,歡迎到這裏尋找同好或張貼您們組織的聯係方式。
如果你是中文玩家,欢迎来这个帖子里找组织或者贴出你们的联系方式。

Yona-TYT

Quote from: Mishasama on October 21, 2020, 01:51:59 PMYes, 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. ;)

Matthew

Quote from: prissi on October 21, 2020, 08:05:39 AMPinned mean keeping the window open.
Quote from: Ranran on October 21, 2020, 08:39:09 AM
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.

QuoteI 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!

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ranran(retired)

Quote from: Roboron on October 21, 2020, 11:19:11 AMI 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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ters

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.)

Ranran(retired)

#12
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.


Quote from: Ters on October 21, 2020, 05:47:15 PMPinning 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.

QuoteSo 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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Yona-TYT

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

Mariculous

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.

Leartin

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)

Roboron

Quote from: Yona-TYT on October 22, 2020, 12:06:20 AMIt 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.

Isaac Eiland-Hall

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.

prissi

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.

Ters

Quote from: Leartin on October 22, 2020, 09:05:17 AMWhat 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.

Ranran(retired)

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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

prissi

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.

Yona-TYT

Quote from: prissi 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.
Certainly immobilized windows are a good idea for use on mobile devices for example.

Ranran(retired)

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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)