Assorted cleanup.

This commit is contained in:
GJ 2012-03-31 18:19:24 -04:00
parent 9904eb0b0d
commit bb5a9826bc
4 changed files with 47 additions and 42 deletions

View File

@ -2,12 +2,12 @@ package com.gmail.nossr50.datatypes.buttons;
import org.getspout.spoutapi.gui.GenericButton;
public class ButtonEscape extends GenericButton
{
public ButtonEscape()
{
this.setText("EXIT");
this.setWidth(60).setHeight(20);
this.setDirty(true);
}
public class ButtonEscape extends GenericButton {
public ButtonEscape() {
this.setText("EXIT");
this.setWidth(60);
this.setHeight(20);
this.setDirty(true);
}
}

View File

@ -1,21 +1,14 @@
package com.gmail.nossr50.datatypes.buttons;
import org.getspout.spoutapi.gui.GenericButton;
import com.gmail.nossr50.datatypes.PlayerProfile;
public class ButtonHUDStyle extends GenericButton
{
public ButtonHUDStyle(PlayerProfile PP)
{
this.setText("HUD Type: "+PP.getHUDType().toString());
this.setTooltip("Change your HUD style!");
this.setWidth(120).setHeight(20);
this.setDirty(true);
}
public void updateText(PlayerProfile PP)
{
this.setText("HUD Type: "+PP.getHUDType().toString());
this.setDirty(true);
}
}
public class ButtonHUDStyle extends ButtonToggle {
public ButtonHUDStyle(PlayerProfile PP) {
super("HUD Type: ", PP.getHUDType().toString(), "Change your HUD style!");
}
public void updateText(PlayerProfile PP) {
super.updateText("HUD Type: ", PP.getHUDType().toString());
}
}

View File

@ -1,21 +1,14 @@
package com.gmail.nossr50.datatypes.buttons;
import org.getspout.spoutapi.gui.GenericButton;
import com.gmail.nossr50.datatypes.PlayerProfile;
public class ButtonPartyToggle extends GenericButton
{
public ButtonPartyToggle(PlayerProfile PP)
{
this.setText("Party HUD: "+PP.getPartyHUD());
this.setTooltip("Toggle the Party HUD!");
this.setWidth(120).setHeight(20);
this.setDirty(true);
}
public void updateText(PlayerProfile PP)
{
this.setText("Party HUD: "+PP.getPartyHUD());
this.setDirty(true);
}
}
public class ButtonPartyToggle extends ButtonToggle {
public ButtonPartyToggle(PlayerProfile PP) {
super("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString(), "Toggle the Party HUD!");
}
public void updateText(PlayerProfile PP) {
super.updateText("Party HUD: ", ((Boolean) PP.getPartyHUD()).toString());
}
}

View File

@ -0,0 +1,19 @@
package com.gmail.nossr50.datatypes.buttons;
import org.getspout.spoutapi.gui.GenericButton;
public class ButtonToggle extends GenericButton{
public ButtonToggle(String text1, String text2, String tooltip) {
this.setText(text1 + text2);
this.setTooltip(tooltip);
this.setWidth(120);
this.setHeight(20);
this.setDirty(true);
}
public void updateText(String text1, String text2) {
this.setText(text1 + text2);
this.setDirty(true);
}
}