Skip to content
Snippets Groups Projects
Commit 1b95956d authored by keyno10's avatar keyno10
Browse files

Abilities list titles & structure added

parent e162c67a
No related branches found
No related tags found
No related merge requests found
......@@ -46,4 +46,17 @@ public class Abilities {
public int getWisdomAbility(int selector) {
return wisdomAbilities[selector];
}
/**
* Set value of given numbered ability
*/
public void setWarAbility(int selector, int value) {
warAbilities[selector] = value;
}
public void setLifeAbility(int selector, int value) {
lifeAbilities[selector] = value;
}
public void setWisdomAbility(int selector, int value) {
wisdomAbilities[selector] = value;
}
}
package UI;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
public class AbilitiesList extends ScrollPane {
private final Sheet sheet;
private final HBox container;
public AbilitiesList() {
public AbilitiesList(Sheet sheet) {
//Set sheet
this.sheet = sheet;
//Set HBox into scroll pane to hold Names & values
container = new HBox();
this.getChildren().add(container);
}
/**
* Set title into list
*/
private void addTitle(String title) {
StackPane pane = new StackPane();
container.getChildren().add(pane);
Text text = new Text(title);
pane.getChildren().add(text);
}
}
......@@ -14,8 +14,10 @@ public class Sheet extends BorderPane {
header.getChildren().add(new AttributeHeader());
header.getChildren().add(new MoteDisplay());
this.setTop(header);
this.setBottom(new HealthBar(this));
this.setRight(blankInteract);
this.setLeft(new AbilitiesList(this));
this.setBottom(new HealthBar(this));
}
public void returnToNeutral() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment