0.4.0 Anchors Ahoy!
For the interested ones, here's (finally) a feature update.
This time, it's anchors. Just use Alt to reach the correct option and you are good to go.
You just start manipulating and notice the anchor with the green dot.
The anchor lets you know it's the anchor point where the anchor is and the green dot lets you know the exact point where the anchor value means in the achored element for the anchor value. Wow that's a lot of "anchor".
In practice, the anchor image (except when it fails) helps you find the green dot and know the green dot is the anchor and the green dot confirms exactly where the anchor is.
So, if I move the Displayable using the mouse or keyboard in both X and Y (using Shift to change to Y), I can end up with this. Feel free to try it out.
Rant and technical content warning. If you dislike, jump to the comments
How to implement intuitively?
One might think this is easy. (1)Just click where you want the anchor to be, right? Or maybe (2)just drag the anchor to the right place in the Displayable.
That's how I would do, yes. However... Small problem. I have no idea where the Displayable is on the screen and I have no idea how to know that for now.
Oh gee... So... How can I just hover and do these "move stuff" I do?
"Good question my friend". The answer is simple. You don't. I just know that the mouse moved X number of pixels and I reflect that in moving the Displayable itself. I know that there's the `Drag` displayable so it technically should be possible and I can see how it is but it's hundreds of lines... I could use the `event` method of Displayable but that would require a bit of a redesign (fine by me) but also it wouldn't work if the creator wants the anchor outside the Displayable (ups?). That's not all. There's also other things not supported. If the dragging displayable is behind another one, this becomes impossible.
Finally... Drag would only allow me to figure out absolute positions. Ren'py supports both absolute and relative and even both together. It would be kinda lackluster, no?
So, I never know where the Displayable is relative to the mouse... But how do I find the displayable?
Ren'py has an internal API it uses for user debugging called main_displayables_at_point
. That's the API I use to make the list you see on the left/right corner and that's what guiManipulate uses to get the Displayables to which it then modifies style or transform data to get the intended outcome.
So... In summary:
- I have no idea where your mouse is in relationship with the Displayable you want to edit. So, if you click where you want the anchor, I don't know where that is.
- I move the displayable in a way that probably mirrors your movement of the mouse but I can't know if the displayable is actually following the mouse movement because it depends on the container it's in.
- If you click, I have no idea where you clicked relative to the displayable you are trying to manipulate.
I hope this was informative enough for you to welcome version 0.4.0 and anchors! Let me know of issues you find and other comments you feel like. Also... The anchor image sometimes misbehaves. Give it a leeway (more details of this are in the README)
Files
Get guiManipulate: Modify Ren'Py GUI without reloading
guiManipulate: Modify Ren'Py GUI without reloading
Manipulate Ren'Py Displayables in real time.
More posts
- 0.5.0 Just a liiiittle bit to the right9 days ago
- Created 0.3.2 Fixing poisoned save bug70 days ago
- Created 0.3.1 Fixing an annoying bug75 days ago
Leave a comment
Log in with itch.io to leave a comment.