-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can now actually edit the entire entry instead of the value (oops) Testing required entries for newly created items, should require less reference to game files after completion.
- Loading branch information
Showing
13 changed files
with
111 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package StellarisDK.FileClasses; | ||
|
||
import StellarisDK.GUI.AgendaUI; | ||
import javafx.scene.control.TreeItem; | ||
|
||
public class Agenda extends GenericData { | ||
|
||
private String[] requiredSet = {"weight_modifier", "modifier"}; | ||
|
||
public Agenda() { | ||
super(); | ||
this.type = "agenda"; | ||
ui = new AgendaUI(this); | ||
} | ||
|
||
public Agenda(String input, String type) { | ||
super(input, type); | ||
ui = new AgendaUI(this); | ||
} | ||
|
||
@Override | ||
public TreeItem getRequiredTreeSet(){ | ||
TreeItem root = new TreeItem<>("agenda"); | ||
for(String set : requiredSet){ | ||
root.getChildren().addAll(new TreeItem<>(set)); | ||
} | ||
return root; | ||
} | ||
|
||
@Override | ||
public GenericData createNew() { | ||
return new Agenda(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package StellarisDK.GUI; | ||
|
||
import StellarisDK.FileClasses.Agenda; | ||
import StellarisDK.FileClasses.Helper.DataCell; | ||
|
||
public class AgendaUI extends AbstractUI { | ||
|
||
public AgendaUI(Agenda obj) { | ||
init("FXML/agendaFX.fxml"); | ||
window.setText("Agenda Editor"); | ||
this.obj = obj; | ||
} | ||
|
||
@Override | ||
public void load() { | ||
treeView.setEditable(true); | ||
treeView.setCellFactory(param -> new DataCell()); | ||
if(obj.getSize() != 0){ | ||
treeView.setRoot(obj.toTreeItem()); | ||
}else{ | ||
treeView.setRoot(obj.getRequiredTreeSet()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters