The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Yona-TYT on August 20, 2021, 11:14:09 PM

Title: [Patch] Change the cursor pos to the object
Post by: Yona-TYT on August 20, 2021, 11:14:09 PM
I forgot to add it to the links of the scenario window.  :P 
Title: Re: [Patch] Change the cursor post to the object
Post by: prissi on August 21, 2021, 12:09:53 PM
Please what is this fixing?
Title: Re: [Patch] Change the cursor post to the object
Post by: Yona-TYT on August 21, 2021, 01:36:47 PM
I mean when this was changed:
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

Title: Re: [Patch] Change the cursor pos to the object
Post by: prissi on August 22, 2021, 02:19:52 PM
I see, in in 10045
Title: Re: [Patch] Change the cursor pos to the object
Post by: Yona-TYT on August 25, 2021, 02:41:33 AM


Please also add to the preview box.

Modify: gui/components/gui_world_view_t.cc
Code: [Select]
#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);
        }