- added free software logos
- updated the client lobby screen so the chat window does not overlap UI controls
This commit is contained in:
parent
bc064bea47
commit
0f231f28e6
|
@ -16,6 +16,7 @@
|
||||||
#include "graphics_interface.h"
|
#include "graphics_interface.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "platform_util.h"
|
||||||
#include "leak_dumper.h"
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
using namespace Shared::Sound;
|
using namespace Shared::Sound;
|
||||||
|
@ -68,6 +69,20 @@ void CoreData::load(){
|
||||||
logoTexture->setMipmap(false);
|
logoTexture->setMipmap(false);
|
||||||
logoTexture->getPixmap()->load(dir+"/menu/textures/logo.tga");
|
logoTexture->getPixmap()->load(dir+"/menu/textures/logo.tga");
|
||||||
|
|
||||||
|
logoTextureList.clear();
|
||||||
|
string logosPath= dir+"/menu/textures/logo*.*";
|
||||||
|
vector<string> logoFilenames;
|
||||||
|
findAll(logosPath, logoFilenames);
|
||||||
|
for(int i = 0; i < logoFilenames.size(); ++i) {
|
||||||
|
string logo = logoFilenames[i];
|
||||||
|
if(stricmp("logo.tga",logo.c_str()) != 0) {
|
||||||
|
Texture2D *logoTextureExtra= renderer.newTexture2D(rsGlobal);
|
||||||
|
logoTextureExtra->setMipmap(false);
|
||||||
|
logoTextureExtra->getPixmap()->load(dir+"/menu/textures/" + logo);
|
||||||
|
logoTextureList.push_back(logoTextureExtra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
waterSplashTexture= renderer.newTexture2D(rsGlobal);
|
waterSplashTexture= renderer.newTexture2D(rsGlobal);
|
||||||
waterSplashTexture->setFormat(Texture::fAlpha);
|
waterSplashTexture->setFormat(Texture::fAlpha);
|
||||||
waterSplashTexture->getPixmap()->init(1);
|
waterSplashTexture->getPixmap()->init(1);
|
||||||
|
|
|
@ -44,6 +44,7 @@ private:
|
||||||
SoundContainer waterSounds;
|
SoundContainer waterSounds;
|
||||||
|
|
||||||
Texture2D *logoTexture;
|
Texture2D *logoTexture;
|
||||||
|
std::vector<Texture2D *> logoTextureList;
|
||||||
Texture2D *backgroundTexture;
|
Texture2D *backgroundTexture;
|
||||||
Texture2D *fireTexture;
|
Texture2D *fireTexture;
|
||||||
Texture2D *snowTexture;
|
Texture2D *snowTexture;
|
||||||
|
@ -74,6 +75,9 @@ public:
|
||||||
Texture2D *getButtonSmallTexture() const {return buttonSmallTexture;}
|
Texture2D *getButtonSmallTexture() const {return buttonSmallTexture;}
|
||||||
Texture2D *getButtonBigTexture() const {return buttonBigTexture;}
|
Texture2D *getButtonBigTexture() const {return buttonBigTexture;}
|
||||||
|
|
||||||
|
int getLogoTextureExtraCount() const {return logoTextureList.size();}
|
||||||
|
Texture2D *getLogoTextureExtra(int idx) const {return logoTextureList[idx];}
|
||||||
|
|
||||||
StrSound *getIntroMusic() {return &introMusic;}
|
StrSound *getIntroMusic() {return &introMusic;}
|
||||||
StrSound *getMenuMusic() {return &menuMusic;}
|
StrSound *getMenuMusic() {return &menuMusic;}
|
||||||
StaticSound *getClickSoundA() {return &clickSoundA;}
|
StaticSound *getClickSoundA() {return &clickSoundA;}
|
||||||
|
|
|
@ -77,8 +77,8 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
|
|
||||||
|
|
||||||
//create
|
//create
|
||||||
buttonDisconnect.init(350, 150, 125);
|
buttonDisconnect.init(350, 180, 125);
|
||||||
buttonPlayNow.init(525, 150, 125);
|
buttonPlayNow.init(525, 180, 125);
|
||||||
|
|
||||||
//map listBox
|
//map listBox
|
||||||
// put them all in a set, to weed out duplicates (gbm & mgm with same name)
|
// put them all in a set, to weed out duplicates (gbm & mgm with same name)
|
||||||
|
@ -88,9 +88,9 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
|
|
||||||
|
|
||||||
int setupPos=610;
|
int setupPos=610;
|
||||||
int mapHeadPos=290;
|
int mapHeadPos=330;
|
||||||
int mapPos=mapHeadPos-30;
|
int mapPos=mapHeadPos-30;
|
||||||
int aHeadPos=230;
|
int aHeadPos=260;
|
||||||
int aPos=aHeadPos-30;
|
int aPos=aHeadPos-30;
|
||||||
int networkHeadPos=670;
|
int networkHeadPos=670;
|
||||||
int networkPos=networkHeadPos-30;
|
int networkPos=networkHeadPos-30;
|
||||||
|
@ -175,22 +175,26 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
//list boxes
|
//list boxes
|
||||||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||||
labelPlayers[i].init(100, 550-i*30);
|
labelPlayers[i].init(100, setupPos-30-i*30);
|
||||||
labelPlayers[i].setEditable(false);
|
labelPlayers[i].setEditable(false);
|
||||||
listBoxControls[i].init(200, 550-i*30);
|
listBoxControls[i].init(200, setupPos-30-i*30);
|
||||||
listBoxControls[i].setEditable(false);
|
listBoxControls[i].setEditable(false);
|
||||||
listBoxFactions[i].init(400, 550-i*30);
|
listBoxFactions[i].init(400, setupPos-30-i*30);
|
||||||
listBoxFactions[i].setEditable(false);
|
listBoxFactions[i].setEditable(false);
|
||||||
listBoxTeams[i].init(600, 550-i*30, 60);
|
listBoxTeams[i].init(600, setupPos-30-i*30, 60);
|
||||||
listBoxTeams[i].setEditable(false);
|
listBoxTeams[i].setEditable(false);
|
||||||
labelNetStatus[i].init(700, 550-i*30, 60);
|
labelNetStatus[i].init(700, setupPos-30-i*30, 60);
|
||||||
grabSlotButton[i].init(700, 550-i*30, 30);
|
grabSlotButton[i].init(700, setupPos-30-i*30, 30);
|
||||||
grabSlotButton[i].setText(">");
|
grabSlotButton[i].setText(">");
|
||||||
}
|
}
|
||||||
|
|
||||||
labelControl.init(200, 600, GraphicListBox::defW, GraphicListBox::defH, true);
|
labelControl.init(200, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||||
labelFaction.init(400, 600, GraphicListBox::defW, GraphicListBox::defH, true);
|
labelFaction.init(400, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||||
labelTeam.init(600, 600, 60, GraphicListBox::defH, true);
|
labelTeam.init(600, setupPos, 60, GraphicListBox::defH, true);
|
||||||
|
|
||||||
|
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
|
labelFaction.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
|
labelTeam.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
|
|
||||||
//texts
|
//texts
|
||||||
buttonDisconnect.setText(lang.get("Return"));
|
buttonDisconnect.setText(lang.get("Return"));
|
||||||
|
|
|
@ -137,6 +137,25 @@ void MenuStateRoot::render(){
|
||||||
renderer.renderTextureQuad(
|
renderer.renderTextureQuad(
|
||||||
(metrics.getVirtualW()-w)/2, 475-h/2, w, h,
|
(metrics.getVirtualW()-w)/2, 475-h/2, w, h,
|
||||||
coreData.getLogoTexture(), GraphicComponent::getFade());
|
coreData.getLogoTexture(), GraphicComponent::getFade());
|
||||||
|
|
||||||
|
int maxLogoWidth=0;
|
||||||
|
for(int idx = 0; idx < coreData.getLogoTextureExtraCount(); ++idx) {
|
||||||
|
Texture2D *extraLogo = coreData.getLogoTextureExtra(idx);
|
||||||
|
maxLogoWidth += extraLogo->getPixmap()->getW();
|
||||||
|
}
|
||||||
|
|
||||||
|
int currentX = (metrics.getVirtualW()-maxLogoWidth)/2;
|
||||||
|
int currentY = 50;
|
||||||
|
for(int idx = 0; idx < coreData.getLogoTextureExtraCount(); ++idx) {
|
||||||
|
Texture2D *extraLogo = coreData.getLogoTextureExtra(idx);
|
||||||
|
|
||||||
|
renderer.renderTextureQuad(
|
||||||
|
currentX, currentY,
|
||||||
|
extraLogo->getPixmap()->getW(), extraLogo->getPixmap()->getH(),
|
||||||
|
extraLogo, GraphicComponent::getFade());
|
||||||
|
|
||||||
|
currentX += extraLogo->getPixmap()->getW();
|
||||||
|
}
|
||||||
renderer.renderButton(&buttonNewGame);
|
renderer.renderButton(&buttonNewGame);
|
||||||
renderer.renderButton(&buttonJoinGame);
|
renderer.renderButton(&buttonJoinGame);
|
||||||
renderer.renderButton(&buttonMasterserverGame);
|
renderer.renderButton(&buttonMasterserverGame);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user