当前位置: 首页>>代码示例>>Java>>正文


Java Keyboard.enableRepeatEvents方法代码示例

本文整理汇总了Java中org.lwjgl.input.Keyboard.enableRepeatEvents方法的典型用法代码示例。如果您正苦于以下问题:Java Keyboard.enableRepeatEvents方法的具体用法?Java Keyboard.enableRepeatEvents怎么用?Java Keyboard.enableRepeatEvents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.input.Keyboard的用法示例。


在下文中一共展示了Keyboard.enableRepeatEvents方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    if (this.mc.playerController.isInCreativeMode())
    {
        super.initGui();
        this.buttonList.clear();
        Keyboard.enableRepeatEvents(true);
        this.searchField = new GuiTextField(0, this.fontRendererObj, this.guiLeft + 82, this.guiTop + 6, 89, this.fontRendererObj.FONT_HEIGHT);
        this.searchField.setMaxStringLength(15);
        this.searchField.setEnableBackgroundDrawing(false);
        this.searchField.setVisible(false);
        this.searchField.setTextColor(16777215);
        int i = selectedTabIndex;
        selectedTabIndex = -1;
        this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
        this.field_147059_E = new CreativeCrafting(this.mc);
        this.mc.thePlayer.inventoryContainer.onCraftGuiOpened(this.field_147059_E);
    }
    else
    {
        this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:GuiContainerCreative.java

示例2: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
@Override
public void initGui()
{
    Keyboard.enableRepeatEvents(true);

    this.guiLeft = (this.width - this.xSize) / 2;
    this.guiTop = (this.height - this.ySize) / 2;

    buttonList.clear();
    buttonList.add(new GuiButton(ID_CONFIRM, guiLeft + (xSize - 50) / 2, guiTop + ySize + 2, 50, 20, I18n.translateToLocal("gui.done")));

    channels = new ArrayList<>();
    for(TileEntity te : Minecraft.getMinecraft().world.loadedTileEntityList)
    {
        if(te instanceof TileEntityGlassMaster && (((TileEntityGlassMaster)te).setChannel.isEmpty() || ((TileEntityGlassMaster)te).setChannel.startsWith("public:") || ((TileEntityGlassMaster)te).setChannel.startsWith(Minecraft.getMinecraft().player.getName())))
        {
            channels.add((TileEntityGlassMaster)te);
        }
    }
    trackList = new GuiProjectorList(this, xSize - 10, ySize - 22, guiTop + 11, guiTop + ySize - 5, guiLeft + 5, 8, channels);
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:22,代码来源:GuiProjectorSetter.java

示例3: onGuiClosed

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Called when the screen is unloaded. Used to disable keyboard repeat events
 */
public void onGuiClosed()
{
    super.onGuiClosed();

    if (this.mc.thePlayer != null && this.mc.thePlayer.inventory != null)
    {
        this.mc.thePlayer.inventoryContainer.removeCraftingFromCrafters(this.field_147059_E);
    }

    Keyboard.enableRepeatEvents(false);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:15,代码来源:GuiContainerCreative.java

示例4: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectServer.select", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    this.field_146302_g = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 116, 200, 20);
    this.field_146302_g.setMaxStringLength(128);
    this.field_146302_g.setFocused(true);
    this.field_146302_g.setText(this.mc.gameSettings.lastServer);
    ((GuiButton)this.buttonList.get(0)).enabled = this.field_146302_g.getText().length() > 0 && this.field_146302_g.getText().split(":").length > 0;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:17,代码来源:GuiScreenServerList.java

示例5: keyTyped

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
 */
@Override
protected void keyTyped(char par1, int par2) throws IOException {
    if (par2 == 1) {
        Keyboard.enableRepeatEvents(false);
        mc.displayGuiScreen(parentScreen);
        onGuiClosed();
    } else {
        super.keyTyped(par1, par2);
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:14,代码来源:GuiPastebin.java

示例6: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    this.buttonList.clear();
    Keyboard.enableRepeatEvents(true);
    this.doneBtn = this.addButton(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 120, I18n.format("gui.done", new Object[0])));
    this.tileSign.setEditable(false);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:12,代码来源:GuiEditSign.java

示例7: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectServer.select", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    this.ipEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 116, 200, 20);
    this.ipEdit.setMaxStringLength(128);
    this.ipEdit.setFocused(true);
    this.ipEdit.setText(this.mc.gameSettings.lastServer);
    ((GuiButton)this.buttonList.get(0)).enabled = !this.ipEdit.getText().isEmpty() && this.ipEdit.getText().split(":").length > 0;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:GuiScreenServerList.java

示例8: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    this.buttonList.add(new GuiButton(0, this.width / 2 - 155, this.height - 28, 150, 20, I18n.format("selectWorld.create", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 + 5, this.height - 28, 150, 20, I18n.format("gui.cancel", new Object[0])));
    this.btnGameMode = this.addButton(new GuiButton(2, this.width / 2 - 75, 115, 150, 20, I18n.format("selectWorld.gameMode", new Object[0])));
    this.btnMoreOptions = this.addButton(new GuiButton(3, this.width / 2 - 75, 187, 150, 20, I18n.format("selectWorld.moreWorldOptions", new Object[0])));
    this.btnMapFeatures = this.addButton(new GuiButton(4, this.width / 2 - 155, 100, 150, 20, I18n.format("selectWorld.mapFeatures", new Object[0])));
    this.btnMapFeatures.visible = false;
    this.btnBonusItems = this.addButton(new GuiButton(7, this.width / 2 + 5, 151, 150, 20, I18n.format("selectWorld.bonusItems", new Object[0])));
    this.btnBonusItems.visible = false;
    this.btnMapType = this.addButton(new GuiButton(5, this.width / 2 + 5, 100, 150, 20, I18n.format("selectWorld.mapType", new Object[0])));
    this.btnMapType.visible = false;
    this.btnAllowCommands = this.addButton(new GuiButton(6, this.width / 2 - 155, 151, 150, 20, I18n.format("selectWorld.allowCommands", new Object[0])));
    this.btnAllowCommands.visible = false;
    this.btnCustomizeType = this.addButton(new GuiButton(8, this.width / 2 + 5, 120, 150, 20, I18n.format("selectWorld.customizeType", new Object[0])));
    this.btnCustomizeType.visible = false;
    this.worldNameField = new GuiTextField(9, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.worldNameField.setFocused(true);
    this.worldNameField.setText(this.worldName);
    this.worldSeedField = new GuiTextField(10, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.worldSeedField.setText(this.worldSeed);
    this.showMoreWorldOptions(this.inMoreWorldOptionsDisplay);
    this.calcSaveDirName();
    this.updateDisplayState();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:32,代码来源:GuiCreateWorld.java

示例9: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
public void initGui()
{
	Keyboard.enableRepeatEvents(true);
	buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 96 + 12, "Login"));
	buttonList.add(new GuiButton(2, width / 2 - 100, height / 4 + 96 + 36, "Back"));
	usernameBox = new GuiTextField(0, this.fontRendererObj, width / 2 - 100, 76 - 25, 200, 20);
	passwordBox = new GuiPasswordField(2, this.fontRendererObj, width / 2 - 100, 116 - 25, 200, 20);
	usernameBox.setMaxStringLength(200);
	passwordBox.setMaxStringLength(200);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:GuiDirectLogin.java

示例10: initGui

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    this.doneButton = this.addButton(new GuiButton(0, this.width / 2 - 4 - 150, 210, 150, 20, I18n.format("gui.done", new Object[0])));
    this.cancelButton = this.addButton(new GuiButton(1, this.width / 2 + 4, 210, 150, 20, I18n.format("gui.cancel", new Object[0])));
    this.saveButton = this.addButton(new GuiButton(9, this.width / 2 + 4 + 100, 185, 50, 20, I18n.format("structure_block.button.save", new Object[0])));
    this.loadButton = this.addButton(new GuiButton(10, this.width / 2 + 4 + 100, 185, 50, 20, I18n.format("structure_block.button.load", new Object[0])));
    this.modeButton = this.addButton(new GuiButton(18, this.width / 2 - 4 - 150, 185, 50, 20, "MODE"));
    this.detectSizeButton = this.addButton(new GuiButton(19, this.width / 2 + 4 + 100, 120, 50, 20, I18n.format("structure_block.button.detect_size", new Object[0])));
    this.showEntitiesButton = this.addButton(new GuiButton(20, this.width / 2 + 4 + 100, 160, 50, 20, "ENTITIES"));
    this.mirrorButton = this.addButton(new GuiButton(21, this.width / 2 - 20, 185, 40, 20, "MIRROR"));
    this.showAirButton = this.addButton(new GuiButton(22, this.width / 2 + 4 + 100, 80, 50, 20, "SHOWAIR"));
    this.showBoundingBoxButton = this.addButton(new GuiButton(23, this.width / 2 + 4 + 100, 80, 50, 20, "SHOWBB"));
    this.rotateZeroDegreesButton = this.addButton(new GuiButton(11, this.width / 2 - 1 - 40 - 1 - 40 - 20, 185, 40, 20, "0"));
    this.rotateNinetyDegreesButton = this.addButton(new GuiButton(12, this.width / 2 - 1 - 40 - 20, 185, 40, 20, "90"));
    this.rotate180DegreesButton = this.addButton(new GuiButton(13, this.width / 2 + 1 + 20, 185, 40, 20, "180"));
    this.rotate270DegressButton = this.addButton(new GuiButton(14, this.width / 2 + 1 + 40 + 1 + 20, 185, 40, 20, "270"));
    this.nameEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 152, 40, 300, 20);
    this.nameEdit.setMaxStringLength(64);
    this.nameEdit.setText(this.tileStructure.getName());
    this.tabOrder.add(this.nameEdit);
    BlockPos blockpos = this.tileStructure.getPosition();
    this.posXEdit = new GuiTextField(3, this.fontRendererObj, this.width / 2 - 152, 80, 80, 20);
    this.posXEdit.setMaxStringLength(15);
    this.posXEdit.setText(Integer.toString(blockpos.getX()));
    this.tabOrder.add(this.posXEdit);
    this.posYEdit = new GuiTextField(4, this.fontRendererObj, this.width / 2 - 72, 80, 80, 20);
    this.posYEdit.setMaxStringLength(15);
    this.posYEdit.setText(Integer.toString(blockpos.getY()));
    this.tabOrder.add(this.posYEdit);
    this.posZEdit = new GuiTextField(5, this.fontRendererObj, this.width / 2 + 8, 80, 80, 20);
    this.posZEdit.setMaxStringLength(15);
    this.posZEdit.setText(Integer.toString(blockpos.getZ()));
    this.tabOrder.add(this.posZEdit);
    BlockPos blockpos1 = this.tileStructure.getStructureSize();
    this.sizeXEdit = new GuiTextField(6, this.fontRendererObj, this.width / 2 - 152, 120, 80, 20);
    this.sizeXEdit.setMaxStringLength(15);
    this.sizeXEdit.setText(Integer.toString(blockpos1.getX()));
    this.tabOrder.add(this.sizeXEdit);
    this.sizeYEdit = new GuiTextField(7, this.fontRendererObj, this.width / 2 - 72, 120, 80, 20);
    this.sizeYEdit.setMaxStringLength(15);
    this.sizeYEdit.setText(Integer.toString(blockpos1.getY()));
    this.tabOrder.add(this.sizeYEdit);
    this.sizeZEdit = new GuiTextField(8, this.fontRendererObj, this.width / 2 + 8, 120, 80, 20);
    this.sizeZEdit.setMaxStringLength(15);
    this.sizeZEdit.setText(Integer.toString(blockpos1.getZ()));
    this.tabOrder.add(this.sizeZEdit);
    this.integrityEdit = new GuiTextField(15, this.fontRendererObj, this.width / 2 - 152, 120, 80, 20);
    this.integrityEdit.setMaxStringLength(15);
    this.integrityEdit.setText(this.decimalFormat.format((double)this.tileStructure.getIntegrity()));
    this.tabOrder.add(this.integrityEdit);
    this.seedEdit = new GuiTextField(16, this.fontRendererObj, this.width / 2 - 72, 120, 80, 20);
    this.seedEdit.setMaxStringLength(31);
    this.seedEdit.setText(Long.toString(this.tileStructure.getSeed()));
    this.tabOrder.add(this.seedEdit);
    this.dataEdit = new GuiTextField(17, this.fontRendererObj, this.width / 2 - 152, 120, 240, 20);
    this.dataEdit.setMaxStringLength(128);
    this.dataEdit.setText(this.tileStructure.getMetadata());
    this.tabOrder.add(this.dataEdit);
    this.mirror = this.tileStructure.getMirror();
    this.updateMirrorButton();
    this.rotation = this.tileStructure.getRotation();
    this.updateDirectionButtons();
    this.mode = this.tileStructure.getMode();
    this.updateMode();
    this.ignoreEntities = this.tileStructure.ignoresEntities();
    this.updateEntitiesButton();
    this.showAir = this.tileStructure.showsAir();
    this.updateToggleAirButton();
    this.showBoundingBox = this.tileStructure.showsBoundingBox();
    this.updateToggleBoundingBox();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:78,代码来源:GuiEditStructure.java

示例11: onGuiClosed

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Called when the screen is unloaded. Used to disable keyboard repeat events
 */
public void onGuiClosed()
{
    Keyboard.enableRepeatEvents(false);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:GuiCommandBlock.java

示例12: disableKeyRepeat

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Disable key repeat for this input context
 */
public void disableKeyRepeat() {
	Keyboard.enableRepeatEvents(false);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:7,代码来源:Input.java

示例13: onGuiClosed

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
@Override
public void onGuiClosed()
{
    Keyboard.enableRepeatEvents(false);
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:6,代码来源:GuiChannelSetterProjector.java

示例14: enableKeyRepeat

import org.lwjgl.input.Keyboard; //导入方法依赖的package包/类
/**
 * Enable key repeat for this input context. Uses the system settings for repeat
 * interval configuration.
 */
public void enableKeyRepeat() {
	Keyboard.enableRepeatEvents(true);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:Input.java


注:本文中的org.lwjgl.input.Keyboard.enableRepeatEvents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。