本文整理了Java中com.jme3.system.AppSettings.putBoolean()
方法的一些代码示例,展示了AppSettings.putBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.putBoolean()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:putBoolean
[英]Set a boolean on the settings.
[中]在设置上设置一个布尔值。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Enable or disable mouse emulation on touchscreen based devices.
* This will convert taps on the touchscreen or movement of finger
* over touchscreen (only the first) into the appropriate mouse events.
*
* @param emulateMouse If mouse emulation should be enabled.
*/
public void setEmulateMouse(boolean emulateMouse) {
putBoolean("TouchEmulateMouse", emulateMouse);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Set to true to enable vertical-synchronization, limiting and synchronizing
* every frame rendered to the monitor's refresh rate.
* @param value
* (Default: false)
*/
public void setVSync(boolean value) {
putBoolean("VSync", value);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* True to enable the creation of an OpenCL context.
*
* @param support
*/
public void setOpenCLSupport(boolean support) {
putBoolean("OpenCL", support);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Specify if the X or Y (or both) axes should be flipped for emulated mouse.
*
* @param flipX Set to flip X axis
* @param flipY Set to flip Y axis
*
* @see #setEmulateMouse(boolean)
*/
public void setEmulateMouseFlipAxis(boolean flipX, boolean flipY) {
putBoolean("TouchEmulateMouseFlipX", flipX);
putBoolean("TouchEmulateMouseFlipY", flipY);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Enable or disable keyboard emulation on touchscreen based devices.
* This will convert soft keyboard key presses on the touchscreen
* into the appropriate key events.
*
* @param emulateKeyboard If soft keyboard emulation should be enabled.
*/
public void setEmulateKeyboard(boolean emulateKeyboard) {
putBoolean("TouchEmulateKeyboard", emulateKeyboard);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* @param use If true, the application will initialize and use input.
* Set to false for headless applications that do not require keyboard
* or mouse input.
* (Default: true)
*/
public void setUseInput(boolean use) {
putBoolean("UseInput", use);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* @param use If true, the application will initialize and use joystick
* input. Set to false if no joystick input is desired.
* (Default: false)
*/
public void setUseJoysticks(boolean use) {
putBoolean("DisableJoysticks", !use);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* @param value true to enable full-screen rendering, false to render in a window
* (Default: false)
*/
public void setFullscreen(boolean value) {
putBoolean("Fullscreen", value);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Enable 3D stereo.
* <p>This feature requires hardware support from the GPU driver.
* @see <a href="http://en.wikipedia.org/wiki/Quad_buffering">http://en.wikipedia.org/wiki/Quad_buffering</a><br />
* Once enabled, filters or scene processors that handle 3D stereo rendering
* could use this feature to render using hardware 3D stereo.</p>
* (Default: false)
*/
public void setStereo3D(boolean value){
putBoolean("Stereo3D", value);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Enables Gamma Correction
* This requires that the GPU supports GL_ARB_framebuffer_sRGB and will
* disabled otherwise.
* @param gammaCorrection
* (Default : true)
*/
public void setGammaCorrection(boolean gammaCorrection) {
putBoolean("GammaCorrection", gammaCorrection);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Allows the display window to be resized by dragging its edges.
*
* Only supported for {@link JmeContext.Type#Display} contexts which
* are in windowed mode, ignored for other types.
* The default value is <code>false</code>.
*
* @param resizable True to make a resizable window, false to make a fixed
* size window.
*/
public void setResizable(boolean resizable) {
putBoolean("Resizable", resizable);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* When enabled the display context will swap buffers every frame.
*
* This may need to be disabled when integrating with an external
* library that handles buffer swapping on its own, e.g. Oculus Rift.
* When disabled, the engine will process window messages
* after each frame but it will not swap buffers - note that this
* will cause 100% CPU usage normally as there's no VSync or any framerate
* caps (unless set via {@link #setFrameRate(int) }.
* The default is <code>true</code>.
*
* @param swapBuffers True to enable buffer swapping, false to disable it.
*/
public void setSwapBuffers(boolean swapBuffers) {
putBoolean("SwapBuffers", swapBuffers);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
} else if (key.endsWith("(bool)")) {
boolean bVal = Boolean.parseBoolean(val);
putBoolean(key.substring(0, key.length() - 6), bVal);
} else if (key.endsWith("(float)")) {
float fVal = Float.parseFloat(val);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
settings.putBoolean("TestBool", true);
settings.putInteger("TestInt", 123);
settings.putString("TestStr", "HelloWorld");
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Tests preference based AppSettings.
*/
private static void testPreferenceSettings() {
AppSettings settings = new AppSettings(false);
settings.putBoolean("TestBool", true);
settings.putInteger("TestInt", 123);
settings.putString("TestStr", "HelloWorld");
settings.putFloat("TestFloat", 123.567f);
settings.put("TestObj", new Mesh()); // Objects not supported by preferences
try {
settings.save(APPSETTINGS_KEY);
} catch (BackingStoreException ex) {
ex.printStackTrace();
}
AppSettings loadedSettings = new AppSettings(false);
try {
loadedSettings.load(APPSETTINGS_KEY);
} catch (BackingStoreException ex) {
ex.printStackTrace();
}
assertEqual(loadedSettings.getBoolean("TestBool"), true);
assertEqual(loadedSettings.getInteger("TestInt"), 123);
assertEqual(loadedSettings.getString("TestStr"), "HelloWorld");
assertEqual(loadedSettings.get("TestFloat"), 123.567f);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Specify if the X or Y (or both) axes should be flipped for emulated mouse.
*
* @param flipX Set to flip X axis
* @param flipY Set to flip Y axis
*
* @see #setEmulateMouse(boolean)
*/
public void setEmulateMouseFlipAxis(boolean flipX, boolean flipY) {
putBoolean("TouchEmulateMouseFlipX", flipX);
putBoolean("TouchEmulateMouseFlipY", flipY);
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Enable 3D stereo.
* <p>This feature requires hardware support from the GPU driver.
* @see <a href="http://en.wikipedia.org/wiki/Quad_buffering">http://en.wikipedia.org/wiki/Quad_buffering</a><br>
* Once enabled, filters or scene processors that handle 3D stereo rendering
* could use this feature to render using hardware 3D stereo.</p>
* (Default: false)
*/
public void setStereo3D(boolean value){
putBoolean("Stereo3D", value);
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* @param use If true, the application will initialize and use input.
* Set to false for headless applications that do not require keyboard
* or mouse input.
* (Default: true)
*/
public void setUseInput(boolean use) {
putBoolean("UseInput", use);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Enable or disable mouse emulation on touchscreen based devices.
* This will convert taps on the touchscreen or movement of finger
* over touchscreen (only the first) into the appropriate mouse events.
*
* @param emulateMouse If mouse emulation should be enabled.
*/
public void setEmulateMouse(boolean emulateMouse) {
putBoolean("TouchEmulateMouse", emulateMouse);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* @param use If true, the application will initialize and use joystick
* input. Set to false if no joystick input is desired.
* (Default: false)
*/
public void setUseJoysticks(boolean use) {
putBoolean("DisableJoysticks", !use);
}
内容来源于网络,如有侵权,请联系作者删除!