mirror of https://github.com/FabricMC/yarn.git
Some Screen and ParentElement javadoc (#1801)
* Some Screen and ParentElement javadoc * Apply suggestions from code review Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> * Update mappings/net/minecraft/client/gui/screen/Screen.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Update Screen.mapping Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: YanisBft <doublecraft.official@gmail.com>
This commit is contained in:
parent
c3a623b253
commit
30ce1e3c52
|
@ -1,4 +1,6 @@
|
|||
CLASS net/minecraft/class_4069 net/minecraft/client/gui/ParentElement
|
||||
COMMENT A GUI interface which handles keyboard and mouse callbacks for child GUI elements.
|
||||
COMMENT The implementation of a parent element can decide whether a child element receives keyboard and mouse callbacks.
|
||||
METHOD method_19355 hoveredElement (DD)Ljava/util/Optional;
|
||||
ARG 1 mouseX
|
||||
ARG 3 mouseY
|
||||
|
@ -9,6 +11,7 @@ CLASS net/minecraft/class_4069 net/minecraft/client/gui/ParentElement
|
|||
METHOD method_25395 setFocused (Lnet/minecraft/class_364;)V
|
||||
ARG 1 focused
|
||||
METHOD method_25396 children ()Ljava/util/List;
|
||||
COMMENT Gets a list of all child GUI elements.
|
||||
METHOD method_25397 isDragging ()Z
|
||||
METHOD method_25398 setDragging (Z)V
|
||||
ARG 1 dragging
|
||||
|
|
|
@ -25,6 +25,8 @@ CLASS net/minecraft/class_437 net/minecraft/client/gui/screen/Screen
|
|||
ARG 2 width
|
||||
ARG 3 height
|
||||
METHOD method_25411 addButton (Lnet/minecraft/class_339;)Lnet/minecraft/class_339;
|
||||
COMMENT Adds a button to this screen.
|
||||
COMMENT This method should be preferred over {@link Screen#addChild(Element)} since buttons are automatically rendered when added to a screen.
|
||||
ARG 1 button
|
||||
METHOD method_25412 wrapScreenError (Ljava/lang/Runnable;Ljava/lang/String;Ljava/lang/String;)V
|
||||
ARG 0 task
|
||||
|
@ -58,6 +60,7 @@ CLASS net/minecraft/class_437 net/minecraft/client/gui/screen/Screen
|
|||
ARG 1 matrices
|
||||
METHOD method_25421 isPauseScreen ()Z
|
||||
METHOD method_25422 shouldCloseOnEsc ()Z
|
||||
COMMENT Checks whether this screen should be closed when the escape key is pressed.
|
||||
METHOD method_25423 init (Lnet/minecraft/class_310;II)V
|
||||
ARG 1 client
|
||||
ARG 2 width
|
||||
|
@ -71,11 +74,19 @@ CLASS net/minecraft/class_437 net/minecraft/client/gui/screen/Screen
|
|||
ARG 1 message
|
||||
ARG 2 toHud
|
||||
METHOD method_25426 init ()V
|
||||
COMMENT Called when a screen should be initialized.
|
||||
COMMENT
|
||||
COMMENT <p>This method is called when this screen is {@link MinecraftClient#openScreen(Screen) opened} or resized.
|
||||
METHOD method_25427 sendMessage (Ljava/lang/String;)V
|
||||
ARG 1 message
|
||||
METHOD method_25428 confirmLink (Z)V
|
||||
ARG 1 open
|
||||
METHOD method_25429 addChild (Lnet/minecraft/class_364;)Lnet/minecraft/class_364;
|
||||
COMMENT Adds a child element to this screen.
|
||||
COMMENT If the child element is an {@link net.minecraft.client.gui.widget.AbstractButtonWidget}, you should use {@link Screen#addButton(AbstractButtonWidget)} instead.
|
||||
COMMENT
|
||||
COMMENT <p>Adding a child element to a screen does not guarantee the widget is rendered or ticked.
|
||||
COMMENT @see net.minecraft.client.gui.screen.Screen#addButton(AbstractButtonWidget)
|
||||
ARG 1 child
|
||||
METHOD method_25430 handleTextClick (Lnet/minecraft/class_2583;)Z
|
||||
ARG 1 style
|
||||
|
|
Loading…
Reference in New Issue