Merge branch 'develop' of github-softcoder-megaglest:MegaGlest/megaglest-source into develop
This commit is contained in:
commit
494061b80d
|
@ -341,6 +341,7 @@ const int GraphicButton::defW= 90;
|
||||||
|
|
||||||
GraphicButton::GraphicButton(std::string containerName, std::string objName) : GraphicComponent(containerName,objName) {
|
GraphicButton::GraphicButton(std::string containerName, std::string objName) : GraphicComponent(containerName,objName) {
|
||||||
lighted = false;
|
lighted = false;
|
||||||
|
alwaysLighted = false;
|
||||||
useCustomTexture = false;
|
useCustomTexture = false;
|
||||||
customTexture = NULL;
|
customTexture = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,6 +212,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool lighted;
|
bool lighted;
|
||||||
|
bool alwaysLighted;
|
||||||
|
|
||||||
bool useCustomTexture;
|
bool useCustomTexture;
|
||||||
Texture *customTexture;
|
Texture *customTexture;
|
||||||
|
@ -226,9 +227,10 @@ public:
|
||||||
void setUseCustomTexture(bool value) { useCustomTexture=value; }
|
void setUseCustomTexture(bool value) { useCustomTexture=value; }
|
||||||
void setCustomTexture(Texture *value) { customTexture=value; }
|
void setCustomTexture(Texture *value) { customTexture=value; }
|
||||||
|
|
||||||
bool getLighted() const {return lighted;}
|
bool getLighted() const {return lighted||alwaysLighted;}
|
||||||
|
|
||||||
void setLighted(bool lighted) {this->lighted= lighted;}
|
void setLighted(bool lighted) {this->lighted= lighted;}
|
||||||
|
bool getAlwaysLighted() const {return alwaysLighted;}
|
||||||
|
void setAlwaysLighted(bool value) {this->alwaysLighted= value;}
|
||||||
virtual bool mouseMove(int x, int y);
|
virtual bool mouseMove(int x, int y);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
||||||
i+= 130;
|
i+= 130;
|
||||||
selectButton.init(i, baseY - lineOffset, 30);
|
selectButton.init(i, baseY - lineOffset, 30);
|
||||||
selectButton.setText(">");
|
selectButton.setText(">");
|
||||||
|
selectButton.setAlwaysLighted(true);
|
||||||
|
|
||||||
//printf("glestVersionString [%s] masterServerInfo->getGlestVersion() [%s]\n",glestVersionString.c_str(),masterServerInfo->getGlestVersion().c_str());
|
//printf("glestVersionString [%s] masterServerInfo->getGlestVersion() [%s]\n",glestVersionString.c_str(),masterServerInfo->getGlestVersion().c_str());
|
||||||
compatible= checkVersionComptability(glestVersionString, masterServerInfo.getGlestVersion());
|
compatible= checkVersionComptability(glestVersionString, masterServerInfo.getGlestVersion());
|
||||||
|
|
|
@ -819,9 +819,20 @@ int getMajor(string version){
|
||||||
|
|
||||||
int getMinor(string version){
|
int getMinor(string version){
|
||||||
vector<string> parts=split(version.substr(1),".");
|
vector<string> parts=split(version.substr(1),".");
|
||||||
|
if(parts.size()>2 && parts[1] != ""){
|
||||||
if(parts.size()>2 && parts[1] != "" && IsNumeric(parts[1].c_str(),false))
|
string resultStr="";
|
||||||
return strToInt(parts[1]);
|
for (int i = 0; i < (int)parts[1].length(); ++i) {
|
||||||
|
// just add leading numbers
|
||||||
|
if(IsNumeric((resultStr+parts[1][i]).c_str(),false) )
|
||||||
|
resultStr += parts[1][i];
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(resultStr=="")
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return strToInt(resultStr);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue