diff --git a/core/src/love/distributedrebirth/demo4d/ImGuiSetup.java b/core/src/love/distributedrebirth/demo4d/ImGuiSetup.java index 00a8587b..fa04050b 100644 --- a/core/src/love/distributedrebirth/demo4d/ImGuiSetup.java +++ b/core/src/love/distributedrebirth/demo4d/ImGuiSetup.java @@ -43,9 +43,9 @@ public class ImGuiSetup { } private static void initFonts(final ImGuiIO io) { - io.getFonts().addFontDefault(); // Add default font for latin glyphs + io.getFonts().addFontDefault(); - final ImFontGlyphRangesBuilder rangesBuilder = new ImFontGlyphRangesBuilder(); // Glyphs ranges provide + ImFontGlyphRangesBuilder rangesBuilder = new ImFontGlyphRangesBuilder(); rangesBuilder.addRanges(io.getFonts().getGlyphRangesDefault()); rangesBuilder.addRanges(io.getFonts().getGlyphRangesCyrillic()); rangesBuilder.addRanges(io.getFonts().getGlyphRangesJapanese()); @@ -68,8 +68,8 @@ public class ImGuiSetup { } } - final ImFontConfig fontConfig = new ImFontConfig(); - fontConfig.setMergeMode(true); // Enable merge mode to merge cyrillic, japanese and icons with default font + ImFontConfig fontConfig = new ImFontConfig(); + fontConfig.setMergeMode(true); final short[] glyphRanges = rangesBuilder.buildRanges(); io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/NotoSansCJKjp-Medium.otf").readBytes(), 14, fontConfig, glyphRanges); diff --git a/core/src/love/distributedrebirth/demo4d/music/MusicPlayerRenderer.java b/core/src/love/distributedrebirth/demo4d/music/MusicPlayerRenderer.java index 7e1c3e5b..2644250d 100644 --- a/core/src/love/distributedrebirth/demo4d/music/MusicPlayerRenderer.java +++ b/core/src/love/distributedrebirth/demo4d/music/MusicPlayerRenderer.java @@ -46,8 +46,12 @@ public class MusicPlayerRenderer extends ImGuiRendererMain { ImGui.text(currentSong.getName()); } ImGui.separator(); - if (ImGui.button("Play")) { - main.music.play(currentSong); + if (currentSong != null) { + if (ImGui.button("Play")) { + main.music.play(currentSong); + } + } else { + ImGui.text("Play"); } ImGui.sameLine(); if (ImGui.button("<")) {