Want to praise Simutrans?
Your feedback is important for us ;D.

new simple_tool - roll up all windows

Started by Ranran on indefinite leave, November 06, 2020, 01:20:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran on indefinite leave

I made a patch from an idea I posted in another thread. (´・ω・`)
Quote from: Ranran on November 01, 2020, 04:51:06 AMWhat 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.



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.


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


Ranran on indefinite leave

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.


Ranran on indefinite leave

Thanks for the integration.

Quote from: prissi on November 12, 2020, 12:24:32 AMMaybe 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?


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?


This would require code changes (as only the ASCII code is compared).


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?


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.

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!