本文整理汇总了Java中net.minecraftforge.client.settings.KeyModifier.CONTROL属性的典型用法代码示例。如果您正苦于以下问题:Java KeyModifier.CONTROL属性的具体用法?Java KeyModifier.CONTROL怎么用?Java KeyModifier.CONTROL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraftforge.client.settings.KeyModifier
的用法示例。
在下文中一共展示了KeyModifier.CONTROL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isRequiredKeyActive
public static boolean isRequiredKeyActive(KeyModifier key)
{
if (key == KeyModifier.NONE)
{
return true;
}
if (key == KeyModifier.ALT)
{
return GuiScreen.isAltKeyDown();
}
if (key == KeyModifier.CONTROL)
{
return GuiScreen.isCtrlKeyDown();
}
if (key == KeyModifier.SHIFT)
{
return GuiScreen.isShiftKeyDown();
}
return false;
}
示例2: getKeyModifier
private static KeyModifier getKeyModifier(String value)
{
if (value == null)
{
return KeyModifier.NONE;
}
if (value.equalsIgnoreCase("shift"))
{
return KeyModifier.SHIFT;
}
if (value.equalsIgnoreCase("ctrl") || value.equalsIgnoreCase("control"))
{
return KeyModifier.CONTROL;
}
if (value.equalsIgnoreCase("alt"))
{
return KeyModifier.ALT;
}
return KeyModifier.NONE;
}
示例3: registerKeys
@Override
public void registerKeys()
{
openGuiKey = new KeyBinding("minetogether.key.friends", KeyConflictContext.UNIVERSAL, KeyModifier.CONTROL, Keyboard.KEY_M, "minetogether.keys");
ClientRegistry.registerKeyBinding(openGuiKey);
}
示例4: init
public static void init(FMLInitializationEvent event)
{
PLACEMENT_CYCLE_SELECTION_TARGET = new KeyBinding("key.placement_cycle_selection_target", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.CONTROL, Keyboard.KEY_R, "key.categories.hard_science");
PLACEMENT_CYCLE_REGION_ORIENTATION = new KeyBinding("key.placement_cycle_region_orientation", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.ALT, Keyboard.KEY_R, "key.categories.hard_science");
PLACEMENT_CYCLE_BLOCK_ORIENTATION = new KeyBinding("key.placement_cycle_block_orientation", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_R, "key.categories.hard_science");
PLACEMENT_HISTORY_FORWARD = new KeyBinding("key.placement_history_forward", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.SHIFT, Keyboard.KEY_B, "key.categories.hard_science");
PLACEMENT_HISTORY_BACK = new KeyBinding("key.placement_history_back", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.CONTROL, Keyboard.KEY_B, "key.categories.hard_science");
PLACEMENT_DISPLAY_GUI = new KeyBinding("key.placement_display_gui", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_B, "key.categories.hard_science");
PLACEMENT_CYCLE_FILTER_MODE = new KeyBinding("key.placement_cycle_filter_mode", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.CONTROL, Keyboard.KEY_F, "key.categories.hard_science");
PLACEMENT_CYCLE_SPECIES_HANDLING = new KeyBinding("key.placement_cycle_species_handling", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.CONTROL, Keyboard.KEY_V, "key.categories.hard_science");
PLACEMENT_CYCLE_TARGET_MODE = new KeyBinding("key.placement_cycle_target_mode", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_V, "key.categories.hard_science");
PLACEMENT_PREVIEW = new KeyBinding("key.placement_preview", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_P, "key.categories.hard_science");
PLACEMENT_INCREASE_WIDTH = new KeyBinding("key.placement_increase_width", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_RIGHT, "key.categories.hard_science");
PLACEMENT_DECREASE_WIDTH = new KeyBinding("key.placement_decrease_width", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_LEFT, "key.categories.hard_science");
PLACEMENT_INCREASE_HEIGHT = new KeyBinding("key.placement_increase_height", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.SHIFT, Keyboard.KEY_UP, "key.categories.hard_science");
PLACEMENT_DECREASE_HEIGHT = new KeyBinding("key.placement_decrease_height", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.SHIFT, Keyboard.KEY_DOWN, "key.categories.hard_science");
PLACEMENT_INCREASE_DEPTH = new KeyBinding("key.placement_increase_depth", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_UP, "key.categories.hard_science");
PLACEMENT_DECREASE_DEPTH = new KeyBinding("key.placement_decrease_depth", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.NONE, Keyboard.KEY_DOWN, "key.categories.hard_science");
PLACEMENT_UNDO = new KeyBinding("key.placement_undo", ModKeyConflictContext.HOLDING_PLACEMENT_ITEM,
KeyModifier.CONTROL, Keyboard.KEY_Z, "key.categories.hard_science");
PLACEMENT_LAUNCH_BUILD = new KeyBinding("key.placement_launch_build", KeyConflictContext.IN_GAME,
KeyModifier.CONTROL, Keyboard.KEY_L, "key.categories.hard_science");
ClientRegistry.registerKeyBinding(PLACEMENT_HISTORY_FORWARD);
ClientRegistry.registerKeyBinding(PLACEMENT_HISTORY_BACK);
ClientRegistry.registerKeyBinding(PLACEMENT_PREVIEW);
ClientRegistry.registerKeyBinding(PLACEMENT_DISPLAY_GUI);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_FILTER_MODE);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_SPECIES_HANDLING);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_TARGET_MODE);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_BLOCK_ORIENTATION);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_REGION_ORIENTATION);
ClientRegistry.registerKeyBinding(PLACEMENT_UNDO);
ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_WIDTH);
ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_WIDTH);
ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_HEIGHT);
ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_HEIGHT);
ClientRegistry.registerKeyBinding(PLACEMENT_INCREASE_DEPTH);
ClientRegistry.registerKeyBinding(PLACEMENT_DECREASE_DEPTH);
ClientRegistry.registerKeyBinding(PLACEMENT_CYCLE_SELECTION_TARGET);
ClientRegistry.registerKeyBinding(PLACEMENT_LAUNCH_BUILD);
}