Interface GuiInput
public interface GuiInput
Input services for an open GUI.
-
Method Summary
Modifier and TypeMethodDescriptionvoidSends mouse movement todraguntil the button is released.voidvoidcaptureBind(Consumer<Bind> onBind) Waits for the next key or mouse button and passes it toonBind.voidcaptureBind(Consumer<Bind> onBind, Supplier<Rect> area) LikecaptureBind(Consumer), but only a mouse press insideareabecomes the bind.voidPlays the click Boze's own GUI plays when something is pressed.voidendDrag()booleanisButtonDown(int button) booleanbooleanbooleanisKeyDown(int key) voidsetClipboard(String text) voidSets the cursor for this frame.
-
Method Details
-
setCursor
Sets the cursor for this frame. Each frame starts withGuiCursor.DEFAULT. -
clipboard
String clipboard()- Returns:
- Clipboard text, or an empty string
-
setClipboard
-
isKeyDown
boolean isKeyDown(int key) -
isButtonDown
boolean isButtonDown(int button) -
captureBind
-
captureBind
LikecaptureBind(Consumer), but only a mouse press insideareabecomes the bind. A press outside it ends the wait and is handled as a normal click.- Parameters:
area- Where mouse presses bind, read at each press
-
cancelBindCapture
void cancelBindCapture() -
bindName
-
clickSound
void clickSound()Plays the click Boze's own GUI plays when something is pressed. -
isCapturingBind
boolean isCapturingBind() -
beginDrag
Sends mouse movement todraguntil the button is released. -
endDrag
void endDrag() -
isDragging
boolean isDragging()
-