diff --git a/DrivenByMoss-Manual.pdf b/DrivenByMoss-Manual.pdf index 54d5ddb23..78264225c 100644 Binary files a/DrivenByMoss-Manual.pdf and b/DrivenByMoss-Manual.pdf differ diff --git a/src/main/java/de/mossgrabers/controller/akai/fire/view/Drum4View.java b/src/main/java/de/mossgrabers/controller/akai/fire/view/Drum4View.java index 4ddd3f36f..412364c5f 100644 --- a/src/main/java/de/mossgrabers/controller/akai/fire/view/Drum4View.java +++ b/src/main/java/de/mossgrabers/controller/akai/fire/view/Drum4View.java @@ -19,6 +19,7 @@ import de.mossgrabers.framework.featuregroup.ModeManager; import de.mossgrabers.framework.mode.Modes; import de.mossgrabers.framework.utils.ButtonEvent; +import de.mossgrabers.framework.utils.StringUtils; import de.mossgrabers.framework.view.sequencer.AbstractDrum4View; import java.util.Optional; @@ -268,9 +269,13 @@ private void adjustPage (final boolean isUp, final int selection) private void selectDrumPad (final int index) { - this.primary.getDrumPadBank ().getItem (index).select (); + final IDrumPad item = this.primary.getDrumPadBank ().getItem (index); + item.select (); final IMode activeMode = this.surface.getModeManager ().getActive (); if (activeMode instanceof final FireLayerMode fireLayerMode) fireLayerMode.parametersAdjusted (); + + if (item.doesExist ()) + this.surface.getDisplay ().notify (StringUtils.limit (item.getName (), 14)); } } \ No newline at end of file diff --git a/src/main/java/de/mossgrabers/framework/utils/StringUtils.java b/src/main/java/de/mossgrabers/framework/utils/StringUtils.java index 05fb8aebb..8e63ff4ed 100755 --- a/src/main/java/de/mossgrabers/framework/utils/StringUtils.java +++ b/src/main/java/de/mossgrabers/framework/utils/StringUtils.java @@ -241,6 +241,21 @@ public static String optimizeName (final String text, final int length) } + /** + * Limits a text to the given length. + * + * @param text The text to limit + * @param length The length to limit to + * @return The limited text + */ + public static String limit (final String text, final int length) + { + if (text == null) + return ""; + return text.length () <= length ? text : text.substring (0, length); + } + + /** * Convert the bytes to a hex string. * diff --git a/src/main/resources/Documentation/DrivenByMoss-Manual.pdf b/src/main/resources/Documentation/DrivenByMoss-Manual.pdf index 54d5ddb23..78264225c 100644 Binary files a/src/main/resources/Documentation/DrivenByMoss-Manual.pdf and b/src/main/resources/Documentation/DrivenByMoss-Manual.pdf differ