<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ALCDButtonPressed</id>
	<title>API:LCDButtonPressed - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ALCDButtonPressed"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LCDButtonPressed&amp;action=history"/>
	<updated>2026-10-18T23:32:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:LCDButtonPressed&amp;diff=30528&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LCDButtonPressed&amp;diff=30528&amp;oldid=prev"/>
		<updated>2026-10-16T19:46:00Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=LCD}}&lt;br /&gt;
Returns a value the client keeps for one of the four LCD soft buttons.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
value = LCDButtonPressed(button)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;button : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Button number, 1 to 4.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;value : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – The value stored for that button in the client&amp;#039;s LCD button data. What the value counts is not documented here.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* A button number outside 1–4 logs the error below and returns nothing.&lt;br /&gt;
* To react to button presses, register a handler with [[API:LCDSetButtonHandler|LCDSetButtonHandler]] instead. The stock UI does that and never calls this function.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;LCDButtonPressed&amp;#039;: %d is not a valid button. Button number must be 1 - 4.&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;The number shown is one less than the number passed.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the signature:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local value = LCDButtonPressed( 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:LCDSetButtonHandler|LCDSetButtonHandler]]&lt;br /&gt;
* [[API:LCDUnsetButtonHandler|LCDUnsetButtonHandler]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>