mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 14:42:24 +01:00
Fix parseColor, change remaining colorkeys to new format, fix Contributor list
This commit is contained in:
parent
b3001bcd6e
commit
7e73b7cae9
@ -1063,7 +1063,7 @@ function tabbuilder.tab_credits()
|
|||||||
"label[0.5,3.3;http://minetest.net]" ..
|
"label[0.5,3.3;http://minetest.net]" ..
|
||||||
"image[0.5,1;" .. menu.basetexturedir .. "logo.png]" ..
|
"image[0.5,1;" .. menu.basetexturedir .. "logo.png]" ..
|
||||||
"textlist[3.5,-0.25;8.5,5.8;list_credits;" ..
|
"textlist[3.5,-0.25;8.5,5.8;list_credits;" ..
|
||||||
"#YLWCore Developers," ..
|
"#FFFF00Core Developers," ..
|
||||||
"Perttu Ahola (celeron55) <celeron55@gmail.com>,"..
|
"Perttu Ahola (celeron55) <celeron55@gmail.com>,"..
|
||||||
"Ryan Kwolek (kwolekr) <kwolekr@minetest.net>,"..
|
"Ryan Kwolek (kwolekr) <kwolekr@minetest.net>,"..
|
||||||
"PilzAdam <pilzadam@minetest.net>," ..
|
"PilzAdam <pilzadam@minetest.net>," ..
|
||||||
@ -1074,17 +1074,17 @@ function tabbuilder.tab_credits()
|
|||||||
"sfan5 <sfan5@live.de>,"..
|
"sfan5 <sfan5@live.de>,"..
|
||||||
"kahrl <kahrl@gmx.net>,"..
|
"kahrl <kahrl@gmx.net>,"..
|
||||||
","..
|
","..
|
||||||
"#YLWActive Contributors," ..
|
"#FFFF00Active Contributors," ..
|
||||||
"sapier,"..
|
"sapier,"..
|
||||||
"Vanessa Ezekowitz (VanessaE) <vanessaezekowitz@gmail.com>,"..
|
"Vanessa Ezekowitz (VanessaE) <vanessaezekowitz@gmail.com>,"..
|
||||||
"Jurgen Doser (doserj) <jurgen.doser@gmail.com>,"..
|
"Jurgen Doser (doserj) <jurgen.doser@gmail.com>,"..
|
||||||
"Jeija <jeija@mesecons.net>,"..
|
"Jeija <jeija@mesecons.net>,"..
|
||||||
"MirceaKitsune <mirceakitsune@gmail.com>,"..
|
"MirceaKitsune <mirceakitsune@gmail.com>,"..
|
||||||
"ShadowNinja"..
|
"ShadowNinja,"..
|
||||||
"dannydark <the_skeleton_of_a_child@yahoo.co.uk>"..
|
"dannydark <the_skeleton_of_a_child@yahoo.co.uk>,"..
|
||||||
"0gb.us <0gb.us@0gb.us>,"..
|
"0gb.us <0gb.us@0gb.us>,"..
|
||||||
"," ..
|
"," ..
|
||||||
"#YLWPrevious Contributors," ..
|
"#FFFF00Previous Contributors," ..
|
||||||
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com>,"..
|
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com>,"..
|
||||||
"Jonathan Neuschafer <j.neuschaefer@gmx.net>,"..
|
"Jonathan Neuschafer <j.neuschaefer@gmx.net>,"..
|
||||||
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net>,"..
|
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net>,"..
|
||||||
|
@ -365,7 +365,7 @@ function modmgr.render_worldmodlist()
|
|||||||
local parts = modmgr.global_mods[i]:split(DIR_DELIM)
|
local parts = modmgr.global_mods[i]:split(DIR_DELIM)
|
||||||
local shortname = parts[#parts]
|
local shortname = parts[#parts]
|
||||||
if modmgr.worldconfig.global_mods[shortname] then
|
if modmgr.worldconfig.global_mods[shortname] then
|
||||||
retval = retval .. "#GRN" .. modmgr.global_mods[i] .. ","
|
retval = retval .. "#22F922" .. modmgr.global_mods[i] .. ","
|
||||||
else
|
else
|
||||||
retval = retval .. modmgr.global_mods[i] .. ","
|
retval = retval .. modmgr.global_mods[i] .. ","
|
||||||
end
|
end
|
||||||
@ -379,7 +379,7 @@ function modmgr.render_gamemodlist()
|
|||||||
local retval = ""
|
local retval = ""
|
||||||
for i=1,#modmgr.worldconfig.game_mods,1 do
|
for i=1,#modmgr.worldconfig.game_mods,1 do
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"#BLU" .. modmgr.worldconfig.game_mods[i] .. ","
|
"#0000FF" .. modmgr.worldconfig.game_mods[i] .. ","
|
||||||
end
|
end
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
@ -662,7 +662,7 @@ void GUIFormSpecMenu::parseTextList(parserData* data,std::string element) {
|
|||||||
e->addItem(narrow_to_wide(items[i]).c_str() +1);
|
e->addItem(narrow_to_wide(items[i]).c_str() +1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::wstring toadd = narrow_to_wide(items[i].c_str() + 4);
|
std::wstring toadd = narrow_to_wide(items[i].c_str() + 7);
|
||||||
std::string color = items[i].substr(1,6);
|
std::string color = items[i].substr(1,6);
|
||||||
|
|
||||||
e->addItem(toadd.c_str());
|
e->addItem(toadd.c_str());
|
||||||
@ -2519,19 +2519,15 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
|||||||
bool GUIFormSpecMenu::parseColor(std::string color, irr::video::SColor& outcolor) {
|
bool GUIFormSpecMenu::parseColor(std::string color, irr::video::SColor& outcolor) {
|
||||||
outcolor = irr::video::SColor(0,0,0,0);
|
outcolor = irr::video::SColor(0,0,0,0);
|
||||||
|
|
||||||
if(color.size() != 6) return false;
|
if(!string_allowed(color, "0123456789abcdefABCDEF"))
|
||||||
if(!string_allowed(color, "0123456789abcdefABCDEF")) return false;
|
return false;
|
||||||
|
|
||||||
unsigned int r, g, b;
|
u32 color_value;
|
||||||
std::istringstream iss("");
|
std::istringstream iss(color);
|
||||||
iss.str(color.substr(0, 1));
|
iss >> std::hex >> color_value;
|
||||||
iss >> std::hex >> r;
|
outcolor = irr::video::SColor(color_value);
|
||||||
iss.str(color.substr(2, 1));
|
|
||||||
iss >> std::hex >> g;
|
|
||||||
iss.str(color.substr(4, 1));
|
|
||||||
iss >> std::hex >> b;
|
|
||||||
|
|
||||||
outcolor = irr::video::SColor(255,r,g,b);
|
outcolor.setAlpha(255);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user