int availWidth = (int) ((guiRight - 10 - (this.flagDesignerMinX + this.flagDesignerWidth + 10)) / 3);
float x1 = flagDesignerRight + 10;
float x2 = guiRight - 10;
float y1 = guiBottom - 10 - (x2 - x1);
int height = (int) (y1 - 10 - (guiTop + 10));
this.sliderColorR = new GuiElementSlider(1, flagDesignerRight + 10, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(1, 0, 0));
this.sliderColorG = new GuiElementSlider(2, flagDesignerRight + 11 + availWidth, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 1, 0));
this.sliderColorB = new GuiElementSlider(3, flagDesignerRight + 12 + availWidth * 2, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 0, 1));
this.sliderColorR.setSliderPos(sliderR);
this.sliderColorG.setSliderPos(sliderG);
this.sliderColorB.setSliderPos(sliderB);
this.buttonList.add(this.sliderColorR);
this.buttonList.add(this.sliderColorG);
this.buttonList.add(this.sliderColorB);
this.checkboxPaintbrush = new GuiElementCheckbox(5, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 10, 13, 13, 26, 26, 133, 0, "", 4210752, false);
this.checkboxEraser = new GuiElementCheckbox(6, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 25, 13, 13, 26, 26, 133, 52, "", 4210752, false);
this.checkboxSelector = new GuiElementCheckbox(7, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 40, 13, 13, 26, 26, 133, 78, "", 4210752, false);
this.checkboxColorSelector = new GuiElementCheckbox(8, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 55, 13, 13, 26, 26, 133, 104, "", 4210752, false);
this.checkboxShowGrid = new GuiElementCheckbox(9, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 90, 13, 13, 26, 26, 133, 26, "", 4210752, false);
this.sliderBrushSize = new GuiElementSlider(10, this.checkboxPaintbrush.xPosition - 40, this.checkboxPaintbrush.yPosition, 35, 13, false, new Vector3(0.34, 0.34, 0.34), new Vector3(0.34, 0.34, 0.34), GCCoreUtil.translate("gui.spaceRace.create.brushSize.name"));
this.sliderEraserSize = new GuiElementSlider(11, this.checkboxEraser.xPosition - 40, this.checkboxEraser.yPosition, 35, 13, false, new Vector3(0.34, 0.34, 0.34), new Vector3(0.34, 0.34, 0.34), GCCoreUtil.translate("gui.spaceRace.create.eraserSize.name"));
this.sliderEraserSize.visible = false;
this.buttonList.add(this.checkboxPaintbrush);
this.buttonList.add(this.checkboxShowGrid);
this.buttonList.add(this.checkboxEraser);
this.buttonList.add(this.checkboxSelector);
this.buttonList.add(this.checkboxColorSelector);
this.buttonList.add(this.sliderBrushSize);
this.buttonList.add(this.sliderEraserSize);
break;
case CHANGE_TEAM_COLOR:
guiBottom = this.height / 2 + this.height / 4;
guiTop = this.height / 2 - this.height / 4;
guiLeft = this.width / 6;
guiRight = this.width / 2 + this.width / 3;
flagDesignerRight = guiLeft;
availWidth = (guiRight - guiLeft - 100) / 3;
x1 = flagDesignerRight + 10;
x2 = guiLeft - 10;
y1 = guiBottom - 10 - (x2 - x1);
height = (int) (y1 - 10 - (guiTop + 30));
this.sliderColorR = new GuiElementSlider(1, flagDesignerRight + 25, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(1, 0, 0));
this.sliderColorG = new GuiElementSlider(2, flagDesignerRight + availWidth + 50, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 1, 0));
this.sliderColorB = new GuiElementSlider(3, flagDesignerRight + availWidth * 2 + 75, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 0, 1));
this.sliderColorR.setSliderPos(this.spaceRaceData.getTeamColor().floatX());
this.sliderColorG.setSliderPos(this.spaceRaceData.getTeamColor().floatY());
this.sliderColorB.setSliderPos(this.spaceRaceData.getTeamColor().floatZ());
this.buttonList.add(this.sliderColorR);
this.buttonList.add(this.sliderColorG);