Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LCDButtonPressed

From RoR Wiki

UI Lua API · LCD functions
Version: WAR 1.4.8

Returns a value the client keeps for one of the four LCD soft buttons.

value = LCDButtonPressed(button)

Arguments

button
number – Button number, 1 to 4.

Returns

value
number – The value stored for that button in the client's LCD button data. What the value counts is not documented here.

Details

  • A button number outside 1–4 logs the error below and returns nothing.
  • To react to button presses, register a handler with LCDSetButtonHandler instead. The stock UI does that and never calls this function.

Errors

  • Error in function call 'LCDButtonPressed': %d is not a valid button. Button number must be 1 - 4.
    The number shown is one less than the number passed.

Example

A minimal example built from the signature:

local value = LCDButtonPressed( 1 )

See also