summaryrefslogtreecommitdiff
path: root/src/objdef.h
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2016-10-16 17:35:07 +0100
committersfan5 <sfan5@live.de>2017-09-11 20:54:07 +0200
commitd10cccee3108b45cf7085ffdbff9b5f2a4045ea7 (patch)
treeeecf15cbb9e096d5ff80415a30f2dd6819af40f0 /src/objdef.h
parentbb225672f97eecc5c8e09a702d7412748bbfb37d (diff)
downloadminetest-d10cccee3108b45cf7085ffdbff9b5f2a4045ea7.tar.gz
minetest-d10cccee3108b45cf7085ffdbff9b5f2a4045ea7.tar.bz2
minetest-d10cccee3108b45cf7085ffdbff9b5f2a4045ea7.zip
Allow the join/leave message to be overridden by mods.
Diffstat (limited to 'src/objdef.h')
0 files changed, 0 insertions, 0 deletions
n115' href='#n115'>115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
Formspec toolkit api 0.0.3
==========================

Formspec toolkit is a set of functions to create basic ui elements.


File: fst/ui.lua
----------------

ui.lua adds base ui interface to add additional components to.

ui.add(component) -> returns name of added component
^ add component to ui
^ component: component to add

ui.delete(component) -> true/false if a component was deleted or not
^ remove a component from ui
^ component: component to delete

ui.set_default(name)
^ set component to show if not a single component is set visible
^ name: name of component to set as default

ui.find_by_name(name) --> returns component or nil
^ find a component within ui
^ name: name of component to look for

File: fst/tabview.lua
---------------------

tabview_create(name, size, tabheaderpos) --> returns tabview component
^ create a new tabview component
^ name: name of tabview (has to be unique per ui)
^ size: size of tabview
	{
		x,
		y
	}
^ tabheaderpos: upper left position of tabheader (relative to upper left fs corner)
	{
		x,
		y
	}

Class reference tabview:

methods:
- add_tab(tab)
  ^ add a tab to this tabview
  ^ tab:
  {
	name               = "tabname",      -- name of tab to create
	caption            = "tab caption",  -- text to show for tab header
	cbf_button_handler = function(tabview, fields, tabname, tabdata), -- callback for button events
	--TODO cbf_events         = function(tabview, event, tabname),           -- callback for events
	cbf_formspec       = function(tabview, name, tabdata),            -- get formspec
	tabsize            =
		{
			x, -- x width
			y  -- y height
		},                                                            -- special size for this tab (only relevant if no parent for tabview set)
	on_change          = function(type,old_tab,new_tab)               -- called on tab chang, type is "ENTER" or "LEAVE"
  }
- set_autosave_tab(value)
  ^ tell tabview to automatically save current tabname as "tabview_name"_LAST
  ^ value: true/false
- set_tab(name)
  ^ set's tab to tab named "name", returns true/false on success
  ^ name: name of tab to set
- set_global_event_handler(handler)
  ^ set a handler to be called prior calling tab specific event handler
  ^ handler: function(tabview,event) --> returns true to finish event processing false to continue
- set_global_button_handler(handler)
  ^ set a handler to be called prior calling tab specific button handler
  ^ handler: function(tabview,fields) --> returns true to finish button processing false to continue
- set_parent(parent)
  ^ set parent to attach tabview to. TV's with parent are hidden if their parent
	is hidden and they don't set their specified size.
  ^ parent: component to attach to
- show()
  ^ show tabview
- hide()
  ^ hide tabview
- delete()
  ^ delete tabview
- set_fixed_size(state)
  ^ true/false set to fixed size, variable size

File: fst/dialog.lua
---------------------