Just render zoomed map preview and nothing else.
This commit is contained in:
parent
85319b30fc
commit
29f5881ded
|
@ -72,6 +72,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
updateDataSynchDetailText = false;
|
||||
launchingNewGame = false;
|
||||
|
||||
this->zoomedMap = false;
|
||||
this->render_mapPreviewTexture_X = mapPreviewTexture_X;
|
||||
this->render_mapPreviewTexture_Y = mapPreviewTexture_Y;
|
||||
this->render_mapPreviewTexture_W = mapPreviewTexture_W;
|
||||
|
@ -1161,6 +1162,7 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
this->render_mapPreviewTexture_Y = 0;
|
||||
this->render_mapPreviewTexture_W = metrics.getVirtualW();
|
||||
this->render_mapPreviewTexture_H = metrics.getVirtualH();
|
||||
this->zoomedMap = true;
|
||||
|
||||
cleanupMapPreviewTexture();
|
||||
}
|
||||
|
@ -1169,10 +1171,14 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
this->render_mapPreviewTexture_Y = mapPreviewTexture_Y;
|
||||
this->render_mapPreviewTexture_W = mapPreviewTexture_W;
|
||||
this->render_mapPreviewTexture_H = mapPreviewTexture_H;
|
||||
this->zoomedMap = false;
|
||||
|
||||
cleanupMapPreviewTexture();
|
||||
}
|
||||
}
|
||||
if(this->zoomedMap==true){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(mainMessageBox.getEnabled()) {
|
||||
|
@ -2436,7 +2442,9 @@ void MenuStateConnectedGame::render() {
|
|||
this->render_mapPreviewTexture_W,
|
||||
this->render_mapPreviewTexture_H,
|
||||
mapPreviewTexture,1.0f);
|
||||
|
||||
if(this->zoomedMap==true) {
|
||||
return;
|
||||
}
|
||||
//printf("=================> Rendering map preview texture\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ private:
|
|||
|
||||
MapInfo mapInfo;
|
||||
Texture2D *mapPreviewTexture;
|
||||
bool zoomedMap;
|
||||
int render_mapPreviewTexture_X;
|
||||
int render_mapPreviewTexture_Y;
|
||||
int render_mapPreviewTexture_W;
|
||||
|
|
|
@ -80,6 +80,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
|
||||
this->gameUUID = getUUIDAsString();
|
||||
|
||||
this->zoomedMap=false;
|
||||
this->render_mapPreviewTexture_X = mapPreviewTexture_X;
|
||||
this->render_mapPreviewTexture_Y = mapPreviewTexture_Y;
|
||||
this->render_mapPreviewTexture_W = mapPreviewTexture_W;
|
||||
|
@ -1073,6 +1074,7 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
|||
this->render_mapPreviewTexture_Y = 0;
|
||||
this->render_mapPreviewTexture_W = metrics.getVirtualW();
|
||||
this->render_mapPreviewTexture_H = metrics.getVirtualH();
|
||||
this->zoomedMap = true;
|
||||
|
||||
cleanupMapPreviewTexture();
|
||||
}
|
||||
|
@ -1081,10 +1083,15 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
|||
this->render_mapPreviewTexture_Y = mapPreviewTexture_Y;
|
||||
this->render_mapPreviewTexture_W = mapPreviewTexture_W;
|
||||
this->render_mapPreviewTexture_H = mapPreviewTexture_H;
|
||||
this->zoomedMap = false;
|
||||
|
||||
cleanupMapPreviewTexture();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(this->zoomedMap == true){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(activeInputLabel!=NULL && !(activeInputLabel->mouseClick(x,y))){
|
||||
|
@ -2031,10 +2038,11 @@ void MenuStateCustomGame::render() {
|
|||
this->render_mapPreviewTexture_W,
|
||||
this->render_mapPreviewTexture_H,
|
||||
mapPreviewTexture,1.0f);
|
||||
|
||||
if(this->zoomedMap==true) {
|
||||
return;
|
||||
}
|
||||
//printf("=================> Rendering map preview texture\n");
|
||||
}
|
||||
|
||||
if(scenarioLogoTexture != NULL) {
|
||||
renderer.renderTextureQuad(300,350,400,300,scenarioLogoTexture,1.0f);
|
||||
//renderer.renderBackground(scenarioLogoTexture);
|
||||
|
|
|
@ -192,6 +192,7 @@ private:
|
|||
|
||||
MapPreview mapPreview;
|
||||
Texture2D *mapPreviewTexture;
|
||||
bool zoomedMap;
|
||||
int render_mapPreviewTexture_X;
|
||||
int render_mapPreviewTexture_Y;
|
||||
int render_mapPreviewTexture_W;
|
||||
|
|
Loading…
Reference in New Issue