Class ExpressionValueEditor
java.lang.Object
org.cyclops.integrateddynamics.core.logicprogrammer.client.ExpressionValueEditor
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 Summary
ConstructorsConstructorDescriptionExpressionValueEditor(OperatorLPElementRenderPattern pattern, OperatorLPElement element) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(net.minecraft.client.input.CharacterEvent evt) protected static intgetValueFieldWidth(net.minecraft.client.gui.Font font) voidinit(int guiLeft, int guiTop) booleanprotected booleanisTypeSelectorShown(ExpressionEditor editor) booleankeyPressed(ExpressionEditor editor, net.minecraft.client.input.KeyEvent evt) booleanmouseClicked(ExpressionEditor editor, net.minecraft.client.input.MouseButtonEvent evt, boolean isDoubleClick) protected voidvoidrender(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int guiLeft, int guiTop, net.minecraft.client.gui.Font font, ExpressionEditor editor, int mouseX, int mouseY, float partialTicks) voidsetFocused(boolean focused) protected voidsubmit(ExpressionEditor editor) Rename the selected parameter, or set the typed value in the selected slot.voidupdate(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.
-
Constructor Details
-
ExpressionValueEditor
-
-
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
Show the name of the selected parameter, or the value of the selected slot if it can be typed, and hide it otherwise. -
submit
Rename the selected parameter, or set the typed value in the selected slot. -
isTypeSelectorShown
- 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)
-