Resource:Errorwindow: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Syntax) |
||
Line 15: | Line 15: | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
exports.errorwindow: show ( player thePlayer, string text, [int time = 0, string toptext = "ERROR", bool disableByClick = true ] ) | exports.errorwindow: show ( player thePlayer, string text, [ int time = 0, string toptext = "ERROR", bool disableByClick = true ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''thePlayer:''' Player to show the errorwindow to. | ||
*''' | *'''text:''' Text to show in the errorwindow. | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
{{OptionalArg}} | {{OptionalArg}} | ||
*''' | *'''time:''' Time in milliseconds to show the window, before it disappears (if disableByClick is true and client clicks, timer is overridden). | ||
*'''disableByClick:''' Close window when client clicks somewhere ('''cursor must be enabled!'''). | |||
*''' | |||
</section> | </section> | ||
Line 33: | Line 31: | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
exports.errorwindow: show ( string text, [ int time = 0, string toptext = "ERROR", bool disableByClick = true ] ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''text:''' Text to show in the errorwindow. | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
{{OptionalArg}} | {{OptionalArg}} | ||
*'''time:''' Time in milliseconds to show the window, before it disappears (if disableByClick is true and client clicks, timer is overridden). | |||
*''' | *'''disableByClick:''' Close window when client clicks somewhere ('''cursor must be enabled!'''). | ||
* ''' | |||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the command handler was added successfully, ''false'' otherwise. | Returns ''true'' if the command handler was added successfully, ''false'' otherwise. |
Revision as of 17:53, 28 May 2012
This resource provides a function that shows an errorwindow.
Example:
In its settings, you can set the color of:
- Top-background
- Top-text
- Text-background
- Text
Syntax
Click to collapse [-]
Serverexports.errorwindow: show ( player thePlayer, string text, [ int time = 0, string toptext = "ERROR", bool disableByClick = true ] )
Required Arguments
- thePlayer: Player to show the errorwindow to.
- text: Text to show in the errorwindow.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- time: Time in milliseconds to show the window, before it disappears (if disableByClick is true and client clicks, timer is overridden).
- disableByClick: Close window when client clicks somewhere (cursor must be enabled!).
<section name="Client" class="client" show="true">
exports.errorwindow: show ( string text, [ int time = 0, string toptext = "ERROR", bool disableByClick = true ] )
Required Arguments
- text: Text to show in the errorwindow.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- time: Time in milliseconds to show the window, before it disappears (if disableByClick is true and client clicks, timer is overridden).
- disableByClick: Close window when client clicks somewhere (cursor must be enabled!).
Returns
Returns true if the command handler was added successfully, false otherwise.