mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 16:32:53 +02:00
fixed headless admin button for player status changes
This commit is contained in:
@@ -400,6 +400,12 @@ void GraphicListBox::setSelectedItemIndex(int index, bool errorOnMissing){
|
|||||||
setText(getSelectedItem());
|
setText(getSelectedItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphicListBox::setX(int x) {
|
||||||
|
this->x= x;
|
||||||
|
graphButton1.setX(x);
|
||||||
|
graphButton2.setX(x+w-22);
|
||||||
|
}
|
||||||
|
|
||||||
void GraphicListBox::setY(int y) {
|
void GraphicListBox::setY(int y) {
|
||||||
this->y= y;
|
this->y= y;
|
||||||
graphButton1.setY(y);
|
graphButton1.setY(y);
|
||||||
|
@@ -258,6 +258,7 @@ public:
|
|||||||
|
|
||||||
bool hasItem(string item) const;
|
bool hasItem(string item) const;
|
||||||
|
|
||||||
|
virtual void setX(int x);
|
||||||
virtual void setY(int y);
|
virtual void setY(int y);
|
||||||
|
|
||||||
virtual bool mouseMove(int x, int y);
|
virtual bool mouseMove(int x, int y);
|
||||||
|
@@ -264,8 +264,8 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||||||
buttonCancelDownloads.setText(lang.get("CancelDownloads"));
|
buttonCancelDownloads.setText(lang.get("CancelDownloads"));
|
||||||
|
|
||||||
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
||||||
//listBoxPlayerStatus.init(xoffset+650, 180, 150);
|
nonAdminPlayerStatusX = xoffset+460;
|
||||||
listBoxPlayerStatus.init(xoffset+460, 180, 150);
|
listBoxPlayerStatus.init(nonAdminPlayerStatusX, 180, 150);
|
||||||
listBoxPlayerStatus.setTextColor(Vec3f(1.0f,0.f,0.f));
|
listBoxPlayerStatus.setTextColor(Vec3f(1.0f,0.f,0.f));
|
||||||
listBoxPlayerStatus.setLighted(true);
|
listBoxPlayerStatus.setLighted(true);
|
||||||
playerStatuses.push_back(lang.get("PlayerStatusSetup"));
|
playerStatuses.push_back(lang.get("PlayerStatusSetup"));
|
||||||
@@ -2403,6 +2403,14 @@ void MenuStateConnectedGame::render() {
|
|||||||
try {
|
try {
|
||||||
Renderer &renderer= Renderer::getInstance();
|
Renderer &renderer= Renderer::getInstance();
|
||||||
|
|
||||||
|
if(isHeadlessAdmin() == true) {
|
||||||
|
listBoxPlayerStatus.setX(buttonRestoreLastSettings.getX() +
|
||||||
|
buttonRestoreLastSettings.getW() + 20);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
listBoxPlayerStatus.setX(nonAdminPlayerStatusX);
|
||||||
|
}
|
||||||
|
|
||||||
if(mainMessageBox.getEnabled()) {
|
if(mainMessageBox.getEnabled()) {
|
||||||
renderer.renderMessageBox(&mainMessageBox);
|
renderer.renderMessageBox(&mainMessageBox);
|
||||||
}
|
}
|
||||||
|
@@ -87,6 +87,7 @@ private:
|
|||||||
|
|
||||||
GraphicListBox listBoxPlayerStatus;
|
GraphicListBox listBoxPlayerStatus;
|
||||||
GraphicLabel labelPlayerStatus[GameConstants::maxPlayers];
|
GraphicLabel labelPlayerStatus[GameConstants::maxPlayers];
|
||||||
|
int nonAdminPlayerStatusX;
|
||||||
|
|
||||||
GraphicLabel labelAllowObservers;
|
GraphicLabel labelAllowObservers;
|
||||||
//GraphicListBox listBoxAllowObservers;
|
//GraphicListBox listBoxAllowObservers;
|
||||||
|
Reference in New Issue
Block a user