aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2021-10-03 22:45:58 +0900
committersyeyoung <cyoung06@naver.com>2021-10-03 22:45:58 +0900
commitcb01114ea4427f764efbd58103a96643220491a2 (patch)
tree33ac3fc77b5756b6f15ea830932c78d32ca2b5ec /src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java
parent2a60380de52cce7a895e8200751e8e854178796a (diff)
downloadSkyblock-Dungeons-Guide-cb01114ea4427f764efbd58103a96643220491a2.tar.gz
Skyblock-Dungeons-Guide-cb01114ea4427f764efbd58103a96643220491a2.tar.bz2
Skyblock-Dungeons-Guide-cb01114ea4427f764efbd58103a96643220491a2.zip
- Keybinds to dg settings
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java
index b4b2a8e8..8ed0e028 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameterEdit.java
@@ -89,7 +89,14 @@ public class MParameterEdit extends MPanel {
((MToggleButton)valueEdit).setOnToggle(() -> {
parameter.setValue(((MToggleButton) valueEdit).isEnabled());
});
- } else {
+ } else if (parameter.getValue_type().equals("keybind")) {
+ valueEdit = new MKeyEditButton();
+ ((MKeyEditButton)valueEdit).setKey((Integer) parameter.getValue());
+ ((MKeyEditButton)valueEdit).setOnKeyEdit(() -> {
+ parameter.setValue(((MKeyEditButton) valueEdit).getKey());
+ });
+ ((MKeyEditButton)valueEdit).setBorder(RenderUtils.blendTwoColors(0xFF141414,0x7702EE67));
+ }else {
valueEdit = new MLabel();
((MLabel)valueEdit).setText("????");
}
@@ -108,10 +115,11 @@ public class MParameterEdit extends MPanel {
add(valueEditHolder);
valueEditHolder.add(valueEdit);
}
- public MParameterEdit(AbstractFeature abstractFeature, FeatureParameter parameter, RootConfigPanel rootConfigPanel, MPanel valueEdit) {
+ public MParameterEdit(AbstractFeature abstractFeature, FeatureParameter parameter, RootConfigPanel rootConfigPanel, MPanel valueEdit, Predicate<FeatureParameter> isDisabled) {
this.abstractFeature = abstractFeature;
this.featureParameter = parameter;
this.rootConfigPanel = rootConfigPanel;
+ this.isDisabled = isDisabled;
valueEditHolder = new MPanel() {