diff --git a/mappings/net/minecraft/client/gui/widget/AbstractPressableButtonWidget.mapping b/mappings/net/minecraft/client/gui/widget/AbstractPressableButtonWidget.mapping deleted file mode 100644 index 4e632d940b..0000000000 --- a/mappings/net/minecraft/client/gui/widget/AbstractPressableButtonWidget.mapping +++ /dev/null @@ -1,2 +0,0 @@ -CLASS net/minecraft/class_4264 net/minecraft/client/gui/widget/AbstractPressableButtonWidget - METHOD method_25306 onPress ()V diff --git a/mappings/net/minecraft/client/gui/widget/AbstractButtonWidget.mapping b/mappings/net/minecraft/client/gui/widget/ClickableWidget.mapping similarity index 77% rename from mappings/net/minecraft/client/gui/widget/AbstractButtonWidget.mapping rename to mappings/net/minecraft/client/gui/widget/ClickableWidget.mapping index 60ea33ca49..a926189836 100644 --- a/mappings/net/minecraft/client/gui/widget/AbstractButtonWidget.mapping +++ b/mappings/net/minecraft/client/gui/widget/ClickableWidget.mapping @@ -1,8 +1,11 @@ -CLASS net/minecraft/class_339 net/minecraft/client/gui/widget/AbstractButtonWidget +CLASS net/minecraft/class_339 net/minecraft/client/gui/widget/ClickableWidget + COMMENT A clickable widget is a GUI element that has many methods to handle different + COMMENT mouse actions. In addition, it allows a message to be rendered on the widget + COMMENT and narrated when the widget is selected. FIELD field_22754 message Lnet/minecraft/class_2561; FIELD field_22755 wasHovered Z FIELD field_22756 focused Z - FIELD field_22757 WIDGETS_LOCATION Lnet/minecraft/class_2960; + FIELD field_22757 WIDGETS_TEXTURE Lnet/minecraft/class_2960; FIELD field_22758 width I FIELD field_22759 height I FIELD field_22760 x I @@ -12,6 +15,8 @@ CLASS net/minecraft/class_339 net/minecraft/client/gui/widget/AbstractButtonWidg FIELD field_22764 visible Z FIELD field_22765 alpha F FIELD field_22766 nextNarration J + FIELD field_32175 UNFOCUSED_NARRATION_DELAY I + FIELD field_32176 FOCUSED_NARRATION_DELAY I METHOD (IIIILnet/minecraft/class_2561;)V ARG 1 x ARG 2 y @@ -34,7 +39,7 @@ CLASS net/minecraft/class_339 net/minecraft/client/gui/widget/AbstractButtonWidg ARG 1 matrices ARG 2 mouseX ARG 3 mouseY - METHOD method_25353 renderBg (Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)V + METHOD method_25353 renderBackground (Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)V ARG 1 matrices ARG 2 client ARG 3 mouseX @@ -62,6 +67,7 @@ CLASS net/minecraft/class_339 net/minecraft/client/gui/widget/AbstractButtonWidg METHOD method_25362 queueNarration (I)V ARG 1 delay METHOD method_25363 onFocusedChanged (Z)V + ARG 1 newFocused METHOD method_25364 getHeight ()I METHOD method_25365 setFocused (Z)V ARG 1 focused diff --git a/mappings/net/minecraft/client/gui/widget/PressableWidget.mapping b/mappings/net/minecraft/client/gui/widget/PressableWidget.mapping new file mode 100644 index 0000000000..77524be225 --- /dev/null +++ b/mappings/net/minecraft/client/gui/widget/PressableWidget.mapping @@ -0,0 +1,4 @@ +CLASS net/minecraft/class_4264 net/minecraft/client/gui/widget/PressableWidget + COMMENT A pressable widget has a press action. It is pressed when it is clicked. It is + COMMENT also pressed when enter or space keys are pressed when it is selected. + METHOD method_25306 onPress ()V diff --git a/unpick-definitions/gui_widget.unpick b/unpick-definitions/gui_widget.unpick new file mode 100644 index 0000000000..9c9c17ba03 --- /dev/null +++ b/unpick-definitions/gui_widget.unpick @@ -0,0 +1,7 @@ +v2 + +constant clickable_widget_narration_delay net/minecraft/client/gui/widget/ClickableWidget FOCUSED_NARRATION_DELAY +constant clickable_widget_narration_delay net/minecraft/client/gui/widget/ClickableWidget UNFOCUSED_NARRATION_DELAY + +target_method net/minecraft/client/gui/widget/ClickableWidget queueNarration (I)V + param 0 clickable_widget_narration_delay