From 6733dfe284805d52ecc6496f86f4d9389f41b8d1 Mon Sep 17 00:00:00 2001 From: ye-yu <30603031+ye-yu@users.noreply.github.com> Date: Thu, 24 Sep 2020 18:30:57 +0800 Subject: [PATCH] Add javadoc for the class Element (#1763) * Add javadoc for the class Element * Fix typo in Element javadoc * Move parameter doc into arg comment * Correct typo in isMouseOver Co-authored-by: i509VCB * Remove argument name in argument doc Co-authored-by: YanisBft * Update punctuation on argument doc in Element Co-authored-by: YanisBft * Update punctuation on argument doc in Element - 2 Co-authored-by: YanisBft * Update grammar on argument doc in Element Co-authored-by: YanisBft Co-authored-by: i509VCB Co-authored-by: YanisBft --- .../net/minecraft/client/gui/Element.mapping | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/mappings/net/minecraft/client/gui/Element.mapping b/mappings/net/minecraft/client/gui/Element.mapping index 3d7ff530f9..bf2d238c26 100644 --- a/mappings/net/minecraft/client/gui/Element.mapping +++ b/mappings/net/minecraft/client/gui/Element.mapping @@ -1,38 +1,142 @@ CLASS net/minecraft/class_364 net/minecraft/client/gui/Element + COMMENT Base GUI interface for handling callbacks related to + COMMENT keyboard or mouse actions. + COMMENT + COMMENT Mouse coordinate is bounded by the size of the window in + COMMENT pixels. METHOD method_16014 mouseMoved (DD)V + COMMENT Callback for when a mouse move event has been captured. + COMMENT + COMMENT @see net.minecraft.client.Mouse#onCursorPos ARG 1 mouseX + COMMENT the X coordinate of the mouse ARG 3 mouseY + COMMENT the Y coordinate of the mouse METHOD method_16803 keyReleased (III)Z + COMMENT Callback for when a key down event has been captured. + COMMENT + COMMENT The key code is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Keyboard#onKey(long, int, int, int, int) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_KEY_Q + COMMENT @see org.lwjgl.glfw.GLFWKeyCallbackI#invoke(long, int, int, int, int) ARG 1 keyCode + COMMENT the named key code of the event as described in the {@link org.lwjgl.glfw.GLFW GLFW} class ARG 2 scanCode + COMMENT the unique/platform-specific scan code of the keyboard input ARG 3 modifiers + COMMENT a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags}) METHOD method_25400 charTyped (CI)Z + COMMENT Callback for when a character input has been captured. + COMMENT + COMMENT The key code is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Keyboard#onChar(long, int, int) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_KEY_Q + COMMENT @see org.lwjgl.glfw.GLFWKeyCallbackI#invoke(long, int, int, int, int) ARG 1 chr + COMMENT the captured character ARG 2 keyCode + COMMENT the associated key code METHOD method_25401 mouseScrolled (DDD)Z + COMMENT Callback for when a mouse button scroll event + COMMENT has been captured. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Mouse#onMouseScroll(long, double, double) ARG 1 mouseX + COMMENT the X coordinate of the mouse ARG 3 mouseY + COMMENT the Y coordinate of the mouse ARG 5 amount + COMMENT value is {@code > 1} if scrolled down, {@code < 1} if scrolled up METHOD method_25402 mouseClicked (DDI)Z + COMMENT Callback for when a mouse button down event + COMMENT has been captured. + COMMENT + COMMENT The button number is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Mouse#onMouseButton(long, int, int, int) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_1 ARG 1 mouseX + COMMENT the X coordinate of the mouse ARG 3 mouseY + COMMENT the Y coordinate of the mouse ARG 5 button + COMMENT the mouse button number METHOD method_25403 mouseDragged (DDIDD)Z + COMMENT Callback for when a mouse button drag event + COMMENT has been captured. + COMMENT + COMMENT The button number is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Mouse#onCursorPos(long, double, double) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_1 ARG 1 mouseX + COMMENT the current X coordinate of the mouse ARG 3 mouseY + COMMENT the current Y coordinate of the mouse ARG 5 button + COMMENT the mouse button number ARG 6 deltaX + COMMENT the difference of the current X with the previous X coordinate ARG 8 deltaY + COMMENT the difference of the current Y with the previous Y coordinate METHOD method_25404 keyPressed (III)Z + COMMENT Callback for when a key down event has been captured. + COMMENT + COMMENT The key code is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Keyboard#onKey(long, int, int, int, int) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_KEY_Q + COMMENT @see org.lwjgl.glfw.GLFWKeyCallbackI#invoke(long, int, int, int, int) ARG 1 keyCode + COMMENT the named key code of the event as described in the {@link org.lwjgl.glfw.GLFW GLFW} class ARG 2 scanCode + COMMENT the unique/platform-specific scan code of the keyboard input ARG 3 modifiers + COMMENT a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags}) METHOD method_25405 isMouseOver (DD)Z + COMMENT Checks if the mouse position is within the bound + COMMENT of the element. + COMMENT + COMMENT @return {@code true} if the mouse is within the bound of the element, otherwise {@code false} ARG 1 mouseX + COMMENT the X coordinate of the mouse ARG 3 mouseY + COMMENT the Y coordinate of the mouse METHOD method_25406 mouseReleased (DDI)Z + COMMENT Callback for when a mouse button release event + COMMENT has been captured. + COMMENT + COMMENT The button number is identified by the constants in + COMMENT {@link org.lwjgl.glfw.GLFW GLFW} class. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid + COMMENT @see net.minecraft.client.Mouse#onMouseButton(long, int, int, int) + COMMENT @see org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_1 ARG 1 mouseX + COMMENT the X coordinate of the mouse ARG 3 mouseY + COMMENT the Y coordinate of the mouse ARG 5 button + COMMENT the mouse button number METHOD method_25407 changeFocus (Z)Z + COMMENT Changes the focusing element by cycling to the next/previous element. + COMMENT + COMMENT This action is done typically when the user has pressed the 'Tab' or 'Ctrl+Tab' + COMMENT key. + COMMENT + COMMENT @return {@code true} to indicate that the event handling is successful/valid ARG 1 lookForwards + COMMENT {@code true} to cycle forwards, otherwise cycle backwards