Skip to content

Commit 9b0a5ce

Browse files
committed
Replace SimpleColorPicker with LuxColorPicker
1 parent f296a23 commit 9b0a5ce

File tree

14 files changed

+32
-521
lines changed

14 files changed

+32
-521
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ subprojects {
3636
configurations {
3737
jsonlib
3838
nbtlib
39+
cplib
3940
}
4041

4142
dependencies {
4243
compile configurations.jsonlib
4344
jsonlib 'se.llbit:jo-json:1.3.1'
4445
nbtlib 'se.llbit:jo-nbt:1.2.0'
46+
cplib 'se.llbit:luxcp:1.0'
4547
}
4648

4749
// Code coverage with Jacoco:

chunky/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ archivesBaseName = 'chunky-core'
88
dependencies {
99
compile 'org.apache.commons:commons-math3:3.2'
1010
compile configurations.nbtlib
11+
compile configurations.cplib
1112
compile project(':lib')
1213

1314
testCompile 'com.google.truth:truth:0.30'
1415
testCompile 'junit:junit:4.12'
1516
}
1617

1718
jar {
18-
// Include classes from the common library.
19+
// Include all dependencies in the Jar.
1920
from project(':lib').configurations.archives.allArtifacts.files.collect {
2021
zipTree(it)
2122
}
@@ -25,6 +26,9 @@ jar {
2526
from configurations.nbtlib.files.collect {
2627
zipTree(it)
2728
}
29+
from configurations.cplib.files.collect {
30+
zipTree(it)
31+
}
2832
manifest {
2933
attributes('Main-Class': mainClassName)
3034
}
@@ -136,10 +140,11 @@ project.afterEvaluate {
136140
def installers = project.tasks.install.repositories
137141
def deployers = project.tasks.uploadArchives.repositories
138142
installers.plus(deployers)*.pom*.whenConfigured {pom ->
139-
// Exclude the :lib and jo-json dependencies because they are embedded in the built Jar.
143+
// Exclude the dependencies that are embedded in the Jar.
140144
pom.dependencies.removeAll { it.groupId == 'se.llbit' && it.artifactId == 'lib' }
141145
pom.dependencies.removeAll { it.groupId == 'se.llbit' && it.artifactId == 'jo-json' }
142146
pom.dependencies.removeAll { it.groupId == 'se.llbit' && it.artifactId == 'jo-nbt' }
147+
pom.dependencies.removeAll { it.groupId == 'se.llbit' && it.artifactId == 'luxcp' }
143148

144149
// Change POM version to -SNAPSHOT for intermediate builds.
145150
if (project.version =~ /\d+\.\d+(\.\d+)?-.+/) {

chunky/src/java/se/llbit/chunky/ui/ChunkyFxController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
import se.llbit.chunky.world.Icon;
6565
import se.llbit.chunky.world.World;
6666
import se.llbit.chunky.world.listeners.ChunkUpdateListener;
67+
import se.llbit.fx.LuxColorPalette;
68+
import se.llbit.fx.LuxColorPicker;
6769
import se.llbit.fxutil.GroupedChangeListener;
6870
import se.llbit.log.Level;
6971
import se.llbit.log.Log;
@@ -139,7 +141,7 @@ public class ChunkyFxController
139141

140142
@FXML private ChoiceBox<Block> highlightCb;
141143

142-
@FXML private SimpleColorPicker highlightColor;
144+
@FXML private LuxColorPicker highlightColor;
143145

144146
@FXML private Button editResourcePacks;
145147

chunky/src/java/se/llbit/chunky/ui/GradientEditor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import javafx.scene.paint.Color;
3636
import se.llbit.chunky.renderer.scene.Sky;
3737
import se.llbit.chunky.ui.render.SkyTab;
38+
import se.llbit.fx.LuxColorPicker;
3839
import se.llbit.json.JsonParser;
3940
import se.llbit.math.ColorUtil;
4041
import se.llbit.math.Constants;
@@ -76,7 +77,7 @@ public class GradientEditor extends VBox implements Initializable {
7677
@FXML private Button importBtn;
7778
@FXML private Button exportBtn;
7879
@FXML private Canvas canvas;
79-
@FXML private SimpleColorPicker colorPicker;
80+
@FXML private LuxColorPicker colorPicker;
8081

8182
private List<Vector4> gradient;
8283
int selected = 0;

0 commit comments

Comments
 (0)