Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
component:signals [2015/01/14 23:40]
127.0.0.1 external edit
component:signals [2017/11/13 01:16]
jv110 Drop signal changed in 1.7.0
Line 48: Line 48:
   This signal is almost equivalent to the `touch` signal. The only difference is the implicit meaning: when this signal is fired, it "​belongs"​ to a `touch` signal that was fired earlier. This can only be triggered by dragging in the GUI.   This signal is almost equivalent to the `touch` signal. The only difference is the implicit meaning: when this signal is fired, it "​belongs"​ to a `touch` signal that was fired earlier. This can only be triggered by dragging in the GUI.
 - `drop(screenAddress:​ string, x: number, y: number, button: number, playerName: string)`  ​ - `drop(screenAddress:​ string, x: number, y: number, button: number, playerName: string)`  ​
-  This signal is only triggered ​if a `drag` event was triggered first. It is fired when the player releases the mouse button, ​so it's basically ​conditional mouse-up event (with the condition being that the mouse moved while the button was held).+  This signal is triggered when the player releases the mouse button ​after a `touch` signal. Despite the name, it does not necessarily follow ​`drag` signal.
 - `scroll(screenAddress:​ string, x: number, y: number, direction: number, playerName: string)`  ​ - `scroll(screenAddress:​ string, x: number, y: number, direction: number, playerName: string)`  ​
   This signal is queued by screens of tier two and tier three when the player uses the mouse wheel in the GUI. The x and y coordinates are the cursor location when the scroll occurred and are, like the `touch` signal, in "​letters"​. The `direction` indicates which way to scroll, where a positive value usually means "​up",​ whereas a negative value means "​down"​. Note that this may differ based on the client'​s operating system and/or driver configuration. The player name is the user name of the player that triggered the event.  ​   This signal is queued by screens of tier two and tier three when the player uses the mouse wheel in the GUI. The x and y coordinates are the cursor location when the scroll occurred and are, like the `touch` signal, in "​letters"​. The `direction` indicates which way to scroll, where a positive value usually means "​up",​ whereas a negative value means "​down"​. Note that this may differ based on the client'​s operating system and/or driver configuration. The player name is the user name of the player that triggered the event.  ​
Line 76: Line 76:
 ---------------------------- ----------------------------
  
-- `redstone_changed(address:​ string, side: number)` ​  +- `redstone_changed(address:​ string, side: number, oldValue: number, newValue: number)` ​  
-  This signal is queued by [[component:​redstone|redstone components]] when an incoming signal changes. The address is either that of the [[block:​redstone_io|Redstone I/O block]] or that of the computer with the [[item:​redstone_card|redstone card]] that generated the signal. The side is one of the [[api:​sides|sides]] constants and indicates on which side the signal changed. This is relative to the container of the component, so for computers and robots this depends on which way they are facing. For Redstone I/O blocks this is always the absolute side.+  This signal is queued by [[component:​redstone|redstone components]] when an incoming signal changes. The address is either that of the [[block:​redstone_io|Redstone I/O block]] or that of the computer with the [[item:​redstone_card|redstone card]] that generated the signal. The side is one of the [[api:​sides|sides]] constants and indicates on which side the signal changed. This is relative to the container of the component, so for computers and robots this depends on which way they are facing. For Redstone I/O blocks this is always the absolute side.  
 + 
 +Note: There is no indication of the bundle/​channel number from T2 cards or the I/O Block. [[https://​github.com/​MightyPirates/​OpenComputers/​issues/​1385|GH issue]]
  
 Motion Sensor Block Motion Sensor Block