News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Enable the convoy mouseover tooltip for more than the first tile of convoy

Started by RESTRICTED ACCOUNT, May 14, 2020, 09:45:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

Hello, world\n

I think the display setting of "convoy mouseover tooltip" is more convenient if the tooltip is displayed even when the mouse is over a tile other than the first tile of convoy.
For example, even with a convoy that currently has a length of 10 tiles, the tooltip will not be displayed unless you mouse over the first tile. It devalues this option.


I suppose it is possible even if player clicks on the vehicle behind first tile, as the information dialog for that convoy will open correctly.

That tooltip display is processed here
https://github.com/aburch/simutrans/blob/4c38d9f08b6f95ce251621da614c747570f1ff92/vehicle/simvehicle.cc#L1698
I tried to do it myself. How can I get convoy its head vehicle is on another tile from a tile? I didn't found the answer in DIY shop Kohnan. So I couldn't achieve it after all.
I'm lazy pork so I'm sorry but I post it as an extension request. (´・ω・`)ため息が出ちゃう。だって豚だもの

I know that your small improvements are improving Simutrans day by day. Thanks.

prissi

I tried this too, but it is non-trivial. I mean getting the coinvoi (and the head vehicle is easy, but drawing on (and only one) tooltip at the tile of the mouse is the challenge.

RESTRICTED ACCOUNT

Thank you for the explanation. Certainly it seems to be difficult.
残念ですが諦めます。 ::'( (It is difficult to properly translate this Japanese... The literal translation may look different.)

RESTRICTED ACCOUNT

Ranran is here. (´・ω・`)らんらんよー

Quote from: prissi on May 14, 2020, 11:57:53 AMI tried this too, but it is non-trivial. I mean getting the coinvoi (and the head vehicle is easy, but drawing on (and only one) tooltip at the tile of the mouse is the challenge.
As a result of a long time, a solution to this issue has emerged to me.  :lightbulb:

Quote from: Ranran on May 14, 2020, 10:14:12 PM残念ですが諦めます。 
(´・ω・`)一度諦めて試合終了してもまた再試合すればいいのよ?

I attach the patch. And the algorithm is...
- Centipede's head checks if all his parts on another tile have been bitten by a mouse.
- Checking the display condition of the tooltip and executing the display (display_overlay) is still done only by the centipede head part (the one leading centipede's body).
With this, even if you poke the tail of the centipede, you will see only one tooltip on its head.

I hope you guys love this sensitive centipede.  :heart:

(´・ω・`)日本語原文↓ My Jangrish may be far from English.
(´・ω・`)コロナが始まったあの頃から永い時を経てこの問題の解決法が湧いたの
(´・ω・`)つまりらんらんも変異したってことね
(´・ω・`)百足の頭は別のタイル上にある自分の胴体も含めて鼠に齧られているかチェックします
(´・ω・`)ツールチップの表示条件チェックおよび表示の実行(display_overlay)はこれまで通り百足の頭部パーツだけがやります
(´・ω・`)ピコーン :lightbulb: するのは頭の上って決まってるので
(´・ω・`)これで百足の尻尾を調べてもツールチップが1つだけ表示されます
(´・ω・`)みんなも敏感な百足ちゃんを愛して?
(´・ω・`)ところでthis sensitive centipedeって早口で言うの難しいと思うのだけど
(´・ω・`)むかでぽーく


Yona-TYT

It seems that someone lit up the headlight hehehehehe. 💡💡💡