bell07
580508fa37
Fix showing up complex images
...
Some complex texture strings contains [ character that needs to be escaped.
Issue found with [halloween](https://github.com/GreenXenith/halloween ) preview texture on player tab page button in smart_inventory. The button was dissapeared, after this change visible again.
2018-08-27 20:15:55 +01:00
bell07
72107bc648
Clean up state and add validation
2018-01-26 16:12:27 +00:00
bell07
a115299266
Update API.md
...
Format header lines
2018-01-26 16:11:35 +00:00
bell07
602245d13a
Make "smartfs_name" in nodemeta private
2018-01-26 16:09:35 +00:00
Alexander Weber
99e8809ffd
rename inventory's location to invlocation to avoid confusion with state location
2017-11-01 15:09:59 +00:00
Alexander Weber
c1f484abc5
generalize tooltip support. Not for buttons only
2017-11-01 15:09:59 +00:00
Alexander Weber
ba7551d0e6
Do not call the connect method without player
2017-11-01 15:09:59 +00:00
Alexander Weber
bc9e0a8249
Allow nodemeta_on_receive_fields without player
...
usefull for automatic formspec updates
2017-11-01 15:09:59 +00:00
bell07
e829336b84
Add enter press support to text boxes
2017-11-01 12:58:27 +00:00
bell07
080ad817c6
Add locations interface, and support for the default engine inventory
...
* Move smartfs.inventory_mod() above, fix globals check by minetest.global_exists()
* Introduce proper state location interface
* Update documentation related to locations
2017-10-30 15:58:38 +00:00
Alexander Weber
03d5f6b8f2
Escape button tooltip text
2017-10-30 15:53:17 +00:00
Alexander Weber
067b1b44f9
Add missed listbox documentation
2017-10-30 15:53:04 +00:00
Alexander Weber
62c48c02dc
Add state:dropdown()
2017-10-30 15:53:00 +00:00
Alexander Weber
d765bf2d58
Add state:item_image()
2017-10-30 15:52:56 +00:00
Alexander Weber
919a7e5719
Add state:vertlabel()
2017-10-30 15:52:49 +00:00
bell07
8eacb811a7
Optimize the textlist box
...
- self.data.items is initialized once in onCreate
- There is no label implemented
- addItem returns index for later direct access to the item by getItem()
2017-08-13 12:48:29 +01:00
bell07
3de2eacda5
Add views and containers
...
* Views and Containers support
* completed the checkbox-fix
* Add getContainerState() to the documentation
* changed implementation for fields processing
Removed again _sfs_process_value_ and _sfs_process_action_
use element:submit() and element:setValue() instead utilizating new state:_get_element_recursive_()
Additional bugfix: container location was missed
* runtime optimization. Do _get_element_recursive_ once for setValue and submit
2017-08-12 00:01:35 +01:00
bell07
9acbd42aeb
Add ability to hide elements using get/setVisible
2017-03-04 20:27:15 +00:00
bell07
4210c3e61b
Extend button element to support image buttons and tool tips
2017-03-04 20:24:02 +00:00
bell07
f353a01405
Add getBackground/setBackground support for each element
2017-02-14 21:12:32 +00:00
bell07
6e450e9cb8
API.md: Remove duplicated element documentation
2017-02-03 22:04:08 +00:00
Alexander Weber
f5017bee47
Allow form_setup to return nil instead of true for success
...
For example, players formspec
2017-02-03 17:41:43 +00:00
Alexander Weber
c4e1cd702d
Remove `placer` from form:attach_to_node()
...
It's not used anywhere
2017-02-03 17:41:16 +00:00
Alexander Weber
01fceaed80
Allow `params` to be provided when using form:attach_to_node()
...
Remove setparam("node_placer") at this place, because of out of concept
2017-02-03 17:40:45 +00:00
bell07
aa792f0266
Make _sfs_recieve_ a state method called _sfs_on_receive_fields_
2017-01-02 23:28:10 +00:00
bell07
b3dc08ad21
Define set/get for size and position in generic element table
...
Reduces code redundancy
2017-01-02 22:55:56 +00:00
bell07
2c9b971610
Add support different smartfs versions in different mods
2017-01-02 21:15:02 +00:00
bell07
861aa9f174
Rearrange code to match documentation, and add comments
2017-01-02 21:14:24 +00:00
bell07
88a029d25f
Correct copy and paste error in onCreate() assert messages
2016-11-13 22:23:15 +00:00
bell07
f96dc89885
Fix typo: type, not typeof
2016-11-13 20:38:00 +00:00
rubenwardy
0585c50aec
Require all elements to have an onCreate method
2016-11-13 18:35:54 +00:00
rubenwardy
da4ada3781
Remove bad assertion in smartfs._attach_to_node_
2016-11-13 18:33:16 +00:00
rubenwardy
62fb1e604c
Clean up element constructors, add ele:onCreate() to validate parameters
2016-11-13 17:14:57 +00:00
rubenwardy
013201fe8f
Rename _getFS_ to _buildFormspec_
2016-11-13 16:47:59 +00:00
rubenwardy
87920c20e4
Use assertions rather than if-then-error
2016-11-13 16:47:12 +00:00
rubenwardy
95837b542a
Move API.md and example.* to docs/ subfolder
2016-11-13 16:33:10 +00:00
Alexander Weber
a4de6c61ca
Properly convert indices to numbers in listbox element
2016-11-13 14:33:23 +00:00
bell07
58a7977fef
Escape user values when building formspec
2016-11-13 14:15:56 +00:00
bell07
56e13744b5
Add clearItems method to the list element
2016-11-13 14:14:14 +00:00
rubenwardy
9f07a42ef7
Rename _reg to form_setup_callback
2016-11-13 01:34:51 +00:00
Alexander Weber
16fc4f8203
Support for node meta forms (plus clean ups)
2016-11-13 01:34:02 +00:00
Alexander Weber
2e1720109e
Add more methods to fields, small code clean ups
2016-11-13 01:06:55 +00:00
rubenwardy
b6a8c0c196
Add license
2016-07-31 22:59:15 +01:00
rubenwardy
248e9836cb
WTFPL -> CC0
2016-05-18 22:56:47 +01:00
rubenwardy
36cc496fe8
Create mod.conf
2016-05-18 22:42:04 +01:00
rubenwardy
0226013386
Create description.txt
2016-03-08 18:21:39 +00:00
Ryan Nolan
14f15a3172
Improve textlist code, add get/set params.
...
- Added selected and transparent options to listbox
- Replaced the for loop around self.data.items with table.concat()
- Updated the params var and added 2 new methods for setting and getting the params
- removed list entry that was causing a blank list item in thetextlist
2016-01-10 18:22:16 +00:00
rubenwardy
ca54c9b6ab
Make smartfs print less
...
Thanks to @crazyR14 for bringing this up
2015-07-07 14:58:10 +01:00
rubenwardy
742d9119da
Correct docs
2015-01-17 11:18:34 +00:00
rubenwardy
b2622fdfdc
Fix other buttons not working in Unified Inventory
2015-01-17 11:14:13 +00:00