Fixed hardcoded child frame height + no mouse

This commit is contained in:
Willem Cazander 2022-03-26 13:43:24 +01:00
parent 30a4d6919d
commit 909b39f519
4 changed files with 13 additions and 10 deletions

View file

@ -15,6 +15,7 @@ import imgui.flag.ImGuiBackendFlags;
import imgui.gl3.ImGuiImplGl3;
import imgui.glfw.ImGuiImplGlfw;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.unicode4d.draw.ImCharacter;
/**
* Create and shutdown of ImGui and font activations.
@ -57,10 +58,11 @@ public class ImGuiSetup {
addRangeUnicodePlane0(fontBuilder);
final short[] glyphRanges = fontBuilder.buildRanges();
float fontSize = ImCharacter.HEIGHT;
boolean first = true;
for (File font: fonts) {
logger.accept("Load font: "+font);
io.getFonts().addFontFromMemoryTTF(Gdx.files.absolute(font.getAbsolutePath()).readBytes(), 22, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.absolute(font.getAbsolutePath()).readBytes(), fontSize, fontConfig, glyphRanges);
if (first) {
fontConfig.setMergeMode(true);
first = false;

View file

@ -3,6 +3,7 @@ package love.distributedrebirth.gdxapp4d.vrgem4.view;
import com.badlogic.gdx.InputProcessor;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.unicode4d.draw.ImCharacter;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class DeskAppInputProcessor implements InputProcessor {
@ -23,8 +24,8 @@ public class DeskAppInputProcessor implements InputProcessor {
}
private boolean isFilterMenu(int screenY) {
// font22 + margin top-bottom = 26px
if (screenY <= 26) {
// font + margin top-bottom = 4px
if (screenY <= ImCharacter.HEIGHT+4) {
return true;
}
return false;