News:

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

[Patch] Change the cursor pos to the object

Started by Yona-TYT, August 20, 2021, 11:14:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

I forgot to add it to the links of the scenario window.  :P 

prissi


Yona-TYT

I mean when this was changed:
Quote from: prissi on February 04, 2021, 12:41:05 PM
This was surprisingly easy, just needed six lines of code. In r9598 the cursor will be placed on the tile in all reposition events (using the eye) and the posbutton. This makes also connection factories etc. easier.
Forgot to add to the scenario window links, this patch does.  :P


prissi


Yona-TYT



Please also add to the preview box.

Modify: gui/components/gui_world_view_t.cc

#include "../../obj/zeiger.h"


        if (welt->is_within_limits(pos.get_2d())) {
            welt->get_viewport()->change_world_position(pos);
            welt->get_zeiger()->change_pos(pos);
        }