details = details .. " "
end
- if spec.port ~= nil then
- text = text .. ":" .. spec.port:trim()
- else
- text = text .. ":??"
- end
-
return text
end
return temppath
end
+--------------------------------------------------------------------------------
+
function menu.set_texture(identifier,gamedetails)
local texture_set = false
if menu.texturepack ~= nil then
end
if event.typ == "CHG" then
- local address = menu.favorites[event.index].name
- if address == nil then
- address = menu.favorites[event.index].address
- end
+ local address = menu.favorites[event.index].address
local port = menu.favorites[event.index].port
if address ~= nil and
retval = retval .. "," .. render_favourite(menu.favorites[i])
end
end
-
- print("cfav: " .. dump(menu.fav_selected))
+
if menu.fav_selected ~= nil then
retval = retval .. ";" .. menu.fav_selected .. "]"
else
retval = retval .. "," .. menu.worldlist[i].name ..
" \\[" .. menu.worldlist[i].gameid .. "\\]"
end
+ retval = retval .. ";" .. index .. "]"
+ else
+ retval = retval .. ";0]"
end
-
- retval = retval .. ";" .. index .. "]"
return retval
end
function tabbuilder.tab_singleplayer()
local index = engine.setting_get("main_menu_singleplayer_world_idx")
- if index == nil then
+ if index == nil or
+ #menu.filtered_game_list_raw() == 0 then
index = 0
end
text = newtext
end
- text = text:gsub("%[","\\%[")
- text = text:gsub("]","\\]")
- text = text:gsub(";","\\;")
+ text = string.gsub(text,"\\","\\\\")
+ text = string.gsub(text,"%]","\\]")
+ text = string.gsub(text,"%[","\\[")
+ text = string.gsub(text,";","\\;")
+ text = string.gsub(text,",","\\,")
end
return text
end
std::vector<std::string> v_pos = split(parts[0],',');
std::vector<std::string> v_geom = split(parts[1],',');
std::string name = parts[2];
- std::vector<std::string> items = split(parts[3],',');
+ std::vector<std::string> items = split(parts[3],',',true);
std::string str_initial_selection = "";
std::string str_transparent = "false";
}
void GUIFormSpecMenu::parseElement(parserData* data,std::string element) {
+
//some prechecks
if (element == "")
return;