mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
Mod menu tells you a bit more about mod states. Never versions of Mods are NOT indicated yet. Hopefully this is the next step.
This commit is contained in:
@@ -78,6 +78,15 @@ void CoreData::load() {
|
|||||||
customTexture= renderer.newTexture2D(rsGlobal);
|
customTexture= renderer.newTexture2D(rsGlobal);
|
||||||
customTexture->getPixmap()->load(dir+"/menu/textures/custom_texture.tga");
|
customTexture->getPixmap()->load(dir+"/menu/textures/custom_texture.tga");
|
||||||
|
|
||||||
|
notOnServerTexture= renderer.newTexture2D(rsGlobal);
|
||||||
|
notOnServerTexture->getPixmap()->load(dir+"/menu/textures/not_on_server.tga");
|
||||||
|
onServerDifferentTexture= renderer.newTexture2D(rsGlobal);
|
||||||
|
onServerDifferentTexture->getPixmap()->load(dir+"/menu/textures/on_server_different.tga");
|
||||||
|
onServerTexture= renderer.newTexture2D(rsGlobal);
|
||||||
|
onServerTexture->getPixmap()->load(dir+"/menu/textures/on_server.tga");
|
||||||
|
onServerInstalledTexture= renderer.newTexture2D(rsGlobal);
|
||||||
|
onServerInstalledTexture->getPixmap()->load(dir+"/menu/textures/on_server_installed.tga");
|
||||||
|
|
||||||
logoTexture= renderer.newTexture2D(rsGlobal);
|
logoTexture= renderer.newTexture2D(rsGlobal);
|
||||||
logoTexture->setMipmap(false);
|
logoTexture->setMipmap(false);
|
||||||
logoTexture->getPixmap()->load(dir+"/menu/textures/logo.tga");
|
logoTexture->getPixmap()->load(dir+"/menu/textures/logo.tga");
|
||||||
|
@@ -61,6 +61,11 @@ private:
|
|||||||
Texture2D *checkBoxTexture;
|
Texture2D *checkBoxTexture;
|
||||||
Texture2D *checkedCheckBoxTexture;
|
Texture2D *checkedCheckBoxTexture;
|
||||||
Texture2D *gameWinnerTexture;
|
Texture2D *gameWinnerTexture;
|
||||||
|
Texture2D *notOnServerTexture;
|
||||||
|
Texture2D *onServerDifferentTexture;
|
||||||
|
Texture2D *onServerTexture;
|
||||||
|
Texture2D *onServerInstalledTexture;
|
||||||
|
|
||||||
|
|
||||||
Font2D *displayFont;
|
Font2D *displayFont;
|
||||||
Font2D *menuFontNormal;
|
Font2D *menuFontNormal;
|
||||||
@@ -95,6 +100,10 @@ public:
|
|||||||
Texture2D *getVerticalLineTexture() const {return verticalLineTexture;}
|
Texture2D *getVerticalLineTexture() const {return verticalLineTexture;}
|
||||||
Texture2D *getCheckBoxTexture() const {return checkBoxTexture;}
|
Texture2D *getCheckBoxTexture() const {return checkBoxTexture;}
|
||||||
Texture2D *getCheckedCheckBoxTexture() const {return checkedCheckBoxTexture;}
|
Texture2D *getCheckedCheckBoxTexture() const {return checkedCheckBoxTexture;}
|
||||||
|
Texture2D *getNotOnServerTexture() const {return notOnServerTexture;}
|
||||||
|
Texture2D *getOnServerDifferentTexture() const {return onServerDifferentTexture;}
|
||||||
|
Texture2D *getOnServerTexture() const {return onServerTexture;}
|
||||||
|
Texture2D *getOnServerInstalledTexture() const {return onServerInstalledTexture;}
|
||||||
|
|
||||||
Texture2D *getGameWinnerTexture() const {return gameWinnerTexture;}
|
Texture2D *getGameWinnerTexture() const {return gameWinnerTexture;}
|
||||||
|
|
||||||
|
@@ -92,7 +92,7 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||||||
keyTechScrollBarTitle1.registerGraphicComponent(containerName,"keyTechScrollBarTitle1");
|
keyTechScrollBarTitle1.registerGraphicComponent(containerName,"keyTechScrollBarTitle1");
|
||||||
keyTechScrollBarTitle1.init(techInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
keyTechScrollBarTitle1.init(techInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
||||||
keyTechScrollBarTitle1.setText(lang.get("TechTitle1"));
|
keyTechScrollBarTitle1.setText(lang.get("TechTitle1"));
|
||||||
keyTechScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontNormal());
|
keyTechScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
keyTechScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
keyTechScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||||
keyTechScrollBarTitle2.registerGraphicComponent(containerName,"keyTechScrollBarTitle2");
|
keyTechScrollBarTitle2.registerGraphicComponent(containerName,"keyTechScrollBarTitle2");
|
||||||
keyTechScrollBarTitle2.init(techInfoXPos + 200,scrollListsYPos + 20,labelWidth,20);
|
keyTechScrollBarTitle2.init(techInfoXPos + 200,scrollListsYPos + 20,labelWidth,20);
|
||||||
@@ -104,7 +104,7 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||||||
keyMapScrollBarTitle1.registerGraphicComponent(containerName,"keyMapScrollBarTitle1");
|
keyMapScrollBarTitle1.registerGraphicComponent(containerName,"keyMapScrollBarTitle1");
|
||||||
keyMapScrollBarTitle1.init(mapInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
keyMapScrollBarTitle1.init(mapInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
||||||
keyMapScrollBarTitle1.setText(lang.get("MapTitle1"));
|
keyMapScrollBarTitle1.setText(lang.get("MapTitle1"));
|
||||||
keyMapScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontNormal());
|
keyMapScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
keyMapScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
keyMapScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||||
keyMapScrollBarTitle2.registerGraphicComponent(containerName,"keyMapScrollBarTitle2");
|
keyMapScrollBarTitle2.registerGraphicComponent(containerName,"keyMapScrollBarTitle2");
|
||||||
keyMapScrollBarTitle2.init(mapInfoXPos + 200,scrollListsYPos + 20,labelWidth,20);
|
keyMapScrollBarTitle2.init(mapInfoXPos + 200,scrollListsYPos + 20,labelWidth,20);
|
||||||
@@ -116,14 +116,14 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||||||
keyTilesetScrollBarTitle1.registerGraphicComponent(containerName,"keyTilesetScrollBarTitle1");
|
keyTilesetScrollBarTitle1.registerGraphicComponent(containerName,"keyTilesetScrollBarTitle1");
|
||||||
keyTilesetScrollBarTitle1.init(tilesetInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
keyTilesetScrollBarTitle1.init(tilesetInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
||||||
keyTilesetScrollBarTitle1.setText(lang.get("TilesetTitle1"));
|
keyTilesetScrollBarTitle1.setText(lang.get("TilesetTitle1"));
|
||||||
keyTilesetScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontNormal());
|
keyTilesetScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
keyTilesetScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
keyTilesetScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||||
|
|
||||||
scenarioInfoXPos = 760;
|
scenarioInfoXPos = 760;
|
||||||
keyScenarioScrollBarTitle1.registerGraphicComponent(containerName,"keyScenarioScrollBarTitle1");
|
keyScenarioScrollBarTitle1.registerGraphicComponent(containerName,"keyScenarioScrollBarTitle1");
|
||||||
keyScenarioScrollBarTitle1.init(scenarioInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
keyScenarioScrollBarTitle1.init(scenarioInfoXPos,scrollListsYPos + 20,labelWidth,20);
|
||||||
keyScenarioScrollBarTitle1.setText(lang.get("ScenarioTitle1"));
|
keyScenarioScrollBarTitle1.setText(lang.get("ScenarioTitle1"));
|
||||||
keyScenarioScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontNormal());
|
keyScenarioScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
keyScenarioScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
keyScenarioScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||||
|
|
||||||
mainMessageBoxState = ftpmsg_None;
|
mainMessageBoxState = ftpmsg_None;
|
||||||
@@ -1255,7 +1255,6 @@ void MenuStateMods::mouseClick(int x, int y, MouseButton mouseButton) {
|
|||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
string itemPath = config.getPathListForType(ptTechs,"")[1] + "/" + selectedTechName + string("/*");
|
string itemPath = config.getPathListForType(ptTechs,"")[1] + "/" + selectedTechName + string("/*");
|
||||||
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
|
|
||||||
if( strToInt(modInfo.crc) != 0 &&
|
if( strToInt(modInfo.crc) != 0 &&
|
||||||
strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,forceRefresh)) {
|
strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,forceRefresh)) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL));
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL));
|
||||||
@@ -1812,11 +1811,21 @@ void MenuStateMods::render() {
|
|||||||
else if(alreadyHasTech == true) {
|
else if(alreadyHasTech == true) {
|
||||||
Vec4f buttonColor = WHITE;
|
Vec4f buttonColor = WHITE;
|
||||||
buttonColor.w = 0.75f;
|
buttonColor.w = 0.75f;
|
||||||
|
bool remoteHasTech = (techCacheList.find(keyTechButtons[i]->getText()) != techCacheList.end());
|
||||||
|
if(remoteHasTech)
|
||||||
|
{
|
||||||
|
keyTechButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerInstalledTexture());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyTechButtons[i]->setCustomTexture(CoreData::getInstance().getNotOnServerTexture());
|
||||||
|
}
|
||||||
renderer.renderButton(keyTechButtons[i],&buttonColor);
|
renderer.renderButton(keyTechButtons[i],&buttonColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
||||||
//Vec4f fontColor=Vec4f(1.0f, 0.0f, 0.0f, 0.75f);
|
//Vec4f fontColor=Vec4f(1.0f, 0.0f, 0.0f, 0.75f);
|
||||||
|
keyTechButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerTexture());
|
||||||
renderer.renderButton(keyTechButtons[i],&fontColor);
|
renderer.renderButton(keyTechButtons[i],&fontColor);
|
||||||
}
|
}
|
||||||
renderer.renderLabel(labelsTech[i]);
|
renderer.renderLabel(labelsTech[i]);
|
||||||
@@ -1837,10 +1846,20 @@ void MenuStateMods::render() {
|
|||||||
else if(alreadyHasTileset == true) {
|
else if(alreadyHasTileset == true) {
|
||||||
Vec4f buttonColor = WHITE;
|
Vec4f buttonColor = WHITE;
|
||||||
buttonColor.w = 0.75f;
|
buttonColor.w = 0.75f;
|
||||||
|
bool remoteHasTileset= (tilesetCacheList.find(keyTilesetButtons[i]->getText()) != tilesetCacheList.end());
|
||||||
|
if(remoteHasTileset)
|
||||||
|
{
|
||||||
|
keyTilesetButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerInstalledTexture());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyTilesetButtons[i]->setCustomTexture(CoreData::getInstance().getNotOnServerTexture());
|
||||||
|
}
|
||||||
renderer.renderButton(keyTilesetButtons[i],&buttonColor);
|
renderer.renderButton(keyTilesetButtons[i],&buttonColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
||||||
|
keyTilesetButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerTexture());
|
||||||
renderer.renderButton(keyTilesetButtons[i],&fontColor);
|
renderer.renderButton(keyTilesetButtons[i],&fontColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1862,10 +1881,20 @@ void MenuStateMods::render() {
|
|||||||
else if(alreadyHasMap == true) {
|
else if(alreadyHasMap == true) {
|
||||||
Vec4f buttonColor = WHITE;
|
Vec4f buttonColor = WHITE;
|
||||||
buttonColor.w = 0.75f;
|
buttonColor.w = 0.75f;
|
||||||
|
bool remoteHasMap = (mapCacheList.find(keyMapButtons[i]->getText()) != mapCacheList.end());
|
||||||
|
if(remoteHasMap)
|
||||||
|
{
|
||||||
|
keyMapButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerInstalledTexture());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyMapButtons[i]->setCustomTexture(CoreData::getInstance().getNotOnServerTexture());
|
||||||
|
}
|
||||||
renderer.renderButton(keyMapButtons[i],&buttonColor);
|
renderer.renderButton(keyMapButtons[i],&buttonColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
||||||
|
keyMapButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerTexture());
|
||||||
renderer.renderButton(keyMapButtons[i],&fontColor);
|
renderer.renderButton(keyMapButtons[i],&fontColor);
|
||||||
}
|
}
|
||||||
renderer.renderLabel(labelsMap[i]);
|
renderer.renderLabel(labelsMap[i]);
|
||||||
@@ -1891,10 +1920,20 @@ void MenuStateMods::render() {
|
|||||||
else if(alreadyHasScenario == true) {
|
else if(alreadyHasScenario == true) {
|
||||||
Vec4f buttonColor = WHITE;
|
Vec4f buttonColor = WHITE;
|
||||||
buttonColor.w = 0.75f;
|
buttonColor.w = 0.75f;
|
||||||
|
bool remoteHasScenario= (scenarioCacheList.find(keyScenarioButtons[i]->getText()) != scenarioCacheList.end());
|
||||||
|
if(remoteHasScenario)
|
||||||
|
{
|
||||||
|
keyScenarioButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerInstalledTexture());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyScenarioButtons[i]->setCustomTexture(CoreData::getInstance().getNotOnServerTexture());
|
||||||
|
}
|
||||||
renderer.renderButton(keyScenarioButtons[i],&buttonColor);
|
renderer.renderButton(keyScenarioButtons[i],&buttonColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
Vec4f fontColor=Vec4f(200.0f/255.0f, 187.0f/255.0f, 190.0f/255.0f, 0.75f);
|
||||||
|
keyScenarioButtons[i]->setCustomTexture(CoreData::getInstance().getOnServerTexture());
|
||||||
renderer.renderButton(keyScenarioButtons[i],&fontColor);
|
renderer.renderButton(keyScenarioButtons[i],&fontColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user