This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
wilcomega's profile picture

[1.46] clickable adv. monitors

Started by wilcomega, 24 October 2012 - 08:43 AM
wilcomega #1
Posted 24 October 2012 - 10:43 AM
i have a sugestion. make adv. monitors clickable so that you dont have to go into the computer anymore ^_^/>/>
i have so many things in my mind that i can do with clickable monitors.

cloudy: i suggest you looking at the touchpen peripheral but then without pen :P/>/>

please leave a reply with what you think
KaoS #2
Posted 24 October 2012 - 11:18 AM
that is a totally great idea but I doubt it will be implemented, I don't know how the Java code works but I think it will be very hard to figure out where you are aiming on a block, then there is event transfer from monitor to computer (could include a peripheral command for it I guess)

all in all it would be great but is too much trouble
ChunLing #3
Posted 24 October 2012 - 11:29 AM
The touchpen peripheral exists, it's just that core CC is really about players staying close to the programming more than about adding all kinds of new interfaces and toys. If something doesn't encourage the player to program it…it's less a core part of the mod and more a peripheral.

The reason for the peripheral API being released is just so that there can be these things for those who want them without putting all of them into the core mod.
Sebra #4
Posted 24 October 2012 - 03:23 PM
In my humble opinion it is not so easy.
All your mouse operations in GUI are just mouse operations. But when you look at monitor peripheral no GUI, there are "attack", "use", "take block" and slot selection. Would you want to use your sword as a pointer? Would you want to place Dirt block in front of monitor? How would you "right click" or "left click"? Also keys and levers will not be used by left click anymore.

So more sensible would be simpler version:
Monitors sense only right mouse clicks, only empty hand, no drag, no wheel;
Monitors give out events with position of click in meters, not in letters, no other info;

It would be fun if turned horizontally monitor give out coords of any mob/player move on it.
ChunLing #5
Posted 24 October 2012 - 07:26 PM
Well, the touchpen peripheral adds an item that you use on the monitor. But I don't see any problem with making the monitor blocks usable in the same way as other elements in the minecraft world (the way computers/switches/buttons are). The problem is that then, you can only really get which block of the monitor was "pressed" (used), not the exact position. An equipped item is needed so that you can pass your exact facing and what you were pointing at back to the computer.
MysticT #6
Posted 24 October 2012 - 08:53 PM
If I'm not wrong, they added some parameters to the onBlockActivated function, wich gives you the face and the coordinates (inside the block, from 0 to 1) that the player was looking at when clicked the block. So, this could be done (not sure how hard it would be to translate those coordinates to monitor characters though). It would be a nice addition.
Cruor #7
Posted 24 October 2012 - 08:58 PM
And what if you try to "click" the screen and you use a fast miningtool/creative mode? ^_^/>/>
MysticT #8
Posted 25 October 2012 - 12:55 AM
And what if you try to "click" the screen and you use a fast miningtool/creative mode? ^_^/>/>
I click with right button, wich doesn't break the block :P/>/>
ChunLing #9
Posted 25 October 2012 - 01:21 AM
Yeah…I've lost a few computers to "now I click on the compu…AHG!".
MysticT #10
Posted 25 October 2012 - 02:10 AM
Well, I think that in Minecraft 1.4 you won't be able to use left click to activate things, so that won't happen again (unless you don't remember that and still try to use left-click ^_^/>/>)
Heracles421 #11
Posted 25 October 2012 - 02:12 AM
I'd really like to see this, it'd be an awesome addition to CC
ChunLing #12
Posted 25 October 2012 - 02:52 AM
I never try to activate things by left-clicking, but I'm a bit insensitive to right and left…I've never been reflexively aware of the difference. Just the other day I had a program that output usage instructions to use rCtrl when I meant lCtrl. I only realized it when talking about rCtrl v. lCtrl in a completely different context.
robhol #13
Posted 25 October 2012 - 07:23 AM
If I'm not wrong, they added some parameters to the onBlockActivated function, wich gives you the face and the coordinates (inside the block, from 0 to 1) that the player was looking at when clicked the block. So, this could be done (not sure how hard it would be to translate those coordinates to monitor characters though). It would be a nice addition.

That should be a matter of simple arithmetics. xchar = x * termwidth, etc, unless I'm completely mistaken.
DMACNZ #14
Posted 25 October 2012 - 10:46 AM
This may sound stupid but why not a wifi keyboard and mouse preprihersal, right click on the monitor with either or and bam your controlling the monitor for up to 45 or so blocks away
KaoS #15
Posted 25 October 2012 - 11:21 AM
This may sound stupid but why not a wifi keyboard and mouse preprihersal, right click on the monitor with either or and bam your controlling the monitor for up to 45 or so blocks away

I suggest you make a new post or risk getting lost in the discussion about monitors. it would be cool but that sounds like a peripheral that should be optional, why don't you try make it
ChunLing #16
Posted 25 October 2012 - 11:56 AM
There are a couple of good wireless input devices already. There is also a plan in the works to add a rednet enabled PDA or tablet item.
matejdro #17
Posted 25 October 2012 - 01:56 PM
The touchpen peripheral exists, it's just that core CC is really about players staying close to the programming more than about adding all kinds of new interfaces and toys. If something doesn't encourage the player to program it…it's less a core part of the mod and more a peripheral.

If player just downloads program with interface, its his problem. For me it would add additional ways to CREATE more interesting programs (with clickable interfaces outside computer GUI).
Sebra #18
Posted 25 October 2012 - 03:31 PM
If I'm not wrong, they added some parameters to the onBlockActivated function, wich gives you the face and the coordinates (inside the block, from 0 to 1) that the player was looking at when clicked the block. So, this could be done (not sure how hard it would be to translate those coordinates to monitor characters though). It would be a nice addition.
It should not be translated to characters. Let programmer care about it.
MysticT #19
Posted 25 October 2012 - 04:40 PM
It should not be translated to characters. Let programmer care about it.
But the current mouse events return the coordinates in characters. They would have to make a new mouse event for monitors, it would be better to use the already existing ones.

That should be a matter of simple arithmetics. xchar = x * termwidth, etc, unless I'm completely mistaken.
I know it's not that hard, but it has to take into account the variable size of the monitors (both adding/removing monitors and changing the text scale) and monitor border/frame. Nothing some math can't solve though ^_^/>/>
Sebra #20
Posted 25 October 2012 - 05:10 PM
May be driver should translate meters to letters. Also driver (monitor api) should trace which monitor send output to and which monitor went touch event from. Think about several monitors connected to several computers each. One computer can set characters size, other computer can be unaware of it.