Skip to content

Commit

Permalink
polish species gui enough for an alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
parzivail committed Feb 15, 2021
1 parent 56b987e commit 9d4132b
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ protected void init()
if (playerSpecies != null)
this.gender = playerSpecies.getGender();

this.addButton(new ButtonWidget(this.width / 2 + 5, this.height - 26, 95, 20, ScreenTexts.DONE, (button) -> {
this.client.openScreen(this.parent);
}));

speciesVariableListWidget = new SimpleListWidget<>(client, width / 2 + 128, height / 2 - 91, 80, 182, 15, entry -> {
updateAbility();
});
Expand All @@ -114,11 +110,6 @@ protected void init()
this.children.add(speciesVariableListWidget);
this.children.add(speciesListWidget);

this.addButton(new EventCheckboxWidget(50, 230, 20, 20, new TranslatableText("gui.pswg.use_female_model"), false, (checked) -> {
gender = checked ? SpeciesGender.FEMALE : SpeciesGender.MALE;
this.playerSpecies.setGender(gender);
}));

this.addButton(new ButtonWidget(this.width / 2 - 120, this.height / 2 - 10, 20, 20, new LiteralText("<"), (button) -> {
moveToNextVariableOption(true);
}));
Expand All @@ -127,7 +118,11 @@ protected void init()
moveToNextVariableOption(false);
}));

this.addButton(new ButtonWidget(this.width / 2 - 100, this.height - 26, 95, 20, new TranslatableText("gui.pswg.apply"), (button) -> {
this.addButton(new ButtonWidget(this.width / 2 - 100 - 75, this.height - 26, 95, 20, ScreenTexts.BACK, (button) -> {
this.client.openScreen(this.parent);
}));

this.addButton(new ButtonWidget(this.width / 2 - 60, this.height - 26, 120, 20, new TranslatableText("gui.pswg.apply"), (button) -> {
if (speciesListWidget.getSelected() == null)
return;

Expand Down Expand Up @@ -155,6 +150,11 @@ protected void init()
ClientPlayNetworking.send(SwgPackets.C2S.PacketSetOwnSpecies, passedData);
}));

this.addButton(new EventCheckboxWidget(this.width / 2 + 105 - 25, this.height - 26, 20, 20, new TranslatableText("gui.pswg.use_female_model"), this.gender == SpeciesGender.FEMALE, (checked) -> {
gender = checked ? SpeciesGender.FEMALE : SpeciesGender.MALE;
this.playerSpecies.setGender(gender);
}));

speciesListWidget.setEntries(availableSpecies);
speciesListWidget.setSelected(speciesListWidget.getEntries().get(1));
}
Expand Down

0 comments on commit 9d4132b

Please sign in to comment.