The International Simutrans Forum

 

Author Topic: [Patch] Change the cursor pos to the object  (Read 344 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1792
    • Simutrans-BLOG
  • Languages: ES
[Patch] Change the cursor pos to the object
« on: August 20, 2021, 11:14:09 PM »
I forgot to add it to the links of the scenario window.  :P 
« Last Edit: August 21, 2021, 03:24:33 PM by Yona-TYT »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10976
  • Languages: De,EN,JP
Re: [Patch] Change the cursor post to the object
« Reply #1 on: August 21, 2021, 12:09:53 PM »
Please what is this fixing?

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1792
    • Simutrans-BLOG
  • Languages: ES
Re: [Patch] Change the cursor post to the object
« Reply #2 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


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10976
  • Languages: De,EN,JP
Re: [Patch] Change the cursor pos to the object
« Reply #3 on: August 22, 2021, 02:19:52 PM »
I see, in in 10045

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1792
    • Simutrans-BLOG
  • Languages: ES
Re: [Patch] Change the cursor pos to the object
« Reply #4 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);
        }