Posted 09 January 2013 - 09:24 AM
Is anyone else having the same problems? Whenever i draw a line with paintutils on the Advanced Monitors it never draws it correctly and when using the os.pullEvents() i can see that the coordinates assigned are just completely off. it goed like this:
___________________________________________
| 1:14 | 10:1 |
| | |
| | |
| | |
| | |
| 9:64 | 19:6 |
|_____________________|_____________________|
| 1:76 | 10:7 |
| | |
| | |
| | |
| | |
| 9:13 | 9:12 |
|_____________________|_____________________|
Dit zijn dus 4 monitoren met de positie waarden van de hoeken. Doe ik nu wat fout of hoe kan dit?
Dit is de code:
local MonitorSide = "left"
function DrawGUI()
term.redirect(peripheral.wrap(MonitorSide))
paintutils.drawLine(10, 3, 12, 6, colors.blue)
paintutils.drawLine(9, 31, 7, 61, colors.blue)
term.restore()
end
DrawGUI()
while true do
term.redirect(peripheral.wrap(MonitorSide))
x = 0
y = 0
event, side, x, y = os.pullEvent()
if event == "monitor_touch" then
term.setCursorPos(1,1)
term.write(x .. ":" .. y)
end
end
Alright its all really inconsistent now it gives even coordinates of 200 or more so am i doing something wrong or is something wrong with the mod?
Groeten, Bob
___________________________________________
| 1:14 | 10:1 |
| | |
| | |
| | |
| | |
| 9:64 | 19:6 |
|_____________________|_____________________|
| 1:76 | 10:7 |
| | |
| | |
| | |
| | |
| 9:13 | 9:12 |
|_____________________|_____________________|
Dit zijn dus 4 monitoren met de positie waarden van de hoeken. Doe ik nu wat fout of hoe kan dit?
Dit is de code:
local MonitorSide = "left"
function DrawGUI()
term.redirect(peripheral.wrap(MonitorSide))
paintutils.drawLine(10, 3, 12, 6, colors.blue)
paintutils.drawLine(9, 31, 7, 61, colors.blue)
term.restore()
end
DrawGUI()
while true do
term.redirect(peripheral.wrap(MonitorSide))
x = 0
y = 0
event, side, x, y = os.pullEvent()
if event == "monitor_touch" then
term.setCursorPos(1,1)
term.write(x .. ":" .. y)
end
end
Alright its all really inconsistent now it gives even coordinates of 200 or more so am i doing something wrong or is something wrong with the mod?
Groeten, Bob
Edited on 09 January 2013 - 08:29 AM