@@ -81,50 +81,45 @@ local function get_formspec(tabview, name, tabdata)
81
81
modscreenshot = defaulttexturedir .. " no_screenshot.png"
82
82
end
83
83
84
+ local info = core .get_content_info (selected_pkg .path )
85
+ local desc = fgettext (" No package description available" )
86
+ if info .description and info .description :trim () ~= " " then
87
+ desc = info .description
88
+ end
89
+
84
90
retval = retval ..
85
91
" image[5.5,0;3,2;" .. core .formspec_escape (modscreenshot ) .. " ]" ..
86
92
" label[8.25,0.6;" .. core .formspec_escape (selected_pkg .name ) .. " ]" ..
87
- " label[5.5,1.7;" .. fgettext (" Information:" ) .. " ]" ..
88
- " textlist[5.5,2.2;6.2,2.4;description;"
89
-
90
- local info = core .get_content_info (selected_pkg .path )
91
- local desc = info .description or fgettext (" No package description available" )
92
- local descriptionlines = core .wrap_text (desc , 42 , true )
93
- for i = 1 , # descriptionlines do
94
- retval = retval .. core .formspec_escape (descriptionlines [i ]) .. " ,"
95
- end
93
+ " box[5.5,2.2;6.15,2.35;#000]"
96
94
97
95
if selected_pkg .type == " mod" then
98
96
if selected_pkg .is_modpack then
99
- retval = retval .. " ;0] " ..
97
+ retval = retval ..
100
98
" button[8.65,4.65;3.25,1;btn_mod_mgr_rename_modpack;" ..
101
99
fgettext (" Rename" ) .. " ]"
102
100
else
103
101
-- show dependencies
104
- local toadd_hard = table.concat (info .depends or {}, " ," )
105
- local toadd_soft = table.concat (info .optional_depends or {}, " ," )
102
+ desc = desc .. " \n\n "
103
+ local toadd_hard = table.concat (info .depends or {}, " \n " )
104
+ local toadd_soft = table.concat (info .optional_depends or {}, " \n " )
106
105
if toadd_hard == " " and toadd_soft == " " then
107
- retval = retval .. " , " .. fgettext (" No dependencies." )
106
+ desc = desc .. fgettext (" No dependencies." )
108
107
else
109
108
if toadd_hard ~= " " then
110
- retval = retval .. " , " .. fgettext (" Dependencies:" ) .. " , "
111
- retval = retval .. toadd_hard
109
+ desc = desc .. fgettext (" Dependencies:" ) ..
110
+ " \n " .. toadd_hard
112
111
end
113
112
if toadd_soft ~= " " then
114
113
if toadd_hard ~= " " then
115
- retval = retval .. " , "
114
+ desc = desc .. " \n\n "
116
115
end
117
- retval = retval .. " , " .. fgettext (" Optional dependencies:" ) .. " , "
118
- retval = retval .. toadd_soft
116
+ desc = desc .. fgettext (" Optional dependencies:" ) ..
117
+ " \n " .. toadd_soft
119
118
end
120
119
end
121
-
122
- retval = retval .. " ;0]"
123
120
end
124
121
125
122
else
126
- retval = retval .. " ;0]"
127
-
128
123
if selected_pkg .type == " txp" then
129
124
if selected_pkg .enabled then
130
125
retval = retval ..
@@ -138,8 +133,10 @@ local function get_formspec(tabview, name, tabdata)
138
133
end
139
134
end
140
135
141
- retval = retval .. " button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;"
142
- .. fgettext (" Uninstall Package" ) .. " ]"
136
+ retval = retval .. " textarea[5.85,2.2;6.35,2.9;;" ..
137
+ fgettext (" Information:" ) .. " ;" .. desc .. " ]" ..
138
+ " button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;" ..
139
+ fgettext (" Uninstall Package" ) .. " ]"
143
140
end
144
141
return retval
145
142
end
0 commit comments