The International Simutrans Forum

 

Author Topic: [patch] add goto-button to chat messages  (Read 2383 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
[patch] add goto-button to chat messages
« on: February 09, 2012, 02:19:49 PM »
This patch adds the following: whenever a chat message contains a map coordinate in the form @(234,23) then a goto button is shown in front of the message (like for the automatic generated messages, where the button brings you to the crowded station etc).

Offline Milko

  • Devotee
  • *
  • Posts: 829
Re: [patch] add goto-button to chat messages
« Reply #1 on: February 09, 2012, 02:22:25 PM »
Hello

   Very useful!

Thanks

Giuseppe


Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] add goto-button to chat messages
« Reply #2 on: February 09, 2012, 02:32:26 PM »
Great idea, but isn't synthax @(x,y) non-intuitive for new players?
How to explain them?

Here's an idea: clicking inspection tool on a tile saves coordinates. A special button in chat window could paste the last coordinates saved in the appropriate format.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: [patch] add goto-button to chat messages
« Reply #3 on: February 09, 2012, 03:21:32 PM »
That could be another stage...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: [patch] add goto-button to chat messages
« Reply #4 on: February 09, 2012, 04:16:42 PM »
Why the @(x,y)? Simply (x,y) would work also well, as one would rarely type this without coordinates in mind.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [patch] add goto-button to chat messages
« Reply #5 on: February 09, 2012, 11:29:51 PM »
How about middle clicking on a co-ordinate while in the chat window will paste the co-ordinates in the correct format into the chat text box?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] add goto-button to chat messages
« Reply #6 on: February 09, 2012, 11:48:33 PM »
Middle clicking-- not somethings my hands want to do, nor an easy guess for new players... But the idea is good.
Maybe with chat window open and text input box selected the cursor could turn into a marker (like with schedule dialog) and a normal left click on a tile would add the formatted coordinates... 

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [patch] add goto-button to chat messages
« Reply #7 on: February 10, 2012, 12:04:47 AM »
I thought middle clicking because it is the default paste button for Linux.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] add goto-button to chat messages
« Reply #8 on: February 10, 2012, 12:40:15 AM »
Sorry, I didn't know that. The only use I have for middle click is closing tabs in the browser...
It might be an option, although it needs to be more like copy than paste... :-[

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: [patch] add goto-button to chat messages
« Reply #9 on: February 10, 2012, 05:57:45 AM »
gnome & chrome: i middle click to open windows with the copied string as search term. (i don't know how windows users survive without that)

what james suggests is exactly the opposite of the behaviour in many linux window managers, middle click pastes, while normal click selects. in line with this a middle click on the chat window would enter the map coordinate of the last clicked field. (which i would not be too happy about, as i want my middle clicks to copy&paste text strings, eg when renaming lines)

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [patch] add goto-button to chat messages
« Reply #10 on: February 10, 2012, 06:11:21 AM »
I would suggest something simple to use, like last clicked coordinates that always results in a go to arrow.
This way there is no need to worry about using special commands in the message or special key strokes or mouse clicks to get it to work.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: [patch] add goto-button to chat messages
« Reply #11 on: February 10, 2012, 05:20:21 PM »
How many mouse buttons do Macs have nowadays? Didn't they use to have just one? And what about touch devices, though their lack of a keyboard may be more problematic.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: [patch] add goto-button to chat messages
« Reply #12 on: February 10, 2012, 07:46:56 PM »
Please avoid middle-click, it's not good for the Mac platform in general.

I agree that simply parsing any string of the form (x,y) should be sufficient, then put some text into the chat window to indicate that you can do this.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [patch] add goto-button to chat messages
« Reply #13 on: February 10, 2012, 08:56:28 PM »
How about without the brackets? Or perhaps double-click, if middle is difficult for some platforms?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: [patch] add goto-button to chat messages
« Reply #14 on: February 10, 2012, 09:03:13 PM »
without brackets it would confuse real values with a ',' as decimal separator (which is international standard, '.' is an american convention)

@10,6 with the @ but without the bracket could be alternatively used to the bracketed version. (on many keyboard layouts @ is easier to write than brackets)

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [patch] add goto-button to chat messages
« Reply #15 on: February 10, 2012, 10:25:24 PM »
from a player standpoint, the less we have to learn or read, the happier we are.
macros, functions to copy/paste, they are not needed if any message typed simply gives the coordinates of the last clicked location.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: [patch] add goto-button to chat messages
« Reply #16 on: February 10, 2012, 10:29:55 PM »
how about a syntax completion approach, writing @ and pressing tab would fill in the coordinate of the last pressed coordinate. tab completion is a gui concept anyone using a computer is likely accustomed to.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] add goto-button to chat messages
« Reply #17 on: February 10, 2012, 11:18:31 PM »
A mix of sdog's,  AEO's and original proposals:
Every message gives the coordinates of last clicked tile, unless you type explicitly @x,y or (x,y) -- both being accepted. Maybe default coordinates go in default colour, whereas explicit coordinates go in red (if a player enters them manually he must have a very strong reason to do so).
A @ with no coordinates (but no tab needed) would mark in red the default coordinates without typing them.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: [patch] add goto-button to chat messages
« Reply #18 on: February 16, 2012, 10:52:50 AM »
Incorporated in r5339.

I implemented both suggestions to type coordinates: @x,y  and (x,y) - the closing bracket can even be omitted.

Still searching a smart hint text to be shown in the message window.
Something like "Hint: typing @x,y will add a goto-button to your message"

Suggestions?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] add goto-button to chat messages
« Reply #19 on: February 16, 2012, 11:54:56 AM »
What about the idea of simple "@" (i.e. x,y omitted) being additionally  interpreted as @x_last_clicked,y_last_clicked?