How do I make a Hitbox in pyglet?

I am working on making buttons for a project in pyglet but have no idea how to make them, i would like to make it in between these coordinates.

on_mouse_press(x=365, y=187, dx=0, dy=0)
on_mouse_press(x=341, y=179, button='LEFT', modifiers=)

on_mouse_press(x=116, y=224, button='LEFT', modifiers=)
on_mouse_press(x=291, y=22, button='LEFT', modifiers=)

on_mouse_press(x=398, y=335, button='LEFT', modifiers=)
on_mouse_press(x=394, y=198, button='LEFT', modifiers=)

Any Ideas on how to do this?

Answers


This appears to me as very similar to this stack overflow question. The code proposed by Constantinus would exactly fit your purpose I think.


Need Your Help

How can I insert a <tr> element into a dynamic table?

javascript jquery html dynamic tablecolumn

I hope someone has a clue for me. I am new to javascript and I am trying to build this structure with a dynamically generated table.

pass HTML tags with style attributes from Javascript to PHP

php jquery html ajax codeigniter

I'm using CKeditor and one file input element. And i'm passing its in Jquery Ajax with FormData.. Here is my Jquery function.