Updated dep versions and added simple mvn run cmd
This commit is contained in:
parent
980e40af65
commit
ba99c5bdb6
27 changed files with 354 additions and 141 deletions
|
|
@ -68,14 +68,12 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
|
||||
private static final int VIEW_SLEEP_TIME = 1234;
|
||||
|
||||
private ImGuiSetup imguiSetup = new ImGuiSetup();
|
||||
|
||||
@Override
|
||||
public void stop(final BundleContext context) {
|
||||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
imguiSetup.dispose();
|
||||
ImGuiSetup.INSTANCE.dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -205,7 +203,7 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
imguiSetup.init(fonts, v -> bootScreen.bootLine(v));
|
||||
ImGuiSetup.INSTANCE.init(fonts, v -> bootScreen.bootLine(v));
|
||||
imLoaded.set(true);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -48,9 +48,11 @@ import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAu
|
|||
* Create and shutdown of ImGui and font activations.
|
||||
*/
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class ImGuiSetup {
|
||||
public final static ImGuiImplGlfw imGuiImp = new ImGuiImplGlfw();
|
||||
public final static ImGuiImplGl3 imGuiGlImp = new ImGuiImplGl3();
|
||||
public enum ImGuiSetup {
|
||||
INSTANCE,
|
||||
;
|
||||
public final ImGuiImplGlfw imGuiImp = new ImGuiImplGlfw();
|
||||
public final ImGuiImplGl3 imGuiGlImp = new ImGuiImplGl3();
|
||||
|
||||
public void init(List<File> fonts, Consumer<String> logger) {
|
||||
long windowHandleᕯ = -1;
|
||||
|
|
@ -61,6 +63,7 @@ public class ImGuiSetup {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
ImGui.createContext();
|
||||
//ImGui.getIO().getFonts().setFreeTypeRenderer(false);
|
||||
initFonts(ImGui.getIO(), fonts, logger);
|
||||
imGuiImp.init(windowHandleᕯ, true);
|
||||
imGuiGlImp.init("#version 140");
|
||||
|
|
@ -86,13 +89,11 @@ public class ImGuiSetup {
|
|||
final short[] glyphRanges = fontBuilder.buildRanges();
|
||||
|
||||
float fontSize = ImCharacter.HEIGHT;
|
||||
boolean first = true;
|
||||
for (File font: fonts) {
|
||||
logger.accept("Load font: "+font);
|
||||
for (File font : fonts) {
|
||||
logger.accept("Load font: " + font.getName());
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.absolute(font.getAbsolutePath()).readBytes(), fontSize, fontConfig, glyphRanges);
|
||||
if (first) {
|
||||
if (!fontConfig.getMergeMode()) {
|
||||
fontConfig.setMergeMode(true);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
fontConfig.destroy();
|
||||
|
|
@ -109,6 +110,8 @@ public class ImGuiSetup {
|
|||
public void dispose() {
|
||||
imGuiImp.dispose();
|
||||
imGuiGlImp.dispose();
|
||||
//imGuiImp.shutdown();
|
||||
//imGuiGlImp.shutdown();
|
||||
ImGui.destroyContext();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ public class VrGem4Unicode4DServiceImpl implements VrGem4Unicode4DService {
|
|||
FontAtlas masterFontAtlas = new FontAtlas();
|
||||
List<File> glyps = warpShip.searchMagic(context, "application/x-font-ttf4d");
|
||||
try {
|
||||
for (File glypSet:glyps) {
|
||||
log.accept("Loading glypSet: "+glypSet);
|
||||
for (File glypSet : glyps) {
|
||||
log.accept("Loading glypSet: " + glypSet.getName());
|
||||
FontAtlas atlas = FontAtlasDriver.newInstance().createReader().readFile(glypSet);
|
||||
masterFontAtlas.setStores(atlas.getStores());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,8 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
@Override
|
||||
public final void render(float delta) {
|
||||
ScreenUtils.clear(0f, 0f, 0f, 1f, true);
|
||||
ImGuiSetup.imGuiImp.newFrame();
|
||||
//ImGuiSetup.imGuiGlImp.newFrame();
|
||||
ImGuiSetup.INSTANCE.imGuiImp.newFrame();
|
||||
ImGui.newFrame();
|
||||
|
||||
DeskTopScreen appScreen = this;
|
||||
|
|
@ -184,7 +185,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
renderDesktop(delta, modelBatch, cam, modelInstances);
|
||||
|
||||
ImGui.render();
|
||||
ImGuiSetup.imGuiGlImp.renderDrawData(ImGui.getDrawData());
|
||||
ImGuiSetup.INSTANCE.imGuiGlImp.renderDrawData(ImGui.getDrawData());
|
||||
}
|
||||
|
||||
protected void renderDesktop(float delta, ModelBatch modelBatch, PerspectiveCamera cam, Array<ModelInstance> modelInstances) {
|
||||
|
|
|
|||
|
|
@ -121,6 +121,18 @@ public class DeskAppInputProcessor implements InputProcessor {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchCancelled(int screenX, int screenY, int pointer, int button) {
|
||||
if (isFilterMenu(screenY)) {
|
||||
return false;
|
||||
}
|
||||
if (filtering) {
|
||||
return false;
|
||||
} else {
|
||||
return input.touchCancelled(screenX, screenY, pointer, button);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseMoved(int screenX, int screenY) {
|
||||
if (isFilterMenu(screenY)) {
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.slf4j.impl;
|
||||
|
||||
public class MyClass {
|
||||
|
||||
public static void fakeDepToBootSLF4J(String out) {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue