Author Topic: [Patch] Compare players in finances window  (Read 7151 times)

0 Members and 1 Guest are viewing this topic.

Offline isidoro

[Patch] Compare players in finances window
« on: January 19, 2009, 05:24:00 AM »
A patch heading towards multiplayer: as you can see in the image, a white button appears in the players' window.  The button leads to finance statistics about all players together as well as the possibility to compare one item in all players.

Incidentally, the screenshot is taken from a game in which:
- Yellow deals with in-city passenger transport
- Red deals with inter-city passenger transport
- Green deals with sea transport
- Violet deals with air transport
- Rest of players deal with goods land transport

The patch is not yet finished.  I would like to be able to keep at most one button selected when in all_players and compare mode.


Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16086
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Patch] Compare players in finances window
« Reply #1 on: January 19, 2009, 03:58:20 PM »
Looks interesting!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline isidoro

Re: [Patch] Compare players in finances window
« Reply #2 on: January 20, 2009, 01:31:58 AM »
Final version of the patch.  Now, only one button is kept active in compare mode.  Moreover, selection is remembered just like other finances windows.  Hope you like it.

Offline gerw

Re: [Patch] Compare players in finances window
« Reply #3 on: January 20, 2009, 07:53:25 AM »
In your patch you save the finance history of each player twice: once in the player_t object and once in the static player_t variable. Is this really needed?

Offline isidoro

Re: [Patch] Compare players in finances window
« Reply #4 on: January 20, 2009, 08:29:42 PM »
I don't understand you.

Information is only stored once.  The static variable holds only the total amount of all players.

Offline gerw

Re: [Patch] Compare players in finances window
« Reply #5 on: January 21, 2009, 08:37:31 AM »
Information is only stored once.  The static variable holds only the total amount of all players.

Ok, then I misunderstood your code ;)
Maybe you name it sum_finance_history_* or overall_finance_history_*?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [Patch] Compare players in finances window
« Reply #6 on: January 21, 2009, 10:34:01 AM »
Maybe this window should be just shown for the public player, as its finances have not meaning anyway.

Offline isidoro

Re: [Patch] Compare players in finances window
« Reply #7 on: January 21, 2009, 11:36:38 PM »
Or perhaps, instead of the public player's.  Keeping the "All" label, and skipping the "public player" button.

But I wouldn't replace public player functionality.  Now, that window is not used, but nobody knows if that space or information would be needed in the future for multiplayer.


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [Patch] Compare players in finances window
« Reply #8 on: January 22, 2009, 09:56:16 AM »
The longer I look at it, the less I like to misuse this window. I think the data should be taken from a dropdown, and on the right there should be some buttons to exclude/include players for comparisons. This one here breaks the player expectations on too many levels I fear.

Offline isidoro

Re: [Patch] Compare players in finances window
« Reply #9 on: January 22, 2009, 10:09:11 PM »
Yes.  It can be taken away to other place. Or change the way the information is presented since only one quantity can be compared at the same time.  Besides, rethinking again, my idea to suppress "Public Service" button makes no sense: the button to switch to this player  would disappear too.

Or two buttons: Total and Compare.  The second with the same functionality of the compare but with the interface you propose (combo+select players)...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [Patch] Compare players in finances window
« Reply #10 on: June 02, 2009, 09:14:45 PM »
Did someone save the patch?

Offline isidoro

Re: [Patch] Compare players in finances window
« Reply #11 on: June 02, 2009, 11:27:10 PM »
I have put the last one that I have in here:http://simutrans-germany.com/files/upload/all2.patch.zip, but it's for r2243, I'm afraid...