Class ExpressionValueEditor

java.lang.Object
org.cyclops.integrateddynamics.core.logicprogrammer.client.ExpressionValueEditor

public class ExpressionValueEditor extends Object
The row below the slots, to type the value of the selected slot, or the name of the selected parameter next to its type.
  • Constructor Details

  • Method Details

    • getValueFieldWidth

      protected static int getValueFieldWidth(net.minecraft.client.gui.Font font)
      Parameters:
      font - The font.
      Returns:
      The width of the value field, which fills the row up to the type of a parameter, as wide as the widest type name.
    • init

      public void init(int guiLeft, int guiTop)
    • isFocused

      public boolean isFocused()
    • setFocused

      public void setFocused(boolean focused)
    • update

      public void update(@Nullable ExpressionEditor editor)
      Show the name of the selected parameter, or the value of the selected slot if it can be typed, and hide it otherwise.
    • submit

      protected void submit(ExpressionEditor editor)
      Rename the selected parameter, or set the typed value in the selected slot.
    • isTypeSelectorShown

      protected boolean isTypeSelectorShown(@Nullable ExpressionEditor editor)
      Returns:
      If the type of the selected parameter is shown right of its name.
    • onTypeSelected

      protected void onTypeSelected()
    • mouseClicked

      public boolean mouseClicked(@Nullable ExpressionEditor editor, net.minecraft.client.input.MouseButtonEvent evt, boolean isDoubleClick)
    • charTyped

      public boolean charTyped(net.minecraft.client.input.CharacterEvent evt)
    • keyPressed

      public boolean keyPressed(@Nullable ExpressionEditor editor, net.minecraft.client.input.KeyEvent evt)
    • render

      public void render(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int guiLeft, int guiTop, net.minecraft.client.gui.Font font, ExpressionEditor editor, int mouseX, int mouseY, float partialTicks)