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