Page 1 of 1

[SOLVED]Finding X and Y Coordinates

Posted: Wed Sep 30, 2020 1:31 pm
by galadain
Another beginner question: what the easiest way to find X and Y coordinates in a an existing scene?

Re: Finding X and Y Coordinates

Posted: Wed Sep 30, 2020 1:39 pm
by Harimak
I do it like that:
You start your game> shift + d> image location picker> search your image
sample: https://youtu.be/L9Vt7fcwkXk?t=513

Re: Finding X and Y Coordinates

Posted: Wed Sep 30, 2020 4:01 pm
by drKlauz
I use this

Code: Select all

default show_mouse_pos_info=False

init python:
  class DevtoolMouseposDisplayable(renpy.Displayable):
    def render(self,width,height,st,at):
      tr=Text("{}x{}".format(*renpy.get_mouse_pos()),color="#F00",font="DejaVuSans.ttf").render(width,height,st,at)
      bgr=Solid("#0004").render(max(160,tr.width+32),max(64,tr.height+32),st,at)
      rv=renpy.Render(bgr.width,bgr.height)
      rv.blit(bgr,(0,0))
      rv.blit(tr,((bgr.width-tr.width)//2,(bgr.height-tr.height)//2))
      renpy.redraw(self,0)
      return rv

screen devtool_mousepos():
  zorder 9999
  key '`' action ToggleVariable("show_mouse_pos_info")
  if show_mouse_pos_info:
    add DevtoolMouseposDisplayable()
You need to show devtool_mousepos screen at start of game. Then press `(button below esc) to show/hide current mouse pos.

Re: Finding X and Y Coordinates

Posted: Wed Sep 30, 2020 10:20 pm
by galadain
Thanks everyone. This worked.

How do I mark this as "solved"?

Re: Finding X and Y Coordinates

Posted: Thu Oct 01, 2020 12:49 am
by Per K Grok
galadain wrote:
Wed Sep 30, 2020 10:20 pm
---

How do I mark this as "solved"?
In your first post in the thread you click on the pencil-icon ("Edit post"). It is in the top-right corner.
In the window that opens you have a field for "Subject". That is the title of the thread. Add "[SOLVED]" to the text in that field and press the submit button below the area for the main text of the post.