Class engine.Dialog

Handles dialog windows

Methods



Methods

engine.Dialog:simplePopup (title, text[, fct], no_leave)
Requests a simple, press any key, dialog

Parameters:

  • title string Display title
  • text string the text
  • fct func the function to call on dialog close (optional)
  • no_leave optional boolean set this to true to disable closing of the dialog
engine.Dialog:simpleLongPopup (title, text, w[, fct], no_leave)
Requests a simple, press any key, dialog

Parameters:

  • title string Display title
  • text string the text
  • w int width
  • fct func the function to call on dialog close (optional)
  • no_leave optional boolean set this to true to disable closing of the dialog
engine.Dialog:yesnoPopup (title, text[, fct][, yes_text="Yes"][, no_text="No"])
Requests a simple yes-no dialog

Parameters:

  • title string Display title
  • text string the text
  • fct func the function to call on dialog close (optional)
  • yes_text string Text for "yes" button (default "Yes")
  • no_text string Text for "no" button (default "No")
engine.Dialog:yesnoLongPopup (title, text, w[, fct][, yes_text="Yes"][, no_text="No"])
Requests a long yes-no dialog

Parameters:

  • title string Display title
  • text string the text
  • w int width
  • fct func the function to call on dialog close (optional)
  • yes_text string Text for "yes" button (default "Yes")
  • no_text string Text for "no" button (default "No")
engine.Dialog:init (title, w, h, x, y[, alpha][, font][, showup])
Create a Dialog

Parameters:

  • title string Display title
  • w int width
  • h int height
  • x int absolute x coordinate
  • y int absolute y coordinate
  • alpha int transparency (optional)
  • font defaults to Droid Sans 14pt (optional)
  • showup how long it takes to show up? (optional)
engine.Dialog:resize (w, h, x, y[, alpha])
Resize

Parameters:

  • w int width
  • h int height
  • x int absolute x coordinate
  • y int absolute y coordinate
  • alpha int defaults to 220 (optional)
engine.Dialog:display ()
Renders the dialog
engine.Dialog:toScreen (x, y, nb_keyframes)
texture to screen

Parameters:

  • x int absolute x coordinate
  • y int absolute y coordinate
  • nb_keyframes int number of keyframes
engine.Dialog:drawDialog (s)
Draw the dialog

Parameters:

  • s screen
engine.Dialog:keyCommands (t, b)
register keybind and command

Parameters:

engine.Dialog:mouseZones (t, no_new)
create a mouse zone

Parameters:

  • t boolean t.norestrict = true, then allow mouse to move out of zone
  • no_new boolean true = don't create a new mouse
engine.Dialog:unload ()
Called when dialog is unloading
engine.Dialog:cleanup ()
Called when dialog is cleaning up
engine.Dialog:drawWBorder (s, x, y, w)
Draw a horizontal border

Parameters:

  • s screen
  • x int absolute x coordinate
  • y int absolute y coordinate
  • w int width
engine.Dialog:drawHBorder (s, x, y, h)
Draw a vertical border

Parameters:

  • s screen
  • x int absolute x coordinate
  • y int absolute y coordinate
  • h int height
engine.Dialog:drawSelectionList (s, x, y, hskip, list[, sel=nil], prop[, scroll=1][, max=99999], color, selcolor[, max_size][, cutoff_size], scrollbar)
draw a selection list

Parameters:

  • s screen
  • x int absolute x coordinate
  • y int absolute y coordinate
  • hskip int height padding
  • list table the list to draw
  • sel int the selected item (default nil)
  • prop opt, tab, string or func property to display for items (can be table/function/string), Default: toString(item)
  • scroll int how far down the list are we (default 1)
  • max int max number of entries (default 99999)
  • color optional table color of items, defaults to colors.WHITE
  • selcolor optional table color of selected item, defaults to colors.CYAN
  • max_size int max length of displayed strings (optional)
  • cutoff_size int max width (optional)
  • scrollbar optional boolean display a scrollbar?
generated by LDoc 1.4.3