Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
updating shapenode fillcolor on touch_began
-
@nekosen did you see the previous post about changing the labelnode text color?
-
yes, thank you for that as well.
but I didn't see your second post : I was writing while you posted it.
-
@nekosen ok, thus happy end 🙂
-
Yes, but you triggered the solution ! Let that be clear. (I have to wait 180seconds before I can answer, because I have no reputation - I am new here)
-
@nekosen said
I am new here
Everybody has been new one day. Thus welcome in this forum of this marvelous app.
-
How can I do the in line stuff like you did with my 'I am new here' ?
-
'@nekosen said: ..
and thanks for welcoming
-
I will check the forum instructions.
-
@nekosen you select/copy the text you want to reuse, you tap reply, and you type
">" followed by the copied text .Tap quote on a post to see it with its commands, but the quote puts a second ">" in front of each line
-
@cvp :
you select/copy the text you want to reuse, you tap reply, and you type
">" followed by the copied text .Tap quote on a post to see it with its commands, but the quote puts a second ">" in front of each line
got it, thanks!
-
@nekosen by the way,
Instead of
x, y = touch.location if self.ntts[0].point_inside(x, y):
You can write
if touch.location in self.ntts[0].bbox: # ...
(You can maybe omit the final bbox -- I forget).
-
Hi JonB,
Your proposal is better, I can omit the :
def point_inside(self, x, y): '''Check if the point x, y is within the bounding box''' return self.bbox.contains_point((x, y))
And this is more readable :
if touch.location in ntt.bbox : '''instead of if ntt.point_inside(x, y):'''
If it could be without bbox like you suggest, it would even be shorter, but I tried, it's not the case.
Thanks!
-
In this case it is the same, but note that
bbox
includes the node and all of its descendants, whileframe
is the node itself.