本文整理汇总了Java中de.lessvoid.nifty.input.NiftyInputEvent类的典型用法代码示例。如果您正苦于以下问题:Java NiftyInputEvent类的具体用法?Java NiftyInputEvent怎么用?Java NiftyInputEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NiftyInputEvent类属于de.lessvoid.nifty.input包,在下文中一共展示了NiftyInputEvent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: convert
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public NiftyInputEvent convert(KeyboardInputEvent inputEvent)
{
if (inputEvent.isKeyDown())
{
if (inputEvent.getKey() == KeyboardInputEvent.KEY_NEXT && inputEvent.isShiftDown())
{
return NiftyInputEvent.NextInputElement;
}
else if (inputEvent.getKey() == KeyboardInputEvent.KEY_PRIOR && inputEvent.isShiftDown())
{
return NiftyInputEvent.PrevInputElement;
}
else if (inputEvent.getKey() == KeyboardInputEvent.KEY_TAB)
{
// disable the default nifty behaviour for tab
// otherwise we have to provide an inputMapping for every focusable element.
NiftyInputEvent.Character.setCharacter((char) 0);
return NiftyInputEvent.Character;
}
}
return null;
}
开发者ID:Periapsis,项目名称:aphelion,代码行数:27,代码来源:MainScreenController.java
示例2: convert
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public NiftyInputEvent convert(KeyboardInputEvent inputEvent)
{
if (!inputEvent.isKeyDown())
{
switch (inputEvent.getKey())
{
case KeyboardInputEvent.KEY_ESCAPE:
return NiftyInputEvent.Escape;
}
}
if (!Character.isISOControl(inputEvent.getCharacter()))
{
// this is pretty silly...
NiftyInputEvent.Character.setCharacter(inputEvent.getCharacter());
return NiftyInputEvent.Character;
}
return null;
}
开发者ID:Periapsis,项目名称:aphelion,代码行数:22,代码来源:GameMenuController.java
示例3: keyEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean keyEvent(final NiftyInputEvent inputEvent)
{
if (inputEvent == null)
{
return false;
}
log.log(Level.FINE, "event received: {0}", inputEvent);
if (inputEvent == NiftyInputEvent.SubmitText)
{
sendText();
return true;
}
else if (inputEvent == NiftyInputEvent.MoveCursorRight)
{
}
return false;
}
开发者ID:Periapsis,项目名称:aphelion,代码行数:24,代码来源:AphelionChatControl.java
示例4: keyEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public boolean keyEvent(NiftyInputEvent inputEvent) {
if (inputEvent == NiftyStandardInputEvent.Escape) {
nifty.setAlternateKey("exit");
nifty.gotoScreen("loading");
return true;
}
return false;
}
开发者ID:SkidRunner,项目名称:jME3-Examples,代码行数:10,代码来源:NiftySplashScreen.java
示例5: keyEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public boolean keyEvent(NiftyInputEvent inputEvent) {
if (inputEvent == NiftyStandardInputEvent.Escape) {
nifty.setAlternateKey("exit");
nifty.gotoScreen("nifty-splash");
return true;
}
return false;
}
开发者ID:SkidRunner,项目名称:jME3-Examples,代码行数:10,代码来源:JmonkeySplashScreen.java
示例6: keyEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public boolean keyEvent(NiftyInputEvent inputEvent) {
if (inputEvent == NiftyStandardInputEvent.Escape) {
if (popupExit) {
closePopupExit("no");
} else {
openPopupExit();
}
return true;
}
return false;
}
开发者ID:SkidRunner,项目名称:jME3-Examples,代码行数:13,代码来源:MainScreen.java
示例7: inputEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public boolean inputEvent(@Nonnull NiftyInputEvent niftyInputEvent) {
return false;
}
开发者ID:SkidRunner,项目名称:jME3-Examples,代码行数:5,代码来源:ProgressBarControl.java
示例8: keyEvent
import de.lessvoid.nifty.input.NiftyInputEvent; //导入依赖的package包/类
@Override
public boolean keyEvent(NiftyInputEvent nie) {
return false;
}
开发者ID:SkidRunner,项目名称:jME3-Examples,代码行数:5,代码来源:GameScreen.java
注:本文中的de.lessvoid.nifty.input.NiftyInputEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论