diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-05-19 01:15:47 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-05-19 01:15:47 -0400 |
commit | 7c106e7dda744e7d3782737262601de693db0dca (patch) | |
tree | fccec4b5825bb63e2d1195dce431f063ac87f5cb /src/main | |
parent | fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79 (diff) | |
download | NPEhero-7c106e7dda744e7d3782737262601de693db0dca.tar.gz NPEhero-7c106e7dda744e7d3782737262601de693db0dca.tar.bz2 NPEhero-7c106e7dda744e7d3782737262601de693db0dca.zip |
- overhaul css (not done)
- rewrite driver
- add difficulty buttons
- remove placeholders (not done)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/Level.java | 20 | ||||
-rw-r--r-- | src/main/LevelController.java | 39 |
2 files changed, 50 insertions, 9 deletions
diff --git a/src/main/Level.java b/src/main/Level.java index 52047fd..71560d2 100644 --- a/src/main/Level.java +++ b/src/main/Level.java @@ -8,18 +8,22 @@ import javafx.scene.paint.Color; public class Level { - private Color[] colors; - private Image background; - private Image preview; - private String text; - private String desc; - //private ArrayList<String>(); + public Image preview; + public String title; + public String aritst; + public String desc; + public ArrayList<String> diffList = new ArrayList<String>(); + + public Image background; + public Color[] colors; - //google "varargs" to see how this works public void setColors(Color... newColors) { colors = newColors; } - //INCOMPLETE + public String toString() + { + return title+" - "+aritst; + } } diff --git a/src/main/LevelController.java b/src/main/LevelController.java index daf7ae3..6dec953 100644 --- a/src/main/LevelController.java +++ b/src/main/LevelController.java @@ -1 +1,38 @@ -//coming soon
\ No newline at end of file +package main; + +import java.util.ArrayList; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.scene.paint.Color; + +public class LevelController +{ + public static ObservableList<Level> levelList = FXCollections.observableArrayList(); + + public LevelController() + { + Level testLevel = new Level(); + testLevel.title = "test level class"; + testLevel.desc = "this level is being used to test the LevelController class"; + testLevel.aritst = "testArtist"; + testLevel.setColors(Color.RED, Color.BLUE, Color.GREEN, Color.ORANGE, Color.PURPLE); + testLevel.diffList.add("Hello"); + testLevel.diffList.add("Easy"); + testLevel.diffList.add("Med"); + levelList.add(testLevel); + + Level testLevel2 = new Level(); + testLevel2.title = "another one"; + testLevel2.desc = "it can say something else too"; + testLevel2.aritst = "testArtist2"; + testLevel2.setColors(Color.RED, Color.BLUE, Color.GREEN, Color.ORANGE, Color.PURPLE); + testLevel2.diffList.add("Hard"); + testLevel2.diffList.add("Easy"); + testLevel2.diffList.add("Med"); + testLevel2.diffList.add("insane+++"); + levelList.add(testLevel2); + + } + +}
\ No newline at end of file |