Posted 17 June 2014 - 07:32 PM
Hello, everyone!
I was making a screenshare program that you could use to share your screen onto a monitor. It automatically adapts to both, monitor and terminal, to make a window on both, monitor and terminal, that wouldn't be bigger than the monitor and terminal. I create those windows in the center of the terminal and monitor. Because the window is centered on the terminal I decided to overwrite coroutine.yield so I could overwrite mouse events.
The problem is that positions returned by the raw call to coroutine.yield are incorrect. Moreover, the y or x coordinate sometimes has .5 (for ex.: X: 15; Y: 3.5).
Here is my setup with incorrectly printed positions:
Here's the pastebin link of the program:
http://pastebin.com/0weVvyth
I hope someone will point out that stupid mistake I always make :D/>!
I was making a screenshare program that you could use to share your screen onto a monitor. It automatically adapts to both, monitor and terminal, to make a window on both, monitor and terminal, that wouldn't be bigger than the monitor and terminal. I create those windows in the center of the terminal and monitor. Because the window is centered on the terminal I decided to overwrite coroutine.yield so I could overwrite mouse events.
The problem is that positions returned by the raw call to coroutine.yield are incorrect. Moreover, the y or x coordinate sometimes has .5 (for ex.: X: 15; Y: 3.5).
Here is my setup with incorrectly printed positions:
Spoiler
Here's the pastebin link of the program:
http://pastebin.com/0weVvyth
I hope someone will point out that stupid mistake I always make :D/>!