Skip to content

Commit d2f5732

Browse files
committedJan 16, 2017
Adjust formspec spacing on the Client tab of the mainmenu
1 parent 63c892e commit d2f5732

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed
 

‎builtin/mainmenu/tab_multiplayer.lua

+22-13
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,36 @@ local function get_formspec(tabview, name, tabdata)
3232
end
3333

3434
local retval =
35-
"label[7.75,-0.15;" .. fgettext("Address / Port") .. "]" ..
36-
"label[7.75,1.05;" .. fgettext("Name / Password") .. "]" ..
37-
"field[8,0.75;3.3,0.5;te_address;;" ..
35+
-- Search
36+
"field[0.15,0.35;6.05,0.27;te_search;;"..core.formspec_escape(tabdata.search_for).."]"..
37+
"button[5.8,0.1;2,0.1;btn_mp_search;" .. fgettext("Search") .. "]" ..
38+
39+
-- Address / Port
40+
"label[7.75,-0.25;" .. fgettext("Address / Port") .. "]" ..
41+
"field[8,0.65;3.25,0.5;te_address;;" ..
3842
core.formspec_escape(core.setting_get("address")) .. "]" ..
39-
"field[11.15,0.75;1.4,0.5;te_port;;" ..
43+
"field[11.1,0.65;1.4,0.5;te_port;;" ..
4044
core.formspec_escape(core.setting_get("remote_port")) .. "]" ..
41-
"button[10.1,4.9;2,0.5;btn_mp_connect;" .. fgettext("Connect") .. "]" ..
42-
"field[8,1.95;2.95,0.5;te_name;;" ..
45+
46+
-- Name / Password
47+
"label[7.75,0.95;" .. fgettext("Name / Password") .. "]" ..
48+
"field[8,1.85;2.9,0.5;te_name;;" ..
4349
core.formspec_escape(core.setting_get("name")) .. "]" ..
44-
"pwdfield[10.78,1.95;1.77,0.5;te_pwd;]" ..
45-
"box[7.73,2.35;4.3,2.28;#999999]"..
46-
"field[0.15,0.25;4.5,0.27;te_search;;"..core.formspec_escape(tabdata.search_for).."]"..
47-
"button[4.8,0;2.7,0.1;btn_mp_search;" .. fgettext("Search") .. "]"
50+
"pwdfield[10.73,1.85;1.77,0.5;te_pwd;]" ..
51+
52+
-- Description Background
53+
"box[7.73,2.25;4.25,2.6;#999999]"..
54+
55+
-- Connect
56+
"button[10.1,5.15;2,0.5;btn_mp_connect;" .. fgettext("Connect") .. "]"
4857

4958
if tabdata.fav_selected and fav_selected then
5059
if gamedata.fav then
51-
retval = retval .. "button[7.85,4.9;2.3,0.5;btn_delete_favorite;" ..
60+
retval = retval .. "button[7.75,5.15;2.3,0.5;btn_delete_favorite;" ..
5261
fgettext("Del. Favorite") .. "]"
5362
end
5463
if fav_selected.description then
55-
retval = retval .. "textarea[8.1,2.4;4.26,2.6;;" ..
64+
retval = retval .. "textarea[8.1,2.3;4.23,2.9;;" ..
5665
core.formspec_escape((gamedata.serverdescription or ""), true) .. ";]"
5766
end
5867
end
@@ -69,7 +78,7 @@ local function get_formspec(tabview, name, tabdata)
6978
image_column(fgettext("PvP enabled"), "pvp") .. ",padding=0.25;" ..
7079
"color,span=1;" ..
7180
"text,padding=1]" ..
72-
"table[-0.15,0.4;7.75,5.35;favourites;"
81+
"table[-0.15,0.6;7.75,5.15;favourites;"
7382

7483
if menudata.search_result then
7584
for i = 1, #menudata.search_result do

0 commit comments

Comments
 (0)
Please sign in to comment.