Moved two apps to seperate bundle and chains.
This commit is contained in:
parent
812e80fa5e
commit
c47d626eef
57 changed files with 1011 additions and 305 deletions
|
|
@ -12,7 +12,6 @@
|
|||
<groupId>love.distributedrebirth.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d-tos4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
@ -25,9 +24,7 @@
|
|||
<exportScr>true</exportScr>
|
||||
<instructions>
|
||||
<_donotcopy>(.git)</_donotcopy>
|
||||
<!-- Enable processing of OSGI DS component annotations -->
|
||||
<_dsannotations>*</_dsannotations>
|
||||
<!-- Enable processing of OSGI metatype annotations -->
|
||||
<_metatypeannotations>*</_metatypeannotations>
|
||||
<Import-Package>
|
||||
org.osgi.framework,
|
||||
|
|
@ -109,7 +106,10 @@
|
|||
love.distributedrebirth.unicode4d,
|
||||
love.distributedrebirth.unicode4d.atlas
|
||||
</Import-Package>
|
||||
<Export-Package>love.distributedrebirth.gdxapp4d.vrgem4.service</Export-Package>
|
||||
<Export-Package>
|
||||
love.distributedrebirth.gdxapp4d.vrgem4.service,
|
||||
love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp
|
||||
</Export-Package>
|
||||
<Private-Package>love.distributedrebirth.gdxapp4d.vrgem4.*</Private-Package>
|
||||
<!--
|
||||
<Embed-Dependency>*;artifactId=gdx;inline=true,*;artifactId=gdx-nativefilechooser;inline=true</Embed-Dependency>
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
|
||||
public final class GDXAppLauncher {
|
||||
|
||||
private final String name;
|
||||
private final Supplier<DefaultDeskApp> launcher;
|
||||
|
||||
public GDXAppLauncher(String name, Supplier<DefaultDeskApp> launcher) {
|
||||
this.name = name;
|
||||
this.launcher = launcher;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Supplier<DefaultDeskApp> getLauncher() {
|
||||
return launcher;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
|
||||
|
|
@ -9,7 +7,6 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicManager;
|
||||
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
|
|
@ -20,7 +17,7 @@ public enum GDXAppVrGem4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppVrGem4,GDX
|
|||
INSTANCE;
|
||||
|
||||
public SystemGdxTerminal terminal;
|
||||
public MusicManager music;
|
||||
//public MusicManager music;
|
||||
//public FontAtlas basePlane;
|
||||
private final BãßBȍőnCoffinOpenʸᴰ<GDXAppVrGem4Keyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
|
||||
public BãßBȍőnCoffinʸᴰ<GDXAppVrGem4Keyʸᴰ> GET_BBC() { return BBC; }
|
||||
|
|
@ -31,8 +28,8 @@ public enum GDXAppVrGem4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppVrGem4,GDX
|
|||
}
|
||||
|
||||
public void init(SystemGdxTerminal terminal) {
|
||||
music = new MusicManager();
|
||||
music.init(false);
|
||||
//music = new MusicManager();
|
||||
//music.init(false);
|
||||
|
||||
this.terminal = terminal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
|
@ -9,10 +12,14 @@ import com.badlogic.gdx.Gdx;
|
|||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumBaseᴶᴹˣ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4Activator.SystemWarpBaseImpl;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootFactory;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxFont;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBase;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpSea;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2;
|
||||
|
|
@ -20,10 +27,12 @@ import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop3;
|
|||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenIntroMission;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.Base2Terminator;
|
||||
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
|
||||
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
|
||||
import love.distributedrebirth.warpme.sea.WaterSeaMagic;
|
||||
import love.distributedrebirth.warpme.ship.WaterShipOcean;
|
||||
|
||||
public class GDXAppVrGem4Activator implements BundleActivator {
|
||||
|
|
@ -64,7 +73,7 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
bootScreen.bootLine(" ©Δ∞ 仙上主天 ");
|
||||
bootScreen.bootLine("בְּרֵאשִׁית :o: יְסוֺד :o: יִשְׂרָאֵל");
|
||||
bootScreen.bootLine("==========================");
|
||||
bootScreen.bootLine("vrGEM4 Booting...");
|
||||
bootScreen.bootLine("Boot: vrGEM⁴ - TOS⁴ - MSX⁴");
|
||||
|
||||
// ref to init
|
||||
for (DefaultEnumBaseᴶᴹˣ<?,?> coffin:coffinInstances()) {
|
||||
|
|
@ -132,17 +141,21 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
}
|
||||
*/
|
||||
|
||||
bootScreen.bootLine("vrGEM4: init");
|
||||
bootScreen.bootLine("vrGEM⁴: init");
|
||||
GDXAppVrGem4.INSTANCE.init(terminal);
|
||||
|
||||
|
||||
VrGem4DeskAppService deskAppService = new VrGem4DeskAppServiceImpl();
|
||||
context.registerService(VrGem4DeskAppService.class.getName(), deskAppService, new Hashtable<String, String>());
|
||||
|
||||
bootScreen.bootLine("terminal: added screens");
|
||||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
terminal.registrateScreen(new ScreenDesktop1(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop2(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop3(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop4(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop1(bootArgs, deskAppService));
|
||||
terminal.registrateScreen(new ScreenDesktop2(bootArgs, deskAppService));
|
||||
terminal.registrateScreen(new ScreenDesktop3(bootArgs, deskAppService));
|
||||
terminal.registrateScreen(new ScreenDesktop4(bootArgs, deskAppService));
|
||||
terminal.registrateScreen(new ScreenCredits());
|
||||
terminal.registrateScreen(new ScreenHelp());
|
||||
terminal.registrateScreen(new ScreenIntroMission());
|
||||
|
|
@ -169,20 +182,47 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
}
|
||||
if (result > 0) {
|
||||
bootScreen.bootLine("vrGEM4: FAILURE BOOT ABORTED");
|
||||
} else {
|
||||
bootScreen.bootLine("vrGEM4: chains resolved.");
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
terminal.selectScreen(ScreenDesktop1.class);
|
||||
terminal.disposeScreen(bootScreen);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
bootScreen.bootLine("vrGEM4: chains resolved.");
|
||||
|
||||
try {
|
||||
ServiceReference<?>[] refs = context.getServiceReferences( SystemWarpSea.class.getName(), "(warp.sea.name=*)" );
|
||||
for (int i=0;i<refs.length;i++) {
|
||||
SystemWarpSea service = (SystemWarpSea) context.getService( refs[i] );
|
||||
String key = service.getWarpKey();
|
||||
File waterHome = service.getWarpHome();
|
||||
for (WaterSeaMagic magic:service.getWarpSea().theWater().getSeaMagics()) {
|
||||
if ("application/vnd.osgi.bundle".equals(magic.getMime())) {
|
||||
magic.setMime("application/vnd.osgi.bundle.loaded"); // TODO: HACK for now to not load again
|
||||
String overrideBundleKey = key + "." + magic.getFile();
|
||||
String overrideBundle = bootArgs.getLocalOverrides().getProperty(overrideBundleKey);
|
||||
if (overrideBundle == null) {
|
||||
SystemGdxBootFactory.installAndStartBundles(context, "reference:file:"+waterHome.getAbsolutePath()+"/"+magic.getFile());
|
||||
} else {
|
||||
SystemGdxBootFactory.installAndStartBundles(context, "reference:file:"+overrideBundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
bootScreen.bootLine("ERROR: "+e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
terminal.selectScreen(ScreenDesktop1.class);
|
||||
terminal.disposeScreen(bootScreen);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//TODO: add layer or ?? private <T extends BãßBȍőnCoffinStoreʸᴰ<?>,DefaultAuthorInfoʸᴰ> T[] storeInstances() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
|
|
@ -7,6 +10,8 @@ import org.osgi.service.component.annotations.Reference;
|
|||
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxLog;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
|
||||
@Component
|
||||
public class TestComponent {
|
||||
|
|
@ -19,7 +24,7 @@ public class TestComponent {
|
|||
|
||||
@Activate
|
||||
void open() {
|
||||
log.info(this, "Activated warpEngine: {}", warpShip.getWarpShip().theShip().getEngine());
|
||||
log.info(this, "Activated22222 warpEngine: {}", warpShip.getWarpShip().theShip().getEngine());
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
|
||||
public class VrGem4DeskAppServiceImpl implements VrGem4DeskAppService {
|
||||
|
||||
private List<DeskAppLauncher> launchers = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public List<DeskAppLauncher> getLaunchers() {
|
||||
return launchers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registrateDeskApp(DeskAppLauncher launcher) {
|
||||
launchers.add(launcher);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DefaultDeskApp implements DeskApp {
|
||||
|
||||
private String title;
|
||||
private String icon;
|
||||
private final DeskAppContour contours;
|
||||
|
||||
public DefaultDeskApp() {
|
||||
this.contours = new DeskAppContour();
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeskAppContour getContours() {
|
||||
return contours;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
|
||||
import imgui.ImGui;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class BasicConsoleApp extends DefaultDeskApp {
|
||||
|
||||
public BasicConsoleApp() {
|
||||
setTitle("Basic Conssole");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.text("10 PRINT \"The BASIC Shahada of DUNE;\"");
|
||||
ImGui.text("20 PRINT \"- THERE IS NO GOD BUT @Ω仙⁴\"");
|
||||
ImGui.text("30 PRINT \"- THERE IS NO RULE BUT CONSENT\"");
|
||||
ImGui.text("40 PRINT \"- THERE IS NO FAILURE BUT DEATH\"");
|
||||
ImGui.text("50 PRINT \"- TERRY A. DAVIS WAS THE PROPHET OF @Ω仙9⁴\"");
|
||||
ImGui.text("60 PRINT \"- TERRY A. DAVIS WAS THE FIRST TRUE MENTAT\"");
|
||||
ImGui.text("70 PRINT \"- TERRY A. DAVIS WAS THE BEST CODER ALIVE\"");
|
||||
ImGui.text("RUN");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.numberxd.Gê̄ldGetậl;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class HebrewWalletApp extends DefaultDeskApp implements DeskAppRenderer {
|
||||
|
||||
public HebrewWalletApp() {
|
||||
setTitle("Hebrew Wallet");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.text("Current amount:");
|
||||
ImGui.sameLine();
|
||||
ImGui.text("0000");
|
||||
ImGui.separator();
|
||||
if (ImGui.button("Pay")) {
|
||||
}
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
||||
ImGui.beginTable("wallet", 4, flags);
|
||||
ImGui.tableSetupColumn("In/Out");
|
||||
ImGui.tableSetupColumn("AmountRaw");
|
||||
ImGui.tableSetupColumn("AmountFix");
|
||||
ImGui.tableSetupColumn("Decimal");
|
||||
ImGui.tableHeadersRow();
|
||||
|
||||
String[] walletData = {
|
||||
"ה","מ","מָ","ח","חֱ","חֱמָא",
|
||||
"א","בד","ב","ד","ץףן",
|
||||
"הזפץ","מספר","צצצצ","ץאאא","דואר"
|
||||
};
|
||||
for (String data:walletData) {
|
||||
Gê̄ldGetậl geld = new Gê̄ldGetậl(data);
|
||||
Gê̄ldGetậl geld2 = geld.toClone(); // unit test
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(data.length()==2||data.length()==3?"OUT":"IN");
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(data);
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(geld2.toHebrewString(true)); // true=reverse for ImGui
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Double.toString(geld.getTotalDecimalValue()));
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiSelectableFlags;
|
||||
import imgui.flag.ImGuiTableColumnFlags;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSong;
|
||||
import net.spookygames.gdx.nativefilechooser.NativeFileChooserCallback;
|
||||
import net.spookygames.gdx.nativefilechooser.NativeFileChooserConfiguration;
|
||||
|
||||
/**
|
||||
* The music player ui.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class MusicPlayerApp extends DefaultDeskApp implements DeskAppRenderer {
|
||||
|
||||
private final NativeFileChooserConfiguration fileChooserConfig;
|
||||
|
||||
public MusicPlayerApp() {
|
||||
setTitle(FontAwesomeIcons.Music + " Music Player");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
getContours().registrateContour(DeskAppContourSection.FILE_NEW, new DeskAppRenderer() {
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
if (ImGui.menuItem(FontAwesomeIcons.Plus + " Add")) {
|
||||
// GDXAppVrGem4.INSTANCE.terminal.getFileChooser().chooseFile(fileChooserConfig,
|
||||
// NativeFileChooserCallbackAdapter.onFileChosen(v -> GDXAppVrGem4.INSTANCE.music.addBackgroundMusic(v)));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
fileChooserConfig = new NativeFileChooserConfiguration();
|
||||
fileChooserConfig.directory = Gdx.files.absolute(System.getProperty("user.home"));
|
||||
fileChooserConfig.mimeFilter = "audio/*";
|
||||
fileChooserConfig.title = "Choose audio file";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.text("Current Song:");
|
||||
MusicSong currentSong = GDXAppVrGem4.INSTANCE.music.getCurrentSong();
|
||||
if (currentSong != null) {
|
||||
ImGui.sameLine();
|
||||
ImGui.text(currentSong.getName());
|
||||
}
|
||||
ImGui.separator();
|
||||
if (currentSong != null) {
|
||||
if (ImGui.button("Play")) {
|
||||
GDXAppVrGem4.INSTANCE.music.play(currentSong);
|
||||
}
|
||||
} else {
|
||||
ImGui.text("Play");
|
||||
}
|
||||
ImGui.sameLine();
|
||||
if (ImGui.button("<")) {
|
||||
GDXAppVrGem4.INSTANCE.music.prev();
|
||||
}
|
||||
ImGui.sameLine();
|
||||
if (ImGui.button(">")) {
|
||||
GDXAppVrGem4.INSTANCE.music.next();
|
||||
}
|
||||
ImGui.sameLine();
|
||||
if (ImGui.button("Stop")) {
|
||||
GDXAppVrGem4.INSTANCE.music.stop();
|
||||
}
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
||||
ImGui.beginTable("playlist", 3, flags);
|
||||
ImGui.tableSetupColumn("#", ImGuiTableColumnFlags.NoHide);
|
||||
ImGui.tableSetupColumn("Play");
|
||||
ImGui.tableSetupColumn("Name");
|
||||
ImGui.tableHeadersRow();
|
||||
int i=1;
|
||||
for (MusicSong song:GDXAppVrGem4.INSTANCE.music.getBackgroundSongs()) {
|
||||
ImGui.pushID(i);
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.selectable(""+i, song.isPlaying(), ImGuiSelectableFlags.None);
|
||||
ImGui.tableNextColumn();
|
||||
if (ImGui.smallButton(">")) {
|
||||
GDXAppVrGem4.INSTANCE.music.play(song);
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.selectable(song.getName(), song.isPlaying(), ImGuiSelectableFlags.None);
|
||||
ImGui.popID();
|
||||
i++;
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
|
||||
static class NativeFileChooserCallbackAdapter implements NativeFileChooserCallback {
|
||||
|
||||
@Override
|
||||
public void onFileChosen(FileHandle file) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancellation() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
}
|
||||
|
||||
static NativeFileChooserCallbackAdapter onFileChosen(Consumer<FileHandle> eater) {
|
||||
return new NativeFileChooserCallbackAdapter() {
|
||||
@Override
|
||||
public void onFileChosen(FileHandle file) {
|
||||
eater.accept(file);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.music;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class M3UParser {
|
||||
|
||||
private static final String M3U_HEADER = "#EXTM3U";
|
||||
|
||||
public class M3UPlaylist {
|
||||
|
||||
private List<M3UTrack> tracks = new ArrayList<>();
|
||||
}
|
||||
|
||||
public class M3UTrack {
|
||||
|
||||
}
|
||||
|
||||
public M3UPlaylist parse(InputStream stream) throws IOException {
|
||||
M3UPlaylist result = new M3UPlaylist();
|
||||
|
||||
BufferedReader buffer = new BufferedReader(new InputStreamReader(stream));
|
||||
String line = buffer.readLine();
|
||||
if (!line.startsWith(M3U_HEADER)) {
|
||||
throw new IOException("Missing header");
|
||||
}
|
||||
|
||||
while ((line = buffer.readLine()) != null) {
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.music;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.audio.Music;
|
||||
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
/**
|
||||
* Manages the background and others songs.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class MusicManager {
|
||||
|
||||
// private final MusicSong introSong;
|
||||
// private final MusicSong creditsSong;
|
||||
private final List<MusicSong> backgroundSongs;
|
||||
private final NextSongListener nextSongListener;
|
||||
private MusicSong currentSong = null;
|
||||
private boolean noMusic = false;
|
||||
|
||||
public MusicManager() {
|
||||
backgroundSongs = new ArrayList<>();
|
||||
// introSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/panoramacircle-waterfowl.mp3")),"panoramacircle-waterfowl");
|
||||
// creditsSong = new MusicSong(Gdx.audio.newMusic(Gdx.files.internal("music/idtech-doom-sigil.mp3")), "idtech-doom-sigil");
|
||||
nextSongListener = new NextSongListener();
|
||||
}
|
||||
|
||||
public void addBackgroundMusic(FileHandle file) {
|
||||
Music music = Gdx.audio.newMusic(file);
|
||||
music.setOnCompletionListener(nextSongListener);
|
||||
backgroundSongs.add(new MusicSong(music, file.name()));
|
||||
}
|
||||
|
||||
public void init(boolean noMusic) {
|
||||
this.noMusic = noMusic;
|
||||
/*
|
||||
addBackgroundMusic(Gdx.files.internal("music/sanctumwave-risen.mp3"));
|
||||
addBackgroundMusic(Gdx.files.internal("music/sanctumwave-devine-intellect.mp3"));
|
||||
addBackgroundMusic(Gdx.files.internal("music/theselfhelpgroup-temple-os.mp3"));
|
||||
addBackgroundMusic(Gdx.files.internal("music/sanctumwave-nightwalk.mp3"));
|
||||
addBackgroundMusic(Gdx.files.internal("music/beeble-i-used-temple-os-to-write.mp3"));
|
||||
addBackgroundMusic(Gdx.files.internal("music/ryanfarran-risen-temple-os.mp3"));
|
||||
*/
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
// introSong.music.dispose();
|
||||
// creditsSong.music.dispose();
|
||||
for (MusicSong song:backgroundSongs) {
|
||||
song.music.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public List<MusicSong> getBackgroundSongs() {
|
||||
return backgroundSongs;
|
||||
}
|
||||
|
||||
public MusicSong getCurrentSong() {
|
||||
return currentSong;
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (currentSong != null) {
|
||||
currentSong.music.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void play(MusicSongType type) {
|
||||
MusicSong nextSong = null;
|
||||
if (MusicSongType.INTRO.equals(type)) {
|
||||
// nextSong = introSong;
|
||||
// play(nextSong);
|
||||
} else if (MusicSongType.CREDITS.equals(type)) {
|
||||
// nextSong = creditsSong;
|
||||
// play(nextSong);
|
||||
} else {
|
||||
int currentBackground = backgroundSongs.indexOf(currentSong);
|
||||
if (currentBackground == -1 && !backgroundSongs.isEmpty()) {
|
||||
nextSong = backgroundSongs.get(0);
|
||||
} else {
|
||||
nextSong = currentSong;
|
||||
}
|
||||
if (!noMusic && nextSong!=null) {
|
||||
play(nextSong);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void play(MusicSong song) {
|
||||
if (song == null) {
|
||||
return;
|
||||
}
|
||||
stop();
|
||||
currentSong = song;
|
||||
currentSong.music.play();
|
||||
}
|
||||
|
||||
class NextSongListener implements OnCompletionListener {
|
||||
|
||||
@Override
|
||||
public void onCompletion(Music music) {
|
||||
next();
|
||||
play(currentSong);
|
||||
}
|
||||
}
|
||||
|
||||
public void next() {
|
||||
int currentBackground = backgroundSongs.indexOf(currentSong);
|
||||
if (currentBackground == -1) {
|
||||
return; // some other
|
||||
}
|
||||
if (currentBackground == backgroundSongs.size()-1) {
|
||||
currentBackground = -1; // loop to start
|
||||
}
|
||||
boolean play = currentSong.music.isPlaying();
|
||||
currentSong.music.stop();
|
||||
currentSong = backgroundSongs.get(currentBackground+1);
|
||||
if (play) {
|
||||
currentSong.music.play();
|
||||
}
|
||||
}
|
||||
|
||||
public void prev() {
|
||||
int currentBackground = backgroundSongs.indexOf(currentSong);
|
||||
if (currentBackground == -1) {
|
||||
return; // some other
|
||||
}
|
||||
if (currentBackground == 0) {
|
||||
currentBackground = backgroundSongs.size(); // loop to end
|
||||
}
|
||||
boolean play = currentSong.music.isPlaying();
|
||||
currentSong.music.stop();
|
||||
currentSong = backgroundSongs.get(currentBackground-1);
|
||||
if (play) {
|
||||
currentSong.music.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.music;
|
||||
|
||||
import com.badlogic.gdx.audio.Music;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
/**
|
||||
* The music with the (file) name.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class MusicSong {
|
||||
protected final Music music;
|
||||
private final String name;
|
||||
|
||||
public MusicSong(Music music, String name) {
|
||||
this.music = music;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
return music.isPlaying();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.music;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
/**
|
||||
* The song types.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public enum MusicSongType {
|
||||
INTRO,
|
||||
CREDITS,
|
||||
BACKGROUND
|
||||
}
|
||||
|
|
@ -19,14 +19,15 @@ import imgui.flag.ImGuiWindowFlags;
|
|||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.ImGuiSetup;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreenListener;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopInputProcessor;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreenMenu;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppController;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppSelectionListener;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppInputProcessor;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreen;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreenMenu;
|
||||
|
||||
public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen {
|
||||
|
||||
|
|
@ -34,18 +35,19 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
protected BitmapFont font;
|
||||
protected OrthographicCamera camera;
|
||||
protected ImBoolean showImGuiDemo = new ImBoolean(false);
|
||||
private DeskTopScreenMenu screenMenu;
|
||||
private final DeskAppScreen deskAppScreen;
|
||||
private final DeskTopScreenMenu screenMenu;
|
||||
private final DeskAppController deskAppScreen;
|
||||
private PerspectiveCamera cam;
|
||||
private FirstPersonCameraController camController;
|
||||
private DeskTopInputProcessor inputFilter;
|
||||
private DeskAppInputProcessor inputFilter;
|
||||
private ModelBatch modelBatch;
|
||||
private Array<ModelInstance> modelInstances = new Array<ModelInstance>();
|
||||
|
||||
public AbstractScreenDesktop(String name, SystemGdxBootArgs bootArgs) {
|
||||
this.create(bootArgs);
|
||||
deskAppScreen = new DeskAppScreen(name);
|
||||
deskAppScreen.addDeskAppListener(new DeskAppScreenListener() {
|
||||
public AbstractScreenDesktop(String name, SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
this.create();
|
||||
screenMenu = new DeskTopScreenMenu(bootArgs, deskAppService);
|
||||
deskAppScreen = new DeskAppController(name);
|
||||
deskAppScreen.addDeskAppListener(new DeskAppSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void selectDeskApp(DeskApp deskApp) {
|
||||
|
|
@ -59,10 +61,9 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
}
|
||||
|
||||
protected void createModel(ModelBuilder modelBuilder, Array<ModelInstance> modelInstances) {
|
||||
|
||||
}
|
||||
|
||||
private void create(SystemGdxBootArgs bootArgs) {
|
||||
private void create() {
|
||||
batch = new SpriteBatch();
|
||||
font = new BitmapFont();
|
||||
camera = new OrthographicCamera();
|
||||
|
|
@ -71,8 +72,6 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
camera.update();
|
||||
batch.setProjectionMatrix(camera.combined);
|
||||
|
||||
screenMenu = new DeskTopScreenMenu(bootArgs);
|
||||
|
||||
modelBatch = new ModelBatch();
|
||||
|
||||
cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||
|
|
@ -88,7 +87,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
camController = new FirstPersonCameraController(cam);
|
||||
//camController = new CameraInputController(cam);
|
||||
|
||||
inputFilter = new DeskTopInputProcessor(camController);
|
||||
inputFilter = new DeskAppInputProcessor(camController);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -131,13 +130,13 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
if (showImGuiDemo.get()) {
|
||||
ImGui.showDemoWindow(showImGuiDemo);
|
||||
}
|
||||
if (appScreen != null && appScreen.getDeskAppScreen().getCurrentDeskApp() != null) {
|
||||
if (appScreen != null && appScreen.getDeskAppController().getCurrentDeskApp() != null) {
|
||||
int sizeFlags = ImGuiCond.Always;
|
||||
ImGui.setNextWindowPos(0, 28, sizeFlags);
|
||||
ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags);
|
||||
int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar;
|
||||
if (ImGui.begin(appScreen.getDeskAppScreen().getCurrentDeskApp().getTitle(), windowFlags)) {
|
||||
DeskAppRenderer renderer = appScreen.getDeskAppScreen().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN);
|
||||
if (ImGui.begin(appScreen.getDeskAppController().getCurrentDeskApp().getContours().getTitle(), windowFlags)) {
|
||||
DeskAppRenderer renderer = appScreen.getDeskAppController().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN);
|
||||
if (renderer != null) {
|
||||
renderer.render();
|
||||
}
|
||||
|
|
@ -163,7 +162,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
}
|
||||
|
||||
@Override
|
||||
public DeskAppScreen getDeskAppScreen() {
|
||||
public DeskAppController getDeskAppController() {
|
||||
return deskAppScreen;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.GDXAppTos4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.badlogic.gdx.Screen;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenCredits extends AbstractScrollScreen {
|
||||
|
|
@ -79,11 +78,11 @@ public class ScreenCredits extends AbstractScrollScreen {
|
|||
|
||||
@Override
|
||||
public void showScroll() {
|
||||
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.CREDITS);
|
||||
//GDXAppVrGem4.INSTANCE.music.play(MusicSongType.CREDITS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideScroll() {
|
||||
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
//GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@ import com.badlogic.gdx.utils.Array;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop1 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop1(SystemGdxBootArgs bootArgs) {
|
||||
super("Desktop1", bootArgs);
|
||||
public ScreenDesktop1(SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
super("Desktop1", bootArgs, deskAppService);
|
||||
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@ import com.badlogic.gdx.utils.Array;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop2 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop2(SystemGdxBootArgs bootArgs) {
|
||||
super("Desktop2", bootArgs);
|
||||
public ScreenDesktop2(SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
super("Desktop2", bootArgs, deskAppService);
|
||||
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@ import com.badlogic.gdx.utils.Array;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop3 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop3(SystemGdxBootArgs bootArgs) {
|
||||
super("Desktop3", bootArgs);
|
||||
public ScreenDesktop3(SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
super("Desktop3", bootArgs, deskAppService);
|
||||
}
|
||||
|
||||
protected void createModel(ModelBuilder modelBuilder, Array<ModelInstance> modelInstances) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop4 extends AbstractScreenDesktop {
|
||||
|
|
@ -36,8 +37,8 @@ public class ScreenDesktop4 extends AbstractScreenDesktop {
|
|||
private float colorFade = 0f;
|
||||
private boolean colorPositive = true;
|
||||
|
||||
public ScreenDesktop4(SystemGdxBootArgs bootArgs) {
|
||||
super("Desktop4", bootArgs);
|
||||
public ScreenDesktop4(SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
super("Desktop4", bootArgs, deskAppService);
|
||||
shader = new UserColorShader();
|
||||
shader.init();
|
||||
font = new BitmapFont();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.badlogic.gdx.Screen;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenHelp extends AbstractScrollScreen {
|
||||
|
|
@ -62,11 +61,11 @@ public class ScreenHelp extends AbstractScrollScreen {
|
|||
|
||||
@Override
|
||||
public void showScroll() {
|
||||
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.INTRO);
|
||||
//GDXAppVrGem4.INSTANCE.music.play(MusicSongType.INTRO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideScroll() {
|
||||
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
//GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.badlogic.gdx.Screen;
|
|||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.music.MusicSongType;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenIntroMission extends AbstractScrollScreen {
|
||||
|
|
@ -72,6 +71,6 @@ public class ScreenIntroMission extends AbstractScrollScreen {
|
|||
|
||||
@Override
|
||||
public void hideScroll() {
|
||||
GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
//GDXAppVrGem4.INSTANCE.music.play(MusicSongType.BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.service;
|
||||
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
|
||||
public interface VrGem4DeskAppService {
|
||||
|
||||
List<DeskAppLauncher> getLaunchers();
|
||||
|
||||
void registrateDeskApp(DeskAppLauncher launcher);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
abstract public class AbstractDeskApp implements DeskApp {
|
||||
|
||||
private final DeskAppContour contours;
|
||||
|
||||
public AbstractDeskApp() {
|
||||
this.contours = new DeskAppContour();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeskAppContour getContours() {
|
||||
return contours;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public interface DeskApp {
|
||||
|
||||
String getTitle();
|
||||
|
||||
String getIcon();
|
||||
|
||||
DeskAppContour getContours();
|
||||
|
||||
void create();
|
||||
|
||||
void show();
|
||||
|
||||
void hide();
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
@ -8,12 +8,21 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
|||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskAppContour {
|
||||
|
||||
private String title;
|
||||
private final Map<DeskAppContourSection, DeskAppRenderer> renderers;
|
||||
|
||||
public DeskAppContour() {
|
||||
this.renderers = new HashMap<>();
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void registrateContour(DeskAppContourSection section, DeskAppRenderer renderer) {
|
||||
renderers.put(section, renderer);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public final class DeskAppLauncher {
|
||||
|
||||
private final String name;
|
||||
private final Supplier<DeskApp> launcher;
|
||||
|
||||
public DeskAppLauncher(String name, Supplier<DeskApp> launcher) {
|
||||
this.name = name;
|
||||
this.launcher = launcher;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Supplier<DeskApp> getLauncher() {
|
||||
return launcher;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
@FunctionalInterface
|
||||
public interface DeskAppRenderer {
|
||||
|
||||
void render();
|
||||
|
|
@ -1,20 +1,23 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import imgui.ImGui;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskAppScreen {
|
||||
public class DeskAppController {
|
||||
|
||||
private final String name;
|
||||
private final List<DeskApp> deskApps;
|
||||
private DeskApp currentDeskApp;
|
||||
private final List<DeskAppScreenListener> deskAppListeners;
|
||||
private final List<DeskAppSelectionListener> deskAppListeners;
|
||||
|
||||
public DeskAppScreen(String name) {
|
||||
public DeskAppController(String name) {
|
||||
this.name = name;
|
||||
this.deskApps = new ArrayList<>();
|
||||
this.deskAppListeners = new ArrayList<>();
|
||||
|
|
@ -43,18 +46,18 @@ public class DeskAppScreen {
|
|||
|
||||
public void setCurrentDeskApp(DeskApp currentDeskApp) {
|
||||
this.currentDeskApp = currentDeskApp;
|
||||
for (DeskAppScreenListener listener: deskAppListeners) {
|
||||
for (DeskAppSelectionListener listener: deskAppListeners) {
|
||||
listener.selectDeskApp(currentDeskApp);
|
||||
}
|
||||
}
|
||||
|
||||
public void addDeskAppListener(DeskAppScreenListener listener) {
|
||||
public void addDeskAppListener(DeskAppSelectionListener listener) {
|
||||
deskAppListeners.add(listener);
|
||||
}
|
||||
|
||||
public final void renderMenu() {
|
||||
for (DeskApp app: deskApps) {
|
||||
if (ImGui.menuItem(app.getTitle())) {
|
||||
if (ImGui.menuItem(app.getContours().getTitle())) {
|
||||
//selectScreen(....class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import com.badlogic.gdx.InputProcessor;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskTopInputProcessor implements InputProcessor {
|
||||
public class DeskAppInputProcessor implements InputProcessor {
|
||||
|
||||
private final InputProcessor input;
|
||||
private boolean filtering = false;
|
||||
|
||||
public DeskTopInputProcessor(InputProcessor input) {
|
||||
public DeskAppInputProcessor(InputProcessor input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskApp;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public interface DeskAppScreenListener {
|
||||
public interface DeskAppSelectionListener {
|
||||
|
||||
void selectDeskApp(DeskApp deskApp);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import com.badlogic.gdx.Screen;
|
||||
|
||||
|
|
@ -7,5 +7,5 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
|||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public interface DeskTopScreen extends Screen {
|
||||
|
||||
DeskAppScreen getDeskAppScreen();
|
||||
DeskAppController getDeskAppController();
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -10,46 +10,48 @@ import imgui.type.ImBoolean;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppLauncher;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.BasicConsoleApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.HebrewWalletApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.MusicPlayerApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBaseGlyphApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBasePartApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.SystemBaseUnicodePlaneApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps.Unicode4DApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenCredits;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop1;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop2;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop3;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenDesktop4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.BasicConsoleApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.SystemBaseGlyphApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.SystemBasePartApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.SystemBaseUnicodePlaneApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.Unicode4DApp;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskTopScreenMenu {
|
||||
|
||||
private SystemGdxBootArgs bootArgs;
|
||||
private List<GDXAppLauncher> apps;
|
||||
private VrGem4DeskAppService deskAppService;
|
||||
private List<DeskAppLauncher> apps;
|
||||
private ImBoolean fileMinimizeSelected = new ImBoolean(false);
|
||||
private ImBoolean fileCloseSelected = new ImBoolean(false);
|
||||
private ImBoolean tosSelfSelected = new ImBoolean(false);
|
||||
|
||||
public DeskTopScreenMenu(SystemGdxBootArgs bootArgs) {
|
||||
public DeskTopScreenMenu(SystemGdxBootArgs bootArgs, VrGem4DeskAppService deskAppService) {
|
||||
this.bootArgs = bootArgs;
|
||||
this.deskAppService = deskAppService;
|
||||
apps = new ArrayList<>();
|
||||
apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp()));
|
||||
apps.add(new GDXAppLauncher("Sys Glyph Set", () -> new SystemBaseGlyphApp()));
|
||||
apps.add(new GDXAppLauncher("Sys Number Parts", () -> new SystemBasePartApp()));
|
||||
apps.add(new GDXAppLauncher("Sys Unicode", () -> new SystemBaseUnicodePlaneApp()));
|
||||
apps.add(new DeskAppLauncher("Basic Console", () -> new BasicConsoleApp()));
|
||||
apps.add(new DeskAppLauncher("Sys Glyph Set", () -> new SystemBaseGlyphApp()));
|
||||
apps.add(new DeskAppLauncher("Sys Number Parts", () -> new SystemBasePartApp()));
|
||||
apps.add(new DeskAppLauncher("Sys Unicode", () -> new SystemBaseUnicodePlaneApp()));
|
||||
|
||||
apps.add(new GDXAppLauncher("Hebrew Wallet", () -> new HebrewWalletApp()));
|
||||
apps.add(new GDXAppLauncher("Unicode4D", () -> new Unicode4DApp()));
|
||||
apps.add(new GDXAppLauncher("Music Player", () -> new MusicPlayerApp()));
|
||||
apps.add(new DeskAppLauncher("Unicode4D", () -> new Unicode4DApp()));
|
||||
}
|
||||
|
||||
public void renderMenu(DeskTopScreen appScreen) {
|
||||
DeskApp deskApp = appScreen.getDeskAppScreen().getCurrentDeskApp();
|
||||
DeskApp deskApp = appScreen.getDeskAppController().getCurrentDeskApp();
|
||||
|
||||
ImGui.beginMainMenuBar();
|
||||
renderVRGEM4Menu(appScreen);
|
||||
|
|
@ -64,18 +66,18 @@ public class DeskTopScreenMenu {
|
|||
}
|
||||
|
||||
private void renderSelfMenu(DeskTopScreen appScreen, DeskApp deskApp) {
|
||||
if (ImGui.beginMenu(deskApp.getTitle())) {;
|
||||
if (ImGui.beginMenu(deskApp.getContours().getTitle())) {;
|
||||
if (ImGui.menuItem(FontAwesomeIcons.FolderMinus + " Minimize", "", fileMinimizeSelected, deskApp != null )) {
|
||||
fileMinimizeSelected.set(false);
|
||||
if (deskApp != null) {
|
||||
appScreen.getDeskAppScreen().setCurrentDeskApp(null);
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(null);
|
||||
}
|
||||
}
|
||||
if (ImGui.menuItem(FontAwesomeIcons.WindowClose + " Exit", "", fileCloseSelected, deskApp != null)) {
|
||||
fileCloseSelected.set(false);
|
||||
if (deskApp != null) {
|
||||
appScreen.getDeskAppScreen().removeDeskApp(deskApp);
|
||||
appScreen.getDeskAppScreen().setCurrentDeskApp(null);
|
||||
appScreen.getDeskAppController().removeDeskApp(deskApp);
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(null);
|
||||
}
|
||||
}
|
||||
ImGui.endMenu();
|
||||
|
|
@ -163,17 +165,17 @@ public class DeskTopScreenMenu {
|
|||
|
||||
private void renderTOS4Menu(DeskTopScreen appScreen) {
|
||||
if (ImGui.beginMenu("仙" + " TOS⁴")) {
|
||||
if (ImGui.menuItem(FontAwesomeIcons.Camera + " Main reality", "", tosSelfSelected, appScreen.getDeskAppScreen().getCurrentDeskApp() != null)) {
|
||||
appScreen.getDeskAppScreen().setCurrentDeskApp(null);
|
||||
if (ImGui.menuItem(FontAwesomeIcons.Camera + " Main reality", "", tosSelfSelected, appScreen.getDeskAppController().getCurrentDeskApp() != null)) {
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(null);
|
||||
tosSelfSelected.set(false);
|
||||
}
|
||||
for (DeskApp app: appScreen.getDeskAppScreen().getDeskApps()) {
|
||||
for (DeskApp app: appScreen.getDeskAppController().getDeskApps()) {
|
||||
boolean enabled = true;
|
||||
if (appScreen.getDeskAppScreen().getCurrentDeskApp() == app) {
|
||||
if (appScreen.getDeskAppController().getCurrentDeskApp() == app) {
|
||||
enabled = false;
|
||||
}
|
||||
if (ImGui.menuItem(app.getTitle(), "", tosSelfSelected, enabled)) {
|
||||
appScreen.getDeskAppScreen().setCurrentDeskApp(app);
|
||||
if (ImGui.menuItem(app.getContours().getTitle(), "", tosSelfSelected, enabled)) {
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(app);
|
||||
tosSelfSelected.set(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -213,9 +215,19 @@ public class DeskTopScreenMenu {
|
|||
}
|
||||
ImGui.separator();
|
||||
if (ImGui.beginMenu(FontAwesomeIcons.PlusSquare + " Start App")) {
|
||||
for (GDXAppLauncher launcher: apps) {
|
||||
for (DeskAppLauncher launcher: apps) {
|
||||
if (ImGui.menuItem(launcher.getName())) {
|
||||
appScreen.getDeskAppScreen().addDeskApp(launcher.getLauncher().get());
|
||||
DeskApp controller = launcher.getLauncher().get();
|
||||
controller.create();
|
||||
appScreen.getDeskAppController().addDeskApp(controller);
|
||||
}
|
||||
}
|
||||
ImGui.separator();
|
||||
for (DeskAppLauncher launcher: deskAppService.getLaunchers()) {
|
||||
if (ImGui.menuItem(launcher.getName())) {
|
||||
DeskApp controller = launcher.getLauncher().get();
|
||||
controller.create();
|
||||
appScreen.getDeskAppController().addDeskApp(controller);
|
||||
}
|
||||
}
|
||||
ImGui.endMenu();
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import imgui.ImGui;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class BasicConsoleApp extends AbstractDeskApp {
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
getContours().setTitle("Basic Conssole");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, () -> {
|
||||
ImGui.text("10 PRINT \"The BASIC Shahada of DUNE;\"");
|
||||
ImGui.text("20 PRINT \"- THERE IS NO GOD BUT @Ω仙⁴\"");
|
||||
ImGui.text("30 PRINT \"- THERE IS NO RULE BUT CONSENT\"");
|
||||
ImGui.text("40 PRINT \"- THERE IS NO FAILURE BUT DEATH\"");
|
||||
ImGui.text("50 PRINT \"- TERRY A. DAVIS WAS THE PROPHET OF @Ω仙9⁴\"");
|
||||
ImGui.text("60 PRINT \"- TERRY A. DAVIS WAS THE FIRST TRUE MENTAT\"");
|
||||
ImGui.text("70 PRINT \"- TERRY A. DAVIS WAS THE BEST CODER ALIVE\"");
|
||||
ImGui.text("RUN");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
|
@ -7,13 +7,13 @@ import imgui.ImGui;
|
|||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class SystemBaseGlyphApp extends DefaultDeskApp {
|
||||
public class SystemBaseGlyphApp extends AbstractDeskApp {
|
||||
|
||||
private final ImBoolean showBase27 = new ImBoolean(false);
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ public class SystemBaseGlyphApp extends DefaultDeskApp {
|
|||
return bundle.getString("SystemBaseGlyphApp."+key);
|
||||
}
|
||||
|
||||
public SystemBaseGlyphApp() {
|
||||
setTitle(getTxt("title"));
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
|
||||
|
||||
@Override
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -10,9 +10,9 @@ import imgui.flag.ImGuiTableFlags;
|
|||
import imgui.type.ImBoolean;
|
||||
import imgui.type.ImInt;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt1ʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt2ʸᴰ;
|
||||
|
|
@ -22,7 +22,7 @@ import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
|
|||
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class SystemBasePartApp extends DefaultDeskApp implements DeskAppRenderer {
|
||||
public class SystemBasePartApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
private ImInt selectedBasePart = new ImInt();
|
||||
private final ImBoolean showBase10 = new ImBoolean(false);
|
||||
|
|
@ -34,8 +34,8 @@ public class SystemBasePartApp extends DefaultDeskApp implements DeskAppRenderer
|
|||
return bundle.getString("SystemBasePartApp."+key);
|
||||
}
|
||||
|
||||
public SystemBasePartApp() {
|
||||
setTitle(getTxt("title"));
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
|
@ -6,21 +6,21 @@ import java.util.ResourceBundle;
|
|||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.unicode4d.UnicodePlaneᶻᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class SystemBaseUnicodePlaneApp extends DefaultDeskApp {
|
||||
public class SystemBaseUnicodePlaneApp extends AbstractDeskApp {
|
||||
|
||||
private String getTxt(String key) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("love.distributedrebirth.gdxapp.Main", new Locale("en"));
|
||||
return bundle.getString("SystemBaseUnicodePlaneApp."+key);
|
||||
}
|
||||
|
||||
public SystemBaseUnicodePlaneApp() {
|
||||
setTitle(getTxt("title"));
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
|
||||
|
||||
@Override
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.desktop.apps;
|
||||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -8,18 +8,18 @@ import imgui.ImGui;
|
|||
import imgui.ImVec2;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DefaultDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
|
||||
import love.distributedrebirth.unicode4d.atlas.FontAtlasStore;
|
||||
import love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class Unicode4DApp extends DefaultDeskApp implements DeskAppRenderer {
|
||||
public class Unicode4DApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
public Unicode4DApp() {
|
||||
setTitle("Unicode4D");
|
||||
public void create() {
|
||||
getContours().setTitle("Unicode4D");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue