Touchscreen Monitors
#1
Posted 19 July 2012 - 11:06 AM
yeah so basically just make it so when a monitor is punched it queues a event with where it was punched (probably which row/column in characters)
#2
Posted 19 July 2012 - 11:20 AM
#3
Posted 19 July 2012 - 12:04 PM
#4
Posted 19 July 2012 - 02:24 PM
#5
Posted 19 July 2012 - 02:40 PM
#7
Posted 19 July 2012 - 05:01 PM
#8
Posted 19 July 2012 - 05:14 PM
This is a very large undertaking as a feature in the manner that you've suggested xuma. This would best be offered as it's own suggestion on the forum. It is no small feat and minimizing it as "'only' 'having' to do it once' does the idea a disservice. It is a good idea, I'm just trying to bring into realistic perspective that it's a time consuming task in both code and flow-charting(plotting out the logic).
#9
Posted 19 July 2012 - 05:32 PM
#10
Posted 19 July 2012 - 05:47 PM
I've suggested nothing at all. I've just give an idea of how this, finding out on which char of of the monitor the user has clicked, could be internally realized.
My initial post was an answer to what MysticT said
Quote
As far as I know there is no way to get information about where on a block the user clicked, in minecraft. So I was thinking about a way to get this information and one way for me since I've already made my own experiences in Game development seemed ray-tracking the click.
Maybe you can do this in another faster or simpler way but I only wanted to show that it is at least possible.
Back to your worries about the complexity of this solution: You would have to sit down for 1/2 an hour maybe and think of a way expressing this in mathematical terms but this is programming. I promise it's really not that hard if you have a basic understanding of the rate of Pythagoras, circular functions and/or matrix multiplication. I know what I'm talking about. />
G3R4RD, on 19 July 2012 - 05:32 PM, said:
Ok. Maybe someone makes a peripheral.
If not I will at least try it, but since I don't have access to the CC code and don't want to re-code the CC Monitor I'll probably only make something like a touch pen. We'll see.
#11
Posted 19 July 2012 - 08:26 PM
#12
Posted 20 July 2012 - 06:58 PM
Just looked it up
hitVec looks like what coul dbe used for that?
#13
Posted 20 July 2012 - 08:47 PM
Pinkishu, on 20 July 2012 - 06:58 PM, said:
Just looked it up
hitVec looks like what coul dbe used for that?
Great! That's what I need. Only problem will be compatibly with ARP since i can't guess the coords of the monitor based on the on side it's attached to anymore. But I've already got an idea for that.
#14
Posted 20 July 2012 - 10:33 PM
#15
Posted 21 July 2012 - 09:22 AM
I only had to "hack" CC to find out how I can get information about orientation, size, and the position of the block in the quad of Monitors (Monitor is 5x3 blocks and you've clicked on the top-left (block) monitor).
I'll not redistribute/reuse any of the Computercrafts code. I just catch the NBT Tag Compound that get's written by the TileEntity. And read out the needed information from that.
I can now test every known Monitor peripheral (Only the ones directly attached to a Computer) if they are within the Rectangle of Monitors (Monitor is nXm blocks) the clicked Monitor is part of.
Now I have an IComputeraccess for all Computers connected to the Monitor. So I can queue an Event for them.
To know the Monitors attached to a Computer, the user will have to call ,only as often as the Monitor get's wrapped again, a function of my Peripheral the "Pen Dock" telling it also only the side of the Monitor.
If the Monitor is attached to a Peripheral Cable (ARP) the user has to give the coordinates of the Monitor Block directly connected to the Cable since I can't guess them anymore.
I hope you can understand what I mean. My English is not perfect and these sentences are way too complicated. />
#16
Posted 21 July 2012 - 11:56 AM
It should be added (IMO).
EDIT: 300'th POST!
#17
Posted 21 July 2012 - 12:19 PM
Seems like there will be no peripheral Cable compability since I would have to let the user tell me the Coordinates and because I can't verify whether the Monitor is truely connected to the Computer the Peripheral could be easily tricked.
#18
Posted 21 July 2012 - 09:01 PM
#19
Posted 21 July 2012 - 11:23 PM
I'm done! Only thing is mapping the hit Position on Block to the Characters.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users