Updated Signals (markdown)

Florian Nücke 2013-12-13 00:16:21 -08:00
parent 801fe5cfe1
commit f37145a908

@ -38,7 +38,7 @@ Screen
Note on the player name: I'll probably add an option to disable this argument in the future, for those who think it's too... unrealistic. It's just quite handy for multi-user programs, so I left it in for now.
**Important**: this signal is *checked*, i.e. it is only queued on a computer if the player that caused it is [[registered as a user|ComputerUsers]] on the computer (or there are no users registered on the computer).
- `drag(screenAddress: string, x: number, y: number, playerName: string)`
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 int 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.
- `scroll(screenAddress: string, x: number, y: number, direction: number, playerName: string)`
This signal is queued by screens of [[tier two|Blocks#advanced-screen]] and [[tier three|Blocks#superior-screen]] 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.
The same considerations apply to the player name parameter as in `touch`.