本文整理汇总了Java中com.badlogic.gdx.backends.lwjgl.LwjglCanvas类的典型用法代码示例。如果您正苦于以下问题:Java LwjglCanvas类的具体用法?Java LwjglCanvas怎么用?Java LwjglCanvas使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LwjglCanvas类属于com.badlogic.gdx.backends.lwjgl包,在下文中一共展示了LwjglCanvas类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: start
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public static void start(final Arguments arguments) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
LoggerUtils.setupExternalFileOutput();
final LwjglCanvasConfiguration config = new LwjglCanvasConfiguration();
config.title = AppConstants.APP_TITLE;
config.preferencesDirectory = AppConstants.EXTERNAL_DIR;
config.iconFilePath = "icon128.png";
config.width = 1024;
config.height = 600;
config.allowSoftwareMode = arguments.softOpenGL;
config.useHDPI = true;
AppParams appParams = new AppParams();
appParams.startupProject = arguments.project;
App app = new App(new DesktopClassScanner(), appParams);
LwjglCanvas canvas = new CustomLwjglCanvas(app, config);
new MainFrame(app, canvas, config);
}
});
}
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:27,代码来源:AwtFrameLauncher.java
示例2: Editor
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
/**
* Creates new form Editor
*/
public Editor() {
initComponents();
// menu action listeners
new MenuFile(this).addActionListeners();
new MenuEdit(this).addActionListeners();
new MenuView(this).addActionListeners();
new MenuHelp(this).addActionListeners();
// render
renderer = new Renderer();
canvas = new LwjglCanvas(renderer, false);
// input
canvas.getInput().setInputProcessor(new Input(this, renderer));
// editor
history = new History(this);
properties = new Properties(this, propertySheetPanel);
jPanelRender.add(canvas.getCanvas());
}
开发者ID:navossoc,项目名称:vrmleditor,代码行数:25,代码来源:Editor.java
示例3: FlameMain
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public FlameMain () {
super("Flame");
MathUtils.random = new RandomXS128();
particleSystem = ParticleSystem.get();
effect = new ParticleEffect();
particleSystem.add(effect);
assetManager = new AssetManager();
assetManager.setErrorListener(this);
assetManager.setLoader(ParticleEffect.class, new ParticleEffectLoader(new InternalFileHandleResolver()));
controllersData = new Array<ControllerData>();
lwjglCanvas = new LwjglCanvas(renderer = new AppRenderer());
addWindowListener(new WindowAdapter() {
public void windowClosed (WindowEvent event) {
//System.exit(0);
Gdx.app.exit();
}
});
initializeComponents();
setSize(1280, 950);
setLocationRelativeTo(null);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:27,代码来源:FlameMain.java
示例4: ParticleEditor
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public ParticleEditor () {
super("Particle Editor");
lwjglCanvas = new LwjglCanvas(new Renderer());
addWindowListener(new WindowAdapter() {
public void windowClosed (WindowEvent event) {
System.exit(0);
// Gdx.app.quit();
}
});
initializeComponents();
setSize(1000, 950);
setLocationRelativeTo(null);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:19,代码来源:ParticleEditor.java
示例5: Hiero4
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public Hiero4 () {
super("Hiero v4.0 - Bitmap Font Tool");
Splash splash = new Splash(this, "/splash.jpg", 2000);
initialize();
splash.close();
gamePanel.add(new LwjglCanvas(renderer = new Renderer()).getCanvas());
prefs = Preferences.userNodeForPackage(Hiero4.class);
java.awt.Color backgroundColor = EffectUtil.fromString(prefs.get("background", "000000"));
backgroundColorLabel.setIcon(getColorIcon(backgroundColor));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f,
backgroundColor.getBlue() / 255f, 1);
boolean useFontList = getFontFile(Font.decode("Arial")) != null;
fontList.setEnabled(useFontList);
systemFontRadio.setEnabled(useFontList);
fontFileRadio.setSelected(!useFontList);
fontFileText.setText(prefs.get("font.file", ""));
setVisible(true);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:23,代码来源:Hiero4.java
示例6: ParticleEditor
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public ParticleEditor () {
super("Particle Editor");
lwjglCanvas = new LwjglCanvas(new Renderer(), false);
addWindowListener(new WindowAdapter() {
public void windowClosed (WindowEvent event) {
System.exit(0);
// Gdx.app.quit();
}
});
initializeComponents();
setSize(1000, 950);
setLocationRelativeTo(null);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}
开发者ID:tjumyk,项目名称:touhou-java,代码行数:19,代码来源:ParticleEditor.java
示例7: Hiero4
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public Hiero4 () {
super("Hiero v4.0 - Bitmap Font Tool");
Splash splash = new Splash(this, "/splash.jpg", 2000);
initialize();
splash.close();
gamePanel.add(new LwjglCanvas(renderer = new Renderer(), false).getCanvas());
prefs = Preferences.userNodeForPackage(Hiero4.class);
java.awt.Color backgroundColor = EffectUtil.fromString(prefs.get("background", "000000"));
backgroundColorLabel.setIcon(getColorIcon(backgroundColor));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f,
backgroundColor.getBlue() / 255f, 1);
boolean useFontList = getFontFile(Font.decode("Arial")) != null;
fontList.setEnabled(useFontList);
systemFontRadio.setEnabled(useFontList);
fontFileRadio.setSelected(!useFontList);
fontFileText.setText(prefs.get("font.file", ""));
setVisible(true);
}
开发者ID:tjumyk,项目名称:touhou-java,代码行数:23,代码来源:Hiero4.java
示例8: SwingTestRunner
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public SwingTestRunner() {
logger.info("Starting application");
LwjglApplicationConfiguration configuration = new LwjglApplicationConfiguration();
configuration.width = 1200;
configuration.height = 900;
configuration.samples = 4;
logger.info("Config is: {}x{}", configuration.width, configuration.height);
ApplicationListener app = new WheelRenderer();
lwjglCanvas = new LwjglCanvas(app, configuration);
logger.info("Application listener used is {}", app.getClass());
setName("Test frame ooo");
JButton b = new JButton("lol");
b.addActionListener(e -> {
logger.info("Button clicked");
// ((WheelRenderer) app).doStuff();
// lwjglCanvas.stop();
// getContentPane().remove(lwjglCanvas.getCanvas());
});
Container c = getContentPane();
lwjglCanvas.getCanvas().setBounds(0, 0, 1200, 900);
b.setBounds(900, 0, 100, 900);
c.add(lwjglCanvas.getCanvas(), BorderLayout.LINE_START);
c.add(b, BorderLayout.CENTER);
pack();
setVisible(true);
setSize(1300, 900);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
}
开发者ID:Matsemann,项目名称:eamaster,代码行数:40,代码来源:SwingTestRunner.java
示例9: Hiero
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public Hiero(String [] args) {
super("Hiero v3.0 - Bitmap Font Tool");
Splash splash = new Splash(this, "/splash.jpg", 2000);
initialize();
splash.close();
gamePanel.add(new LwjglCanvas(new Renderer()).getCanvas());
prefs = Preferences.userNodeForPackage(Hiero.class);
java.awt.Color backgroundColor = EffectUtil.fromString(prefs.get("background", "000000"));
backgroundColorLabel.setIcon(getColorIcon(backgroundColor));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f,
backgroundColor.getBlue() / 255f, 1);
fontList.setSelectedValue(prefs.get("system.font", "Arial"), true);
fontFileText.setText(prefs.get("font.file", ""));
java.awt.Color foregroundColor = EffectUtil.fromString(prefs.get("foreground", "ffffff"));
colorEffect = new ColorEffect();
colorEffect.setColor(foregroundColor);
effectsListModel.addElement(colorEffect);
effectsListModel.addElement(new GradientEffect());
effectsListModel.addElement(new OutlineEffect());
effectsListModel.addElement(new OutlineWobbleEffect());
effectsListModel.addElement(new OutlineZigzagEffect());
effectsListModel.addElement(new ShadowEffect());
effectsListModel.addElement(new DistanceFieldEffect());
new EffectPanel(colorEffect);
parseArgs(args);
addWindowListener(new WindowAdapter() {
public void windowClosed (WindowEvent event) {
System.exit(0);
// Gdx.app.quit();
}
});
updateFontSelector();
setVisible(true);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:41,代码来源:Hiero.java
示例10: LwjglCanvasTest
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public LwjglCanvasTest () {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container container = getContentPane();
canvas = new LwjglCanvas(new UITest());
container.add(canvas.getCanvas(), BorderLayout.CENTER);
pack();
setVisible(true);
setSize(800, 480);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:13,代码来源:LwjglCanvasTest.java
示例11: Hiero
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public Hiero () {
super("Hiero v3.0 - Bitmap Font Tool");
Splash splash = new Splash(this, "/splash.jpg", 2000);
initialize();
splash.close();
gamePanel.add(new LwjglCanvas(new Renderer(), false).getCanvas());
prefs = Preferences.userNodeForPackage(Hiero.class);
java.awt.Color backgroundColor = EffectUtil.fromString(prefs.get("background", "000000"));
backgroundColorLabel.setIcon(getColorIcon(backgroundColor));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f,
backgroundColor.getBlue() / 255f, 1);
fontList.setSelectedValue(prefs.get("system.font", "Arial"), true);
fontFileText.setText(prefs.get("font.file", ""));
java.awt.Color foregroundColor = EffectUtil.fromString(prefs.get("foreground", "ffffff"));
colorEffect = new ColorEffect();
colorEffect.setColor(foregroundColor);
effectsListModel.addElement(colorEffect);
effectsListModel.addElement(new GradientEffect());
effectsListModel.addElement(new OutlineEffect());
effectsListModel.addElement(new OutlineWobbleEffect());
effectsListModel.addElement(new OutlineZigzagEffect());
effectsListModel.addElement(new ShadowEffect());
effectsListModel.addElement(new DistanceFieldEffect());
new EffectPanel(colorEffect);
setVisible(true);
}
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:30,代码来源:Hiero.java
示例12: Hiero
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public Hiero () {
super("Hiero v3.0 - Bitmap Font Tool");
Splash splash = new Splash(this, "/splash.jpg", 2000);
initialize();
splash.close();
gamePanel.add(new LwjglCanvas(new Renderer(), false).getCanvas());
prefs = Preferences.userNodeForPackage(Hiero.class);
java.awt.Color backgroundColor = EffectUtil.fromString(prefs.get("background", "000000"));
backgroundColorLabel.setIcon(getColorIcon(backgroundColor));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f,
backgroundColor.getBlue() / 255f, 1);
fontList.setSelectedValue(prefs.get("system.font", "Arial"), true);
fontFileText.setText(prefs.get("font.file", ""));
java.awt.Color foregroundColor = EffectUtil.fromString(prefs.get("foreground", "ffffff"));
colorEffect = new ColorEffect();
colorEffect.setColor(foregroundColor);
effectsListModel.addElement(colorEffect);
effectsListModel.addElement(new GradientEffect());
effectsListModel.addElement(new OutlineEffect());
effectsListModel.addElement(new OutlineWobbleEffect());
effectsListModel.addElement(new OutlineZigzagEffect());
effectsListModel.addElement(new ShadowEffect());
effectsListModel.addElement(new DistanceFieldEffect());
new EffectPanel(colorEffect);
addWindowListener(new WindowAdapter() {
public void windowClosed (WindowEvent event) {
System.exit(0);
// Gdx.app.quit();
}
});
setVisible(true);
}
开发者ID:tjumyk,项目名称:touhou-java,代码行数:38,代码来源:Hiero.java
示例13: LwjglPanel
import com.badlogic.gdx.backends.lwjgl.LwjglCanvas; //导入依赖的package包/类
public LwjglPanel(IUIHandler handler) {
setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
setLayout(new GridLayout());
gdxApp = new GdxApp(handler);
canvas = new LwjglCanvas(gdxApp, true);
add(canvas.getCanvas());
}
开发者ID:steelkiwi,项目名称:libGDX-Path-Editor,代码行数:9,代码来源:LwjglPanel.java
注:本文中的com.badlogic.gdx.backends.lwjgl.LwjglCanvas类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论