Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xdecor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
xdecor
Commits
e69cf4fc
Commit
e69cf4fc
authored
9 years ago
by
Jean-Patrick Guerrero
Browse files
Options
Downloads
Patches
Plain Diff
Small cleaning of craftguide formspec
parent
0bf30f0f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
craftguide.lua
+8
-9
8 additions, 9 deletions
craftguide.lua
with
8 additions
and
9 deletions
craftguide.lua
+
8
−
9
View file @
e69cf4fc
...
...
@@ -25,16 +25,15 @@ function craftguide:get_formspec(stack, pagenum, item, recipe_num, filter, playe
local
formspec
=
[[ size[8,6.6;]
tablecolumns[color;text;color;text]
tableoptions[background=#00000000;highlight=#00000000;border=false]
button[5.5,0;0.7,0.95;prev;<]
button[7.3,0;0.7,0.95;next;>]
button[4,0.2;0.7,0.5;search;?]
button[4.6,0.2;0.7,0.5;clearfilter;X]
button[0,0;1.5,1;backcraft;< Back]
button[5.4,0;0.8,0.95;prev;<]
button[7.2,0;0.8,0.95;next;>]
button[2.5,0.2;0.8,0.5;search;?]
button[3.2,0.2;0.8,0.5;clear;X]
tooltip[search;Search]
tooltip[clear
filter
;Reset] ]]
..
"table[6
.1
,0.18;1.1,0.5;pagenum;#FFFF00,"
..
tostring
(
pagenum
)
..
tooltip[clear;Reset] ]]
..
"table[6,0.18;1.1,0.5;pagenum;#FFFF00,"
..
tostring
(
pagenum
)
..
",#FFFFFF,/ "
..
tostring
(
pagemax
)
..
"]"
..
"field[
1.8
,0.32;2.6,1;filter;;"
..
filter
..
"]"
..
"field[
0.3
,0.32;2.6,1;filter;;"
..
filter
..
"]"
..
default
.
gui_bg
..
default
.
gui_bg_img
for
_
,
name
in
pairs
(
self
:
get_items
(
filter
,
player_name
))
do
...
...
@@ -114,7 +113,7 @@ minetest.register_on_player_receive_fields(function(player, listname, fields)
local
filter
=
formspec
:
match
(
"filter;;([%w_:]+)"
)
or
""
local
pagenum
=
tonumber
(
formspec
:
match
(
"#FFFF00,(%d+)"
))
or
1
if
fields
.
clear
filter
then
if
fields
.
clear
then
craftguide
:
get_items
(
nil
,
player_name
)
craftguide
:
get_formspec
(
stack
,
1
,
nil
,
1
,
""
,
player_name
)
elseif
fields
.
alternate
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment