DeskApp contour structure
This commit is contained in:
parent
be6de9ff22
commit
6112baf429
|
@ -66,6 +66,11 @@ public class ImFrameˣᴹᴵ extends AbstractImComponentSetˣᴹᴵ {
|
||||||
this.frameOpen = frameOpen;
|
this.frameOpen = frameOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNextWindowPos(float nextWindowPosX, float nextWindowPosY) {
|
||||||
|
setNextWindowPosX(nextWindowPosX);
|
||||||
|
setNextWindowPosY(nextWindowPosY);
|
||||||
|
}
|
||||||
|
|
||||||
public float getNextWindowPosX() {
|
public float getNextWindowPosX() {
|
||||||
return nextWindowPosX;
|
return nextWindowPosX;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +95,11 @@ public class ImFrameˣᴹᴵ extends AbstractImComponentSetˣᴹᴵ {
|
||||||
this.nextWindowPosCond = nextWindowPosCond;
|
this.nextWindowPosCond = nextWindowPosCond;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNextWindowSize(float nextWindowSizeWidth, float nextWindowSizeHeight) {
|
||||||
|
setNextWindowSizeWidth(nextWindowSizeWidth);
|
||||||
|
setNextWindowSizeHeight(nextWindowSizeHeight);
|
||||||
|
}
|
||||||
|
|
||||||
public float getNextWindowSizeWidth() {
|
public float getNextWindowSizeWidth() {
|
||||||
return nextWindowSizeWidth;
|
return nextWindowSizeWidth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
import love.distributedrebirth.imxmi.lang.ImFrameˣᴹᴵ;
|
||||||
|
import love.distributedrebirth.imxmi.lang.ImTextˣᴹᴵ;
|
||||||
|
|
||||||
|
public class BasicConsoleDeskApp implements DeskApp {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(DeskAppContour contour) {
|
||||||
|
ImFrameˣᴹᴵ frame = new ImFrameˣᴹᴵ();
|
||||||
|
frame.setNextWindowPos(300, 300);
|
||||||
|
frame.setNextWindowSize(320, 240);
|
||||||
|
frame.setTitle("The BASIC Shahada of DUNE");
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("10 PRINT \"THERE IS NO GOD BUT @Ω仙⁴\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("20 PRINT \"THERE IS NO RULE BUT CONSENT\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("30 PRINT \"THERE IS NO FAILURE BUT DEATH\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("40 PRINT \"TERRY A. DAVIS WAS THE PROPHET OF @Ω仙9⁴\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("50 PRINT \"TERRY A. DAVIS WAS THE FIRST TRUE MENTAT\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("60 PRINT \"TERRY A. DAVIS WAS THE BEST CODER ALIVE\""));
|
||||||
|
frame.addComponent(new ImTextˣᴹᴵ("RUN"));
|
||||||
|
|
||||||
|
contour.registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render() {
|
||||||
|
frame.renderBegin();
|
||||||
|
frame.renderComponent();
|
||||||
|
frame.renderEnd();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
public interface DeskApp {
|
||||||
|
|
||||||
|
void create(DeskAppContour contour);
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class DeskAppContour {
|
||||||
|
|
||||||
|
private final String appName;
|
||||||
|
private final Map<DeskAppContourSection, DeskAppRenderer> renderers;
|
||||||
|
|
||||||
|
public DeskAppContour(String appName) {
|
||||||
|
this.appName = appName;
|
||||||
|
this.renderers = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppName() {
|
||||||
|
return appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registrateContour(DeskAppContourSection section, DeskAppRenderer renderer) {
|
||||||
|
renderers.put(section, renderer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeskAppRenderer getContour(DeskAppContourSection section) {
|
||||||
|
return renderers.get(section);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
public enum DeskAppContourSection {
|
||||||
|
|
||||||
|
MAIN,
|
||||||
|
|
||||||
|
FILE_NEW,
|
||||||
|
FILE_CLOSE,
|
||||||
|
FILE_SAVE,
|
||||||
|
FILE_OPTION,
|
||||||
|
FILE_PRINT,
|
||||||
|
|
||||||
|
EDIT_UNDO,
|
||||||
|
EDIT_COPY,
|
||||||
|
EDIT_SELECT,
|
||||||
|
EDIT_FIND,
|
||||||
|
EDIT_OPTION,
|
||||||
|
|
||||||
|
SELF_WELCOME,
|
||||||
|
SELF_INDEX,
|
||||||
|
SELF_OPTION,
|
||||||
|
SELF_ABOUT,
|
||||||
|
;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
public interface DeskAppRenderer {
|
||||||
|
|
||||||
|
void render();
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
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ʸᴰ;
|
||||||
|
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
||||||
|
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
|
||||||
|
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
|
||||||
|
import love.distributedrebirth.bassboonyd.jmx.MBeanStoreKeyᴶᴹˣ;
|
||||||
|
|
||||||
|
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||||
|
@BãßBȍőnClassInfoʸᴰ(name = "BaseGlyphSet", purpose = "The encoded base scripts.")
|
||||||
|
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
|
||||||
|
public enum DesktopManager implements DefaultEnumInstanceᴶᴹˣ<DesktopManager,MBeanStoreKeyᴶᴹˣ> {
|
||||||
|
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
private List<DesktopScreen> screens = new ArrayList<>();
|
||||||
|
private DesktopScreen currentScreen = null;
|
||||||
|
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
|
||||||
|
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
|
||||||
|
|
||||||
|
public void BãßAddScreen(DesktopScreen screen) {
|
||||||
|
screens.add(screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int BãßScreensLength() {
|
||||||
|
return screens.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DesktopScreen BãßScreenByIndex(int index) {
|
||||||
|
return screens.get(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BãßSelectScreenByIndex(int index) {
|
||||||
|
BãßSelectScreen(BãßScreenByIndex(index));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BãßSelectScreen(DesktopScreen screen) {
|
||||||
|
currentScreen = screen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DesktopScreen BãßCurrentScreen() {
|
||||||
|
return currentScreen;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package love.distributedrebirth.gdxapp.desktop;
|
||||||
|
|
||||||
|
public interface DesktopScreen {
|
||||||
|
|
||||||
|
public void render(float delta);
|
||||||
|
}
|
Loading…
Reference in a new issue