The International Simutrans Forum

 

Author Topic: new simple_tool - roll up all windows  (Read 1004 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
new simple_tool - roll up all windows
« on: November 06, 2020, 01:20:00 PM »
I made a patch from an idea I posted in another thread. (´・ω・`)
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.
The contents are as written there.
This is more convenient when used in combination with the previously submitted lock the window feature. (Especially the title bar transparency)
The rollup function is a very useful function. I love it. These two will enhance the usefulness of the rollup feature.

This feature uses simple_tool number 37.
Code: [Select]
simple_tool[37]=,F5

Demo:

Just press the key once to roll up all dialogs. Press it again to open all windows.
Personally, I'll be using this feature more often than backspace.

The patch is here, but I'm sorry I've only tested it with extended. The demo image is also extended. However, I hope you like this. (´・ω・`)

Also I think it would be convenient to be able to register minimize, pin, and follow (jump) as shortcut keys.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10672
  • Languages: De,EN,JP
Re: new simple_tool - roll up all windows
« Reply #1 on: November 12, 2020, 12:24:32 AM »
I think this tool is a very useful tool. We are running out of hotkeys. Maybe I should assign useless keys like scroll lock to this action on PCs or F12 or so ...

Offline THLeaderH

  • Coder/patcher
  • Devotee
  • *
  • Posts: 424
  • Languages: JP,EN
Re: new simple_tool - roll up all windows
« Reply #2 on: November 12, 2020, 04:09:20 AM »
I like this tool too  ;D

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
Re: new simple_tool - roll up all windows
« Reply #3 on: November 14, 2020, 12:13:16 PM »
Laptops may not have Scroll Lock on the keyboard layout.
I don't know which key is intuitively appropriate. In the example of windows, it is [windows key] + [D key].
Since F1 is the help, I was wondering if I could assign a shortcut key for the F2 and later keys to each gadget in the title bar.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10672
  • Languages: De,EN,JP
Re: new simple_tool - roll up all windows
« Reply #4 on: November 17, 2020, 03:12:31 AM »
Incorporated in r9408, thank you.

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
Re: new simple_tool - roll up all windows
« Reply #5 on: December 02, 2020, 02:34:24 PM »
Thanks for the integration.

Maybe I should assign useless keys like scroll lock to this action on PCs or F12 or so ...
Did you decide not to assign it to a unique key?

Offline Freahk

  • Devotee
  • *
  • Posts: 1523
  • Languages: DE, EN
Re: new simple_tool - roll up all windows
« Reply #6 on: December 02, 2020, 03:50:24 PM »
Pak192.comic agreed on this tool being useful, so we'd like to assign a key to it.

We'd like to map this tool to either shift+backspace or shift+esc as it's some kind of "soft close all", thus the functionality is tied to the functionality of those keys.

I don't know how to map this key combination and I suspect it's not even possible at the moment.

Could anyone help us to get this working?
« Last Edit: December 02, 2020, 05:30:59 PM by Freahk »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10672
  • Languages: De,EN,JP
Re: new simple_tool - roll up all windows
« Reply #7 on: December 03, 2020, 01:18:14 AM »
This would require code changes (as only the ASCII code is compared).

Offline Freahk

  • Devotee
  • *
  • Posts: 1523
  • Languages: DE, EN
Re: new simple_tool - roll up all windows
« Reply #8 on: December 03, 2020, 11:29:46 AM »
Well you suggested scroll lock or F12, which aren't ASCII too, so I assumed it might be possible.
Would this be a major code change?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10672
  • Languages: De,EN,JP
Re: new simple_tool - roll up all windows
« Reply #9 on: December 03, 2020, 01:44:07 PM »
Adding modifier key will involve some change, but I would not call this major. The modifier keys are part of the event structur, they are just not taken care. And the function and some other keys are translated to simutrans keys, so for scroll lock one just would need to add a key binding there.

EDIT:
r9471  added SCROLLLOCK, DELETE, ESCAPE, and BACKSPACE as well as modifier "+" for shift (to get the plus key with additional comma seperated parameter use "++". Please not that backspace, escape and delete without modifier cannot be overlaid!
« Last Edit: December 03, 2020, 02:53:09 PM by prissi »