diff --git a/libgui/allclasses-index.html b/libgui/allclasses-index.html index 1934740..82b9554 100644 --- a/libgui/allclasses-index.html +++ b/libgui/allclasses-index.html @@ -1,352 +1,353 @@ - - - - -All Classes and Interfaces (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

All Classes and Interfaces

-
-
-
-
-
-
Class
-
Description
- -
 
- -
-
Background painters are used to paint the background of a widget.
-
- -
 
- -
 
- -
 
- -
 
- -
 
- -
-
Manages widgets that are painted on the in-game HUD.
-
- -
-
Positioners can be used to change the position of a widget based on the window dimensions.
-
- -
-
A screen for a SyncedGuiDescription.
-
- -
-
An empty inventory that cannot hold any items.
-
- -
-
A focus is a focusable area in a widget.
-
- -
-
Manages the state of individual foci in a widget.
-
- -
-
A GUI description represents a GUI without depending on screens.
-
- -
 
- -
-
A square icon for a widget such as a button.
-
- -
-
Specifies whether an input event was ignored or processed.
-
- -
-
The layout insets of a panel.
-
- -
-
An icon that draws an item stack.
-
- - - -
-
This class provides access to LibGui configuration and other global data.
-
- -
-
A GuiDescription without any associated Minecraft classes
-
- -
-
The sides of a network connection.
-
- -
-
Nine-patch background painters paint rectangles using a special nine-patch texture.
-
- -
-
An observable mutable property.
-
- -
-
A builder for properties.
-
- -
-
A read-only observable property.
-
- -
-
A listener for changes in observable views and properties.
-
- -
-
This interface can be implemented on block entity classes - for providing a property delegate.
-
- -
-
An immutable, two-dimensional int rectangle consisting of a position and dimensions.
-
- -
-
Contains a stack for GL scissors for restricting the drawn area of a widget.
-
- -
-
A single scissor frame in the stack.
-
- -
-
ScreenDrawing contains utility methods for drawing contents on a screen.
-
- -
-
ScreenNetworking handles screen-related network messages sent between the server and the client.
-
- -
-
A handler for received screen messages.
-
- -
-
A FocusModel implementation that wraps a List of foci.
-
- -
-
A builder for SimpleKeyedFocusModel.
-
- -
-
A screen handler-based GUI description for GUIs with slots.
-
- -
-
Represents a texture for a widget.
-
- -
-
An icon that draws a texture.
-
- -
-
A builder for widget tooltips.
-
- -
 
- -
-
An immutable, two-dimensional int vector.
-
- -
 
- -
-
A base class for slider widgets that can be used to select int values.
-
- -
-
The direction enum represents all four directions a slider can face.
-
- -
-
A bar that displays int values from a PropertyDelegate.
-
- -
-
The direction of a WBar, representing where the bar will - grown when its field increases.
-
- -
-
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
-
- -
 
- -
-
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
-
- -
-
A panel that is clipped to only render widgets inside its bounds.
-
- -
-
Dynamic labels are labels that pull their text from a Supplier<String>.
-
- -
-
A panel that positions children in a grid.
-
- -
-
A widget that displays an item or a list of items.
-
- -
-
A widget that displays an item that can be interacted with.
-
- -
-
A listener for changes in an item slot.
-
- -
-
A single-line label widget.
-
- -
-
A vanilla-style labeled slider widget.
-
- -
-
A label updater updates the label of a slider based on the current value.
-
- -
-
Similar to the RecyclerView in Android, this widget represents a scrollable list of items.
-
- -
-
Panels are widgets that contain other widgets.
-
- -
-
A panel that has layout insets.
-
- -
-
A panel that positions children by pixel-perfect positions.
-
- -
-
A player inventory widget that has a visually separate hotbar.
-
- -
 
- -
-
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
-
- -
-
A simple slider widget that can be used to select int values.
-
- -
 
- -
-
A panel that contains creative inventory-style tabs on the top.
-
- -
-
The data of a tab.
-
- -
-
A builder for tab data.
-
- -
-
A multiline label widget.
-
- -
 
- -
-
A sprite whose texture will be tiled.
-
- -
 
- -
-
The base class for all widgets.
-
-
-
-
-
-
-
- - + + + + +All Classes and Interfaces (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
 
+ +
+
Background painters are used to paint the background of a widget.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Manages widgets that are painted on the in-game HUD.
+
+ +
+
Positioners can be used to change the position of a widget based on the window dimensions.
+
+ +
+
A screen for a SyncedGuiDescription.
+
+ +
+
An empty inventory that cannot hold any items.
+
+ +
+
A focus is a focusable area in a widget.
+
+ +
+
Manages the state of individual foci in a widget.
+
+ +
+
A GUI description represents a GUI without depending on screens.
+
+ +
 
+ +
+
A square icon for a widget such as a button.
+
+ +
+
Specifies whether an input event was ignored or processed.
+
+ +
+
The layout insets of a panel.
+
+ +
+
An icon that draws an item stack.
+
+ + + +
+
This class provides access to LibGui configuration and other global data.
+
+ +
+
A GuiDescription without any associated Minecraft classes
+
+ +
+
The sides of a network connection.
+
+ +
+
Nine-patch background painters paint rectangles using a special nine-patch texture.
+
+ +
+
An observable mutable property.
+
+ +
+
A builder for properties.
+
+ +
+
A read-only observable property.
+
+ +
+
A listener for changes in observable views and properties.
+
+ +
+
This interface can be implemented on block entity classes + for providing a property delegate.
+
+ +
+
An immutable, two-dimensional int rectangle consisting of a position and dimensions.
+
+ +
+
Contains a stack for GL scissors for restricting the drawn area of a widget.
+
+ +
+
A single scissor frame in the stack.
+
+ +
+
ScreenDrawing contains utility methods for drawing contents on a screen.
+
+ +
+
ScreenNetworking handles screen-related network messages sent between the server and the client.
+
+ +
+
A handler for received screen messages.
+
+ +
+
A FocusModel implementation that wraps a List of foci.
+
+ +
+
A builder for SimpleKeyedFocusModel.
+
+ +
+
A screen handler-based GUI description for GUIs with slots.
+
+ +
+
Represents a texture for a widget.
+
+ +
+
An icon that draws a texture.
+
+ +
+
A builder for widget tooltips.
+
+ +
 
+ +
+
An immutable, two-dimensional int vector.
+
+ +
 
+ +
+
A base class for slider widgets that can be used to select int values.
+
+ +
+
The direction enum represents all four directions a slider can face.
+
+ +
+
A bar that displays int values from a PropertyDelegate.
+
+ +
+
The direction of a WBar, representing where the bar will + grown when its field increases.
+
+ +
+
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
+
+ +
 
+ +
+
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
+
+ +
+
A panel that is clipped to only render widgets inside its bounds.
+
+ +
+
Dynamic labels are labels that pull their text from a Supplier<String>.
+
+ +
+
A panel that positions children in a grid.
+
+ +
+
A widget that displays an item or a list of items.
+
+ +
+
A widget that displays an item that can be interacted with.
+
+ +
+
A listener for changes in an item slot.
+
+ +
+
A single-line label widget.
+
+ +
+
A vanilla-style labeled slider widget.
+
+ +
+
A label updater updates the label of a slider based on the current value.
+
+ +
+
Similar to the RecyclerView in Android, this widget represents a scrollable list of items.
+
+ +
+
Panels are widgets that contain other widgets.
+
+ +
+
A panel that has layout insets.
+
+ +
+
A panel that positions children by pixel-perfect positions.
+
+ +
+
A player inventory widget that has a visually separate hotbar.
+
+ +
 
+ +
+
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
+
+ +
+
A simple slider widget that can be used to select int values.
+
+ +
 
+ +
+
A panel that contains creative inventory-style tabs on the top.
+
+ +
+
The data of a tab.
+
+ +
+
A builder for tab data.
+
+ +
+
A multiline label widget.
+
+ +
 
+ +
+
A sprite whose texture will be tiled.
+
+ +
 
+ +
+
The base class for all widgets.
+
+
+
+
+
+
+
+ + diff --git a/libgui/allpackages-index.html b/libgui/allpackages-index.html index 2507a02..f8609ea 100644 --- a/libgui/allpackages-index.html +++ b/libgui/allpackages-index.html @@ -1,89 +1,90 @@ - - - - -All Packages (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

All Packages

-
-
Package Summary
-
-
Package
-
Description
- -
-
Basic GUI classes and server-side GUI descriptions.
-
- -
-
Client-side APIs for rendering GUIs and configuring LibGui.
-
- -
-
Screen networking helpers.
-
- -
-
Widgets for building GUIs.
-
- -
-
Data classes used by widgets.
-
- -
-
The widget focus API.
-
- -
-
The icon API for displaying various icons on widgets.
-
-
-
-
-
- - + + + + +All Packages (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
+
Basic GUI classes and server-side GUI descriptions.
+
+ +
+
Client-side APIs for rendering GUIs and configuring LibGui.
+
+ +
+
Screen networking helpers.
+
+ +
+
Widgets for building GUIs.
+
+ +
+
Data classes used by widgets.
+
+ +
+
The widget focus API.
+
+ +
+
The icon API for displaying various icons on widgets.
+
+
+
+
+
+ + diff --git a/libgui/constant-values.html b/libgui/constant-values.html index a74d05d..24b5224 100644 --- a/libgui/constant-values.html +++ b/libgui/constant-values.html @@ -1,129 +1,130 @@ - - - - -Constant Field Values (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Constant Field Values

-
-

Contents

- -
-
-
-

io.github.*

- -
-
-
-
- - + + + + +Constant Field Values (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

io.github.*

+ +
+
+
+
+ + diff --git a/libgui/deprecated-list.html b/libgui/deprecated-list.html new file mode 100644 index 0000000..bcf3fef --- /dev/null +++ b/libgui/deprecated-list.html @@ -0,0 +1,116 @@ + + + + +Deprecated List (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+ +
+ + +
+
+
+ + diff --git a/libgui/element-list b/libgui/element-list index 310fe3e..317ed39 100644 --- a/libgui/element-list +++ b/libgui/element-list @@ -1,7 +1,7 @@ -io.github.cottonmc.cotton.gui -io.github.cottonmc.cotton.gui.client -io.github.cottonmc.cotton.gui.networking -io.github.cottonmc.cotton.gui.widget -io.github.cottonmc.cotton.gui.widget.data -io.github.cottonmc.cotton.gui.widget.focus -io.github.cottonmc.cotton.gui.widget.icon +io.github.cottonmc.cotton.gui +io.github.cottonmc.cotton.gui.client +io.github.cottonmc.cotton.gui.networking +io.github.cottonmc.cotton.gui.widget +io.github.cottonmc.cotton.gui.widget.data +io.github.cottonmc.cotton.gui.widget.focus +io.github.cottonmc.cotton.gui.widget.icon diff --git a/libgui/help-doc.html b/libgui/help-doc.html index b1608f1..5221213 100644 --- a/libgui/help-doc.html +++ b/libgui/help-doc.html @@ -1,180 +1,186 @@ - - - - -API Help (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-

JavaDoc Help

- -
-
-

Navigation

-Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces - -
-
-
-

Kinds of Pages

-The following sections describe the different kinds of pages in this collection. -
-

Overview

-

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

-
-
-

Package

-

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

-
    -
  • Interfaces
  • -
  • Classes
  • -
  • Enum Classes
  • -
  • Exceptions
  • -
  • Errors
  • -
  • Annotation Interfaces
  • -
-
-
-

Class or Interface

-

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

-
    -
  • Class Inheritance Diagram
  • -
  • Direct Subclasses
  • -
  • All Known Subinterfaces
  • -
  • All Known Implementing Classes
  • -
  • Class or Interface Declaration
  • -
  • Class or Interface Description
  • -
-
-
    -
  • Nested Class Summary
  • -
  • Enum Constant Summary
  • -
  • Field Summary
  • -
  • Property Summary
  • -
  • Constructor Summary
  • -
  • Method Summary
  • -
  • Required Element Summary
  • -
  • Optional Element Summary
  • -
-
-
    -
  • Enum Constant Details
  • -
  • Field Details
  • -
  • Property Details
  • -
  • Constructor Details
  • -
  • Method Details
  • -
  • Element Details
  • -
-

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

-

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

-
-
-

Other Files

-

Packages and modules may contain pages with additional information related to the declarations nearby.

-
-
-

Tree (Class Hierarchy)

-

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

-
    -
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • -
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • -
-
-
-

Constant Field Values

-

The Constant Field Values page lists the static final fields and their values.

-
-
-

All Packages

-

The All Packages page contains an alphabetic index of all packages contained in the documentation.

-
-
-

All Classes and Interfaces

-

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

-
-
-

Index

-

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

-
-
-
-This help file applies to API documentation generated by the standard doclet.
-
-
- - + + + + +API Help (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Deprecated API

+

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/libgui/index-all.html b/libgui/index-all.html index 55dc2fc..1b0e9fe 100644 --- a/libgui/index-all.html +++ b/libgui/index-all.html @@ -1,3391 +1,3446 @@ - - - - -Index (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Index

-
-A B C D E F G H I K L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values -

A

-
-
add(int, WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Adds a card to this panel without resizing it.
-
-
add(int, WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Adds a card to this panel and resizes it.
-
-
add(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
-
-
Adds a focus to this builder.
-
-
add(WTabPanel.Tab) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Adds a tab to this panel.
-
-
add(WWidget) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Adds a new widget to the HUD.
-
-
add(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Adds a widget to this box.
-
-
add(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Adds a card to this panel without resizing it.
-
-
add(WWidget, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Adds a new widget to the HUD at the specified offsets.
-
-
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Adds a widget to this box.
-
-
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Adds a card to this panel and resizes it.
-
-
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
Adds a widget to this panel.
-
-
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
-
-
Adds a new widget to this panel.
-
-
add(WWidget, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Adds a new widget to the HUD at the specified offsets and resizes it.
-
-
add(WWidget, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
Adds a widget to this panel and resizes it to a custom size.
-
-
add(WWidget, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
-
-
Adds a new widget to this panel and resizes it to a custom size.
-
-
add(WWidget, CottonHud.Positioner) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Adds a new widget to the HUD with a custom positioner.
-
-
add(WWidget, CottonHud.Positioner, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Adds a new widget to the HUD with a custom positioner and resizes it.
-
-
add(WWidget, Consumer<WTabPanel.Tab.Builder>) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Configures and adds a tab to this panel.
-
-
add(K, Rect2i) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
-
-
Adds a focus to this builder.
-
-
add(OrderedText...) - Method in class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
-
-
Adds the lines to this builder.
-
-
add(Text...) - Method in class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
-
-
Adds the lines to this builder.
-
-
addAll(Collection<Focus<K>>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
-
-
Adds foci from a collection to this builder.
-
-
addChangeListener(WItemSlot.ChangeListener) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Adds a change listener to this slot.
-
-
addChangeListener(WItemSlot, WItemSlot.ChangeListener) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Adds a change listener to this slot.
-
-
addElementNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
addElementNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
addListener(ObservableView.ChangeListener<? super T>) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
 
-
addListener(ObservableView.ChangeListener<? super T>) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Adds a change listener to this property view.
-
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Adds the narrations of this widget to a narration builder.
-
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
addPainters() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Guis should use this method to add clientside styles and BackgroundPainters to their controls
-
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
 
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Adds the default background painters to this widget and all children.
-
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
 
-
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Adds the default background painters to this widget and all children.
-
-
addSlotPeer(ValidatedSlot) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
addSlotPeer(ValidatedSlot) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Typical users won't call this.
-
-
addSlotPeer(ValidatedSlot) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
-
-
Adds this widget's tooltip to the tooltip builder.
-
-
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Adds lines to this widget's tooltip.
-
-
adjustSlider(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
alignment - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
alignment - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
anchor - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
anchorValue - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
area() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Returns the value of the area record component.
-
-
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
The axis that the widgets are laid out on.
-
-
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
Axis - Enum Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
-

B

-
-
BackgroundPainter - Interface in io.github.cottonmc.cotton.gui.client
-
-
Background painters are used to paint the background of a widget.
-
-
bar - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The bar texture.
-
-
bg - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The background texture.
-
-
BLACK - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
BLACK_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
blockInventory - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
BLUE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
BLUE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
bottom() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns the value of the bottom record component.
-
-
BOTTOM - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
 
-
BROWN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
build() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
-
-
Builds the observable property.
-
-
build() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
-
-
Builds a new SimpleKeyedFocusModel from the data in this builder.
-
-
build() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Builds a tab from this builder.
-
-
builder() - Static method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
-
Creates a builder for SimpleKeyedFocusModel.
-
-
Builder(WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Constructs a new tab data builder.
-
-
-

C

-
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Tests whether this widget can have the focus in the GUI.
-
-
canHover() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Tests whether this widget receives mouse hovering status.
-
-
canInsert(ItemStack) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
canPlayerUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Checks whether this widget can be resized using setSize(int, int).
-
-
canTakeItems(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
canUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
-
canUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
cellHeight - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
The height of each child cell.
-
-
CENTER - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
 
-
CENTER - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
 
-
charTyped(char, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
charTyped(char, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
checkValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Checks that the current value is in the correct range - and adjusts it if needed.
-
-
children - Variable in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
The widgets contained within this panel.
-
-
choose(T, T) - Method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
-
-
Chooses a value based on this axis.
-
-
clear() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
CLIENT - Enum constant in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
-
-
The logical client.
-
-
close() - Method in class io.github.cottonmc.cotton.gui.client.Scissors.Frame
-
-
Pops this frame from the stack.
-
-
color - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
color - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
color - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
color - Variable in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
color - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
Color - Interface in io.github.cottonmc.cotton.gui.widget.data
-
 
-
Color.HSL - Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
Color.LCH - Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
Color.RGB - Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
colorAtOpacity(int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
 
-
coloredRect(DrawContext, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws an untextured rectangle of the specified RGB color.
-
-
configurator - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
The widget configurator that configures the passed widget - to display the passed data.
-
-
configured - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
coordToValueRatio - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
A coordinate:value ratio.
-
-
CottonClientScreen - Class in io.github.cottonmc.cotton.gui.client
-
 
-
CottonClientScreen(GuiDescription) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
CottonClientScreen(Text, GuiDescription) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
CottonHud - Class in io.github.cottonmc.cotton.gui.client
-
-
Manages widgets that are painted on the in-game HUD.
-
-
CottonHud() - Constructor for class io.github.cottonmc.cotton.gui.client.CottonHud
-
 
-
CottonHud.Positioner - Interface in io.github.cottonmc.cotton.gui.client
-
-
Positioners can be used to change the position of a widget based on the window dimensions.
-
-
CottonInventoryScreen<T extends SyncedGuiDescription> - Class in io.github.cottonmc.cotton.gui.client
-
-
A screen for a SyncedGuiDescription.
-
-
CottonInventoryScreen(T, PlayerEntity) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
-
Constructs a new screen without a title.
-
-
CottonInventoryScreen(T, PlayerEntity, Text) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
-
Constructs a new screen.
-
-
CottonInventoryScreen(T, PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
-
Constructs a new screen without a title.
-
-
CottonInventoryScreen(T, PlayerInventory, Text) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
-
Constructs a new screen.
-
-
createColorful(int) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Creates a colorful gui panel painter.
-
-
createColorful(int, float) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Creates a colorful gui panel painter that has a custom contrast between the shadows and highlights.
-
-
createInventoryLabel(PlayerInventory) - Static method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
-
Creates a vanilla-style inventory label for a player inventory.
-
-
createLightDarkVariants(BackgroundPainter, BackgroundPainter) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Creates a background painter that uses either the light or the dark background painter - depending on the current setting.
-
-
createNinePatch(Texture, Consumer<NinePatch.Builder<Identifier>>) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Creates a new nine-patch background painter with a custom configuration.
-
-
createNinePatch(Identifier) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Creates a new nine-patch background painter.
-
-
createPlayerInventoryPanel() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Creates a player inventory widget from this panel's player inventory.
-
-
createPlayerInventoryPanel(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Creates a player inventory widget from this panel's player inventory.
-
-
createPlayerInventoryPanel(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Creates a player inventory widget from this panel's player inventory.
-
-
createSlotPeer(Inventory, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Creates a slot peer for this slot widget.
-
-
currentFrame - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
currentFrameTime - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
CURSOR_HEIGHT - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
CURSOR_PADDING_Y - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
CYAN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
-

D

-
-
DARK_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
darkmodeTitleColor - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
darkTitleColor - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
data - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
The list of data that this list represents.
-
-
DEFAULT_DARKMODE_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
DEFAULT_DARKMODE_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
The default text color for dark mode labels.
-
-
DEFAULT_FOCUS_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
DEFAULT_ITEM_FILTER - Static variable in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
The default item filter that allows all items.
-
-
DEFAULT_OFF_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
DEFAULT_ON_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
DEFAULT_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
DEFAULT_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
The default text color for light mode labels.
-
-
description - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
description - Variable in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
direction - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
direction - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The direction of this bar, representing where the bar will grow - when the field increases.
-
-
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Disables separate dark mode coloring by copying the dark color to be the light color.
-
-
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Disables separate dark mode coloring by copying the dark color to be the light color.
-
-
DOWN - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
 
-
DOWN - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
 
-
dragging - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
True if the user is currently dragging the thumb.
-
-
drawBackground(DrawContext, float, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
drawBeveledPanel(DrawContext, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a default-sized recessed itemslot panel
-
-
drawBeveledPanel(DrawContext, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a default-color recessed itemslot panel of variable size
-
-
drawBeveledPanel(DrawContext, int, int, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a generalized-case beveled panel.
-
-
drawForeground(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
drawGuiPanel(DrawContext, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
-
-
drawGuiPanel(DrawContext, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
-
-
drawGuiPanel(DrawContext, int, int, int, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
-
-
drawString(DrawContext, String, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a left-aligned string.
-
-
drawString(DrawContext, String, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a string with a custom alignment.
-
-
drawString(DrawContext, OrderedText, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a left-aligned text component.
-
-
drawString(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a text component with a custom alignment.
-
-
drawStringWithShadow(DrawContext, String, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a shadowed string.
-
-
drawStringWithShadow(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a shadowed text component.
-
-
drawTextHover(DrawContext, Style, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws the text hover effects for a text style.
-
-
DYE_COLORS - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
-

E

-
-
empty() - Static method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
-
Creates a "late init" property without an initial value.
-
-
EmptyInventory - Class in io.github.cottonmc.cotton.gui
-
-
An empty inventory that cannot hold any items.
-
-
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Indicates whether some other object is "equal to" this one.
-
-
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Indicates whether some other object is "equal to" this one.
-
-
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Indicates whether some other object is "equal to" this one.
-
-
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Indicates whether some other object is "equal to" this one.
-
-
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Indicates whether some other object is "equal to" this one.
-
-
expandToFit(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Expands this panel be at least as large as the widget.
-
-
expandToFit(WWidget, Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Expands this panel be at least as large as the widget.
-
-
-

F

-
-
field - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The ID of the displayed property in the WBar.properties.
-
-
find() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
-
-
fixedHeight - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
Whether this list has a fixed height for items.
-
-
foci() - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
-
-
Returns a stream of all foci in the target widget.
-
-
foci() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
 
-
focus - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
focus - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
Focus<K> - Record Class in io.github.cottonmc.cotton.gui.widget.focus
-
-
A focus is a focusable area in a widget.
-
-
Focus(K, Rect2i) - Constructor for record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Creates an instance of a Focus record class.
-
-
focusImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
FocusModel<K> - Interface in io.github.cottonmc.cotton.gui.widget.focus
-
-
Manages the state of individual foci in a widget.
-
-
frames - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
frameTime - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
fullscreen - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
fullscreen - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
-

G

-
-
get() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
 
-
get() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Returns the value of this property.
-
-
getA() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
getAbsoluteX() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the absolute X coordinate of this widget.
-
-
getAbsoluteY() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the absolute Y coordinate of this widget.
-
-
getAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
getAxis() - Method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
-
Gets the direction's axis.
-
-
getAxis() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getAxis() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Gets the axis of this box.
-
-
getB() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Gets this slot widget's background painter.
-
-
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Gets the current BackgroundPainter of this panel.
-
-
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
getBlockInventory(ScreenHandlerContext) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the block inventory at the context.
-
-
getBlockInventory(ScreenHandlerContext, int) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the block inventory at the context.
-
-
getBlockPropertyDelegate(ScreenHandlerContext) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the property delegate at the context.
-
-
getBlockPropertyDelegate(ScreenHandlerContext, int) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the property delegate at the context.
-
-
getBottomPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
getCardCount() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Gets the number of cards in this panel.
-
-
getCaretPosition(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
getChroma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
 
-
getChroma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the chroma value, which is related to the length of the vector in projected (hexagonal) space.
-
-
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Gets the color tint of the texture.
-
-
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the light mode color of this label.
-
-
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the light mode color of this label.
-
-
getCursor() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
getDarkmodeColor() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the dark mode color of this label.
-
-
getDarkmodeColor() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the dark mode color of this label.
-
-
getDescription() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
getDescription() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
getDirection() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Gets the direction of this slider.
-
-
getDraggingFinishedListener() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getDuration() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
-
Returns the animation duration of this WItem.
-
-
getFilter() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Gets the item stack filter of this slot.
-
-
getFilter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Gets the item filter of this item slot.
-
-
getFocus() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getFocus() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets the currently-focused WWidget.
-
-
getFocus() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getFocusedKey() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
-
Returns the focused key, or null if not available.
-
-
getFocusedSlot() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Gets the currently focused slot index.
-
-
getFocusImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getFocusModel() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
getFocusModel() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Returns the focus model of this widget.
-
-
getG() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
getHandlePosition() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
getHandleSize() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Gets the on-axis size of the scrollbar handle in gui pixels
-
-
getHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
getHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
 
-
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Gets the horizontal alignment of this box.
-
-
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the horizontal text alignment of this label.
-
-
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the horizontal alignment of this text widget.
-
-
getHost() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the host of this widget.
-
-
getHSLSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the saturation for this color based on chrominance and HSL luma.
-
-
getHSVSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the saturation for this color based on chrominance and HSV Value
-
-
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
 
-
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the HSV/HSL Hue, which is the angle around the color hexagon (or circle)
-
-
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Gets the icon of this button.
-
-
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Returns the icon if set, otherwise null.
-
-
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
-
-
Gets the icon of this tab.
-
-
getIconSize() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Gets the current height / width of the icon.
-
-
getInsets() - Method in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
-
-
Gets the layout insets of this panel.
-
-
getInventoryIndex() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Gets the index of this slot in its inventory.
-
-
getItems() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Gets the current label of this slider.
-
-
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getLabelAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Gets the text alignment of this slider's label.
-
-
getLabelUpdater() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Gets the WLabeledSlider.LabelUpdater of this slider.
-
-
getLastResponder() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
getLastResponder() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
getLeftPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
getLightness() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the HSL Lightness, or average light intensity, of this color
-
-
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
 
-
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the HSL Luma, or perceptual brightness, of this color
-
-
getMaxLength() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
getMaxScrollValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Gets the maximum scroll value achievable; this will typically be the maximum value minus the - window size
-
-
getMaxValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getMaxValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
getMinValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getMovableDistance() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Gets the number of pixels the scrollbar handle is able to move along its track from one end to the other.
-
-
getName() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
-
Returns the name of this property.
-
-
getNarrationName() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Returns a "narration name" for this slot.
-
-
getNetworkSide() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the network side this GUI description runs on.
-
-
getOffImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getOnClick() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Gets the click handler of this button.
-
-
getOnImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getOnToggle() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getOpacity() - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Gets the opacity of the texture.
-
-
getOrNull() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Returns the value of this property, or null if not initialized.
-
-
getPacketSender() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Gets the packet sender corresponding to this GUI's network side.
-
-
getParent() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the parent panel of this widget.
-
-
getProperties() - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Gets the current properties of this bar.
-
-
getPropertyDelegate() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getPropertyDelegate() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets the object which manages the integer properties used by WBars and such.
-
-
getPropertyDelegate() - Method in interface io.github.cottonmc.cotton.gui.PropertyDelegateHolder
-
-
Gets this block entity's property delegate.
-
-
getPropertyDelegate() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getR() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
getRightPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
getRootPanel() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getRootPanel() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
 
-
getRootPanel() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
getScrollBar() - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
Gets the WScrollBar attached to this panel.
-
-
getSelectedCard() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Gets the selected card of this panel.
-
-
getSelectedIndex() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Gets the index of the selected card in this panel.
-
-
getSelectedIndex() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Returns the index of the currently open tab.
-
-
getSelectedTab() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Returns the currently open tab's data.
-
-
getSelection() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
getSpacing() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Gets the spacing between widgets.
-
-
getStack() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
getStack(int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
getSuggestion() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
getTabCount() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Returns the number of tabs in this tab panel.
-
-
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the text of this label.
-
-
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the text of this label.
-
-
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
-
Returns the text in this text field.
-
-
getTextStyleAt(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the text style at the specific widget-space coordinates.
-
-
getTextStyleAt(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the text style at the specific widget-space coordinates.
-
-
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Returns the thumb size along the slider axis.
-
-
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
getTileHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Gets the tile height of this sprite.
-
-
getTileWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Gets the tile width of this sprite.
-
-
getTitle() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
-
-
Gets the title of this tab.
-
-
getTitleAlignment() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getTitleAlignment() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets the horizontal alignment of the GUI title.
-
-
getTitleAlignment() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getTitleColor() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getTitleColor() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
 
-
getTitleColor() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getTitlePos() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
getTitlePos() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets the position of the screen title.
-
-
getTitlePos() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
getToggle() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
getTopPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Gets the HSV Value, which is just the largest component in the color
-
-
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
getValueChangeListener() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Gets the vertical alignment of this box.
-
-
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Gets the vertical text alignment of this label.
-
-
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Gets the vertical alignment of this text widget.
-
-
getWidget() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
-
-
Gets the contained widget of this tab.
-
-
getWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
getWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
 
-
getWindow() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
getX() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the X coordinate of this widget relative to its parent.
-
-
getY() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Gets the Y coordinate of this widget relative to its parent.
-
-
GRAY_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
GREEN - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
GREEN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
grid - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
The grid size in pixels.
-
-
GuiDescription - Interface in io.github.cottonmc.cotton.gui
-
-
A GUI description represents a GUI without depending on screens.
-
-
-

H

-
-
handledScreenTick() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns a hash code value for this object.
-
-
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns a hash code value for this object.
-
-
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns a hash code value for this object.
-
-
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Returns a hash code value for this object.
-
-
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Returns a hash code value for this object.
-
-
hasValue() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
 
-
hasValue() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Returns whether this property has been set to a value.
-
-
height - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The height of this widget, defaults to 18 pixels.
-
-
height() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns the value of the height record component.
-
-
hit(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Finds the most specific child node at this location.
-
-
hit(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Find the most specific child node at this location.
-
-
HORIZONTAL - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
-
 
-
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
The horizontal alignment for this box's children.
-
-
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
HorizontalAlignment - Enum Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
horizontalGap - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
The horizontal gap between two grid cells.
-
-
horizontallyCentered(int) - Static method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
-
-
Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis.
-
-
horizontalScrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
-
The horizontal scroll bar of this panel.
-
-
host - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The containing GuiDescription of this widget.
-
-
hoveredProperty() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Returns whether the user is hovering over this widget.
-
-
HSL(float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
HSL(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
-

I

-
-
icon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Sets the tab icon.
-
-
Icon - Interface in io.github.cottonmc.cotton.gui.widget.icon
-
-
A square icon for a widget such as a button.
-
-
iconSize - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
The size (width/height) of this button's icon in pixels.
-
-
IGNORED - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
-
 
-
image() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns the value of the image record component.
-
-
init() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
init() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
InputResult - Enum Class in io.github.cottonmc.cotton.gui.widget.data
-
-
Specifies whether an input event was ignored or processed.
-
-
insets - Variable in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
-
-
The layout insets of this panel.
-
-
Insets - Record Class in io.github.cottonmc.cotton.gui.widget.data
-
-
The layout insets of a panel.
-
-
Insets(int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Constructs layout insets.
-
-
Insets(int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Constructs layout insets.
-
-
Insets(int, int, int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Constructs layout insets.
-
-
INSTANCE - Static variable in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
interpolate(Color.RGB, double) - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Calculates an interpolated value along the fraction t between 0.0 and 1.0.
-
-
io.github.cottonmc.cotton.gui - package io.github.cottonmc.cotton.gui
-
-
Basic GUI classes and server-side GUI descriptions.
-
-
io.github.cottonmc.cotton.gui.client - package io.github.cottonmc.cotton.gui.client
-
-
Client-side APIs for rendering GUIs and configuring LibGui.
-
-
io.github.cottonmc.cotton.gui.networking - package io.github.cottonmc.cotton.gui.networking
-
-
Screen networking helpers.
-
-
io.github.cottonmc.cotton.gui.widget - package io.github.cottonmc.cotton.gui.widget
-
-
Widgets for building GUIs.
-
-
io.github.cottonmc.cotton.gui.widget.data - package io.github.cottonmc.cotton.gui.widget.data
-
-
Data classes used by widgets.
-
-
io.github.cottonmc.cotton.gui.widget.focus - package io.github.cottonmc.cotton.gui.widget.focus
-
-
The widget focus API.
-
-
io.github.cottonmc.cotton.gui.widget.icon - package io.github.cottonmc.cotton.gui.widget.icon
-
-
The icon API for displaying various icons on widgets.
-
-
isActivationKey(int) - Static method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Tests if the provided key code is an activation key for widgets.
-
-
isBigSlot() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
isDarkMode() - Static method in class io.github.cottonmc.cotton.gui.client.LibGui
-
-
Returns whether LibGui is running in dark mode and widgets should use dark theming.
-
-
isDarkMode() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Checks whether dark mode is used for this GUI description.
-
-
isDecreasingKey(int, WAbstractSlider.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Tests if the key should decrease sliders with the specified direction.
-
-
isDragging() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Tests whether the user is dragging this slider.
-
-
isEditable() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
isEmpty() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
isEnabled() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
isEnabled() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
isFocused() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Tests whether this widget has focus.
-
-
isFocused(Focus<K>) - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
-
-
Checks if a focus is focused in the target widget.
-
-
isFocused(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
 
-
isFocused(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
isFocused(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Tests whether the widget is the currently-focused one.
-
-
isFocused(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
isFullscreen() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
isFullscreen() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets whether this GUI is fullscreen.
-
-
isFullscreen() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
isHovered() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Returns whether the user is hovering over this widget.
-
-
isIncreasingKey(int, WAbstractSlider.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Tests if the key should increase sliders with the specified direction.
-
-
isInsertingAllowed() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Returns whether items can be inserted into this slot.
-
-
isInsertingAllowed() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Returns whether items can be inserted into this slot.
-
-
isInverted() - Method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
-
Returns whether this slider is inverted.
-
-
isModifiable() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Returns true if the contents of this WItemSlot can be modified by players.
-
-
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Checks if the mouse cursor is close enough to the slider that the user can start dragging.
-
-
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
isNarratable() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Returns whether this widget can be narrated.
-
-
isOn - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
isScrollingHorizontally() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
-
Returns whether this scroll panel has a horizontal scroll bar.
-
-
isScrollingVertically() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
-
Returns whether this scroll panel has a vertical scroll bar.
-
-
isTakingAllowed() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Returns whether items can be taken from this slot.
-
-
isTakingAllowed() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Returns whether items can be taken from this slot.
-
-
isTitleVisible() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
isTitleVisible() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Gets whether the title of this GUI should be rendered by the screen.
-
-
isTitleVisible() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
isVisible() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Tests whether this slot is visible.
-
-
isWithinBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Checks whether a location is within this widget's bounds.
-
-
ItemIcon - Class in io.github.cottonmc.cotton.gui.widget.icon
-
-
An icon that draws an item stack.
-
-
ItemIcon(Item) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
-
-
Constructs an item icon with the item's default stack.
-
-
ItemIcon(ItemStack) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
-
-
Constructs an item icon.
-
-
ItemSyncedGuiDescription - Class in io.github.cottonmc.cotton.gui
-
- -
-
ItemSyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory, StackReference) - Constructor for class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
-
-
Constructs an ItemSyncedGuiDescription.
-
-
-

K

-
-
key() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Returns the value of the key record component.
-
-
keyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
keyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
keyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
keyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
-

L

-
-
label - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
lastFrame - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
lastResponder - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
lastResponder - Variable in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
 
-
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
 
-
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
-
-
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
LCH(float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
 
-
left - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
left() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns the value of the left record component.
-
-
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
 
-
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
 
-
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
 
-
LibGui - Class in io.github.cottonmc.cotton.gui.client
-
-
This class provides access to LibGui configuration and other global data.
-
-
LIGHT_BLUE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
LIGHT_GRAY_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
LIGHT_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
LightweightGuiDescription - Class in io.github.cottonmc.cotton.gui.client
-
-
A GuiDescription without any associated Minecraft classes
-
-
LightweightGuiDescription() - Constructor for class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
LIME_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
listeners - Variable in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
-

M

-
-
MAGENTA_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
margin - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
markDirty() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
markDirty() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
max - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
max - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The ID of the property representing the maximum value of the WBar.field.
-
-
maxValue - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The constant maximum value of the WBar.field.
-
-
maxValue - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
min - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
mouseClicked(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
mouseClicked(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
mouseDragged(double, double, int, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
mouseDragged(double, double, int, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
mouseMoved(double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
mouseMoved(double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
mouseReleased(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
mouseReleased(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
mouseScrolled(double, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
mouseScrolled(double, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
multiplyColor(int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
 
-
-

N

-
-
name(String) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
-
-
Sets the name of this property, which is used in debug messages.
-
-
NetworkSide - Enum Class in io.github.cottonmc.cotton.gui.networking
-
-
The sides of a network connection.
-
-
NinePatchBackgroundPainter - Class in io.github.cottonmc.cotton.gui.client
-
-
Nine-patch background painters paint rectangles using a special nine-patch texture.
-
-
NinePatchBackgroundPainter(NinePatch<Identifier>) - Constructor for class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
NONE - Static variable in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Empty layout insets that do not provide any borders around content.
-
-
nonnull() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
-
-
Disallows null values.
-
-
-

O

-
-
ObservableProperty<T> - Class in io.github.cottonmc.cotton.gui.widget.data
-
-
An observable mutable property.
-
-
ObservableProperty.Builder<T> - Class in io.github.cottonmc.cotton.gui.widget.data
-
-
A builder for properties.
-
-
ObservableView<T> - Interface in io.github.cottonmc.cotton.gui.widget.data
-
-
A read-only observable property.
-
-
ObservableView.ChangeListener<T> - Interface in io.github.cottonmc.cotton.gui.widget.data
-
-
A listener for changes in observable views and properties.
-
-
of(boolean) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
-
-
Gets the corresponding input result for a processed boolean.
-
-
of(int, int) - Static method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
-
-
Creates a new positioner that offsets widgets.
-
-
of(SyncedGuiDescription, NetworkSide) - Static method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
-
-
Gets a networking handler for the GUI description that is active on the specified side.
-
-
of(Rect2i) - Static method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Creates a focus of an area and null data.
-
-
of(Inventory, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
of(Inventory, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
of(T) - Static method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
-
Creates a property with an initial value.
-
-
offImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
ofPlayerStorage(Inventory) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Creates a 9x3 slot widget from the "main" part of a player inventory.
-
-
onCharTyped(char) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
onCharTyped(char) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that a character has been typed.
-
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
-
-
onClosed(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
onDirectionalKey(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
onFocusGained() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
onFocusGained() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that it has gained focus
-
-
onFocusLost() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
onFocusLost() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that it has lost focus
-
-
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that it won't be drawn and - hides any visible peers of itself and its children.
-
-
onImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that a key has been pressed.
-
-
onKeyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onKeyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that a key has been released
-
-
onMessage(PacketByteBuf) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking.MessageReceiver
-
-
Handles a received screen message.
-
-
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been pressed while inside its bounds
-
-
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been moved while pressed and inside its bounds.
-
-
onMouseMove(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
onMouseMove(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been moved while inside its bounds.
-
-
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been scrolled inside its bounds.
-
-
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that the mouse has been released while inside its bounds
-
-
onPropertyChange(ObservableView<? extends T>, T, T) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener
-
-
Handles a change in an observable property.
-
-
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Notifies this widget that it is visible and - shows any hidden peers of itself and its children.
-
-
onStackChanged(WItemSlot, Inventory, int, ItemStack) - Method in interface io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener
-
-
Handles a changed item stack in an item slot.
-
-
onToggle - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
onToggle(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
onValueChanged(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
onValueChanged(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
opaqueRgb(int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
ORANGE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
outputOf(Inventory, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
owner - Variable in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
-
-
A reference to the owning item stack of this GUI.
-
-
ownerStack - Variable in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
-
-
The initial item stack of this GUI.
-
-
-

P

-
-
paint(DrawContext, int, int, int) - Method in interface io.github.cottonmc.cotton.gui.widget.icon.Icon
-
-
Paints this icon.
-
-
paint(DrawContext, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
-
 
-
paint(DrawContext, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WClippedPanel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Paints this widget.
-
-
paintBackground(DrawContext, int, int, WWidget) - Method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
Paint the specified panel to the screen.
-
-
paintBackground(DrawContext, int, int, WWidget) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
paintFrame(DrawContext, int, int, Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Paints a single frame for this sprite.
-
-
paintFrame(DrawContext, int, int, Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
 
-
parent - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The containing panel of this widget.
-
-
PINK_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
pixelsToValues(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
playerInventory - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
pop() - Static method in class io.github.cottonmc.cotton.gui.client.Scissors
-
-
Pops the topmost scissor frame and refreshes the scissored area.
-
-
PROCESSED - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
-
 
-
properties - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The properties used for painting this bar.
-
-
propertyDelegate - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
propertyDelegate - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
PropertyDelegateHolder - Interface in io.github.cottonmc.cotton.gui
-
-
This interface can be implemented on block entity classes - for providing a property delegate.
-
-
PURPLE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
push(int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.Scissors
-
-
Pushes a new scissor frame onto the stack and refreshes the scissored area.
-
-
-

Q

-
-
quickMove(PlayerEntity, int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
-

R

-
-
readOnly() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
-
Returns a read-only view of this property.
-
-
receive(Identifier, ScreenNetworking.MessageReceiver) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
-
-
Registers a message receiver for the message.
-
-
Rect2i - Record Class in io.github.cottonmc.cotton.gui.widget.data
-
-
An immutable, two-dimensional int rectangle consisting of a position and dimensions.
-
-
Rect2i(int, int, int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Creates an instance of a Rect2i record class.
-
-
RED - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
RED_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
releaseFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
If this widget has a host, releases this widget's focus.
-
-
releaseFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
releaseFocus(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Notifies this gui that the widget wants to give up its hold over focus.
-
-
releaseFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
remove(WWidget) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Removes the widget from the HUD.
-
-
remove(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Removes the widget from this panel.
-
-
removed() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
removed() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
removeListener(ObservableView.ChangeListener<? super T>) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
 
-
removeListener(ObservableView.ChangeListener<? super T>) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
-
-
Removes a change listener from this property view if present.
-
-
removeStack(int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
removeStack(int, int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
render(DrawContext, int, int, float) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
render(DrawContext, int, int, float) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
renderBox(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderCursor(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderSelection(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderSuggestion(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderText(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderTextField(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
renderTooltip(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Internal method to render tooltip data.
-
-
reposition(int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
-
Repositions the root panel.
-
-
reposition(int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
-
Repositions the root panel.
-
-
reposition(WWidget, int, int) - Method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
-
-
Repositions the widget according to the HUD dimensions.
-
-
requestFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
If this widget has a host, requests the focus from the host.
-
-
requestFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
requestFocus(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Notifies this gui that the widget wants to acquire focus.
-
-
requestFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
rgb(int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
rgb(int, int, int, int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
RGB(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
RGB(int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
Constructs an RGB object with 100% alpha value (no transparency)
-
-
RGB(int, int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
right() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns the value of the right record component.
-
-
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
 
-
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
 
-
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
 
-
ROOT_PANEL - Static variable in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
The default insets of a root panel, providing 7 pixels around the content on all sides.
-
-
rootPanel - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
rootPanel - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
-

S

-
-
Scissors - Class in io.github.cottonmc.cotton.gui.client
-
-
Contains a stack for GL scissors for restricting the drawn area of a widget.
-
-
Scissors.Frame - Class in io.github.cottonmc.cotton.gui.client
-
-
A single scissor frame in the stack.
-
-
ScreenDrawing - Class in io.github.cottonmc.cotton.gui.client
-
-
ScreenDrawing contains utility methods for drawing contents on a screen.
-
-
ScreenNetworking - Interface in io.github.cottonmc.cotton.gui.networking
-
-
ScreenNetworking handles screen-related network messages sent between the server and the client.
-
-
ScreenNetworking.MessageReceiver - Interface in io.github.cottonmc.cotton.gui.networking
-
-
A handler for received screen messages.
-
-
scrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
The scroll bar of this list.
-
-
scrollCursorIntoView() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
send(Identifier, Consumer<PacketByteBuf>) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
-
-
Sends a screen message to the other side of the connection.
-
-
SERVER - Enum constant in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
-
-
The logical server.
-
-
set(T) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
-
-
Sets this property to a constant value.
-
-
setAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
setAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
setAxis(Axis) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Sets the axis of this box.
-
-
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Sets this item slot's background painter.
-
-
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Sets the BackgroundPainter of this panel.
-
-
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
-
Sets the background painter of this inventory widget's slots.
-
-
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setBottomPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setChangedListener(Consumer<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Sets the color tint of the texture.
-
-
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the light mode color of this label.
-
-
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the light mode color of this label.
-
-
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the light and dark mode colors of this label.
-
-
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the light and dark mode colors of this label.
-
-
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setCursorPos(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the dark mode color of this label.
-
-
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the dark mode color of this label.
-
-
setDirection(WAbstractSlider.Direction) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Sets the direction of this slider.
-
-
setDisabledColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setDraggingFinishedListener(IntConsumer) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
setDuration(int) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
setEditable(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setEnabled(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
setEnabledColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Sets the item stack filter of this slot.
-
-
setFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Sets the item filter of this item slot.
-
-
setFocused(Focus<K>) - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
-
-
Applies a focus to the target widget.
-
-
setFocused(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
 
-
setFocusImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setFrames(Texture...) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the animation frames of this sprite.
-
-
setFrames(Identifier...) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the animation frames of this sprite.
-
-
setFullscreen(boolean) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setFullscreen(boolean) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets whether this GUI is fullscreen.
-
-
setFullscreen(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setGaps(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
Set the gaps between grid cells.
-
-
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Sets the horizontal alignment of this box.
-
-
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the horizontal text alignment of this label.
-
-
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the horizontal alignment of this text widget.
-
-
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Sets the host of this widget and all its children without creating peers.
-
-
setHovered(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Sets the hovered property.
-
-
setIcon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Sets the icon of this button.
-
-
setIcon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Sets the icon to this slot.
-
-
setIconSize(int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Sets the new size of the icon.
-
-
setImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the image of this sprite.
-
-
setImage(Identifier) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the image of this sprite.
-
-
setInsertingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Sets whether inserting items into this slot is allowed.
-
-
setInsertingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Sets whether inserting items into this slot is allowed.
-
-
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
 
-
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
 
-
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
-
-
Sets the layout insets of this panel.
-
-
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
-
 
-
setItems(List<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
-
Sets the item list of this WItem and resets the animation state.
-
-
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Sets the label of this slider.
-
-
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
setLabelAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Sets the text alignment of this slider's label.
-
-
setLabelUpdater(WLabeledSlider.LabelUpdater) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Sets the WLabeledSlider.LabelUpdater of this slider.
-
-
setLastResponder(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
setLastResponder(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
setLeftPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setListItemHeight(int) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
Sets the height of this list's items to a constant value.
-
-
setLocation(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Sets the location of this widget relative to its parent.
-
-
setMaxLength(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setMaxValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
setMaxValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
setMinValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
setModifiable(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
setOffImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setOnClick(Runnable) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Sets the click handler of this button.
-
-
setOnImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setOnToggle(Consumer<Boolean>) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setOpacity(float) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Sets the opacity of the texture.
-
-
setOpaqueTint(int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the tint for this sprite to the following opaque color.
-
-
setPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setPadding(int, int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setPadding(int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setParent(WPanel) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Sets the parent panel of this widget.
-
-
setPositioner(WWidget, CottonHud.Positioner) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
-
-
Sets the positioner of the widget.
-
-
setProperties(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Sets the current properties of this bar.
-
-
setPropertyDelegate(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setPropertyDelegate(PropertyDelegate) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets the object which manages the integer properties used by WBars
-
-
setPropertyDelegate(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setRightPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setRootPanel(WPanel) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setRootPanel(WPanel) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
 
-
setRootPanel(WPanel) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setScrollingHorizontally(TriState) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
setScrollingVertically(TriState) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
setSelectedCard(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Sets the selected card of this panel.
-
-
setSelectedIndex(int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Sets the selected index of this panel.
-
-
setSelectedIndex(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Sets the currently open tab by its index.
-
-
setSelectedTab(WTabPanel.Tab) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Sets the currently open tab to the provided WTabPanel.Tab.
-
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Sets the size of this widget.
-
-
setSpacing(int) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Sets the spacing between widgets in this box.
-
-
setStack(int, ItemStack) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
setSuggestion(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setSuggestionColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setTakingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Sets whether taking items from this slot is allowed.
-
-
setTakingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
Sets whether taking items from this slot is allowed.
-
-
setText(String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
-
Sets the text of this text field.
-
-
setText(Supplier<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
setText(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the text of this label.
-
-
setText(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the text of this label.
-
-
setTextPredicate(Predicate<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
setTileHeight(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Sets the tile height of this sprite.
-
-
setTileSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Sets the tiling size.
-
-
setTileWidth(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Sets the tile width of this sprite.
-
-
setTint(int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the tint for this sprite to the following color-with-alpha.
-
-
setTitleAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setTitleAlignment(HorizontalAlignment) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets the horizontal alignment of the GUI title.
-
-
setTitleAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setTitleColor(int) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setTitleColor(int) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets the title color of this GUI.
-
-
setTitleColor(int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setTitleColor(int, int) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setTitleColor(int, int) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets the light and dark title colors of this GUI.
-
-
setTitleColor(int, int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setTitlePos(Vec2i) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setTitlePos(Vec2i) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets the position of the screen title.
-
-
setTitlePos(Vec2i) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setTitleVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
setTitleVisible(boolean) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
-
-
Sets whether the title of this GUI should be rendered by the screen.
-
-
setTitleVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
setToggle(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
 
-
setTopPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
 
-
setUv(float, float, float, float) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Sets the UV values of this sprite.
-
-
setValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Sets the slider value without calling listeners.
-
-
setValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
setValue(int, boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
Sets the slider value.
-
-
setValueChangeListener(IntConsumer) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Sets the vertical alignment of this box.
-
-
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Sets the vertical text alignment of this label.
-
-
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WText
-
-
Sets the vertical alignment of this text widget.
-
-
setWindow(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
setVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
Sets whether this slot is visible.
-
-
shouldPause() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
-
 
-
shouldRenderInDarkMode() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Checks if this widget should be rendered in dark mode.
-
-
simple(WWidget) - Static method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
-
-
Creates a simple focus model for a focusable widget.
-
-
SimpleKeyedFocusModel<K> - Class in io.github.cottonmc.cotton.gui.widget.focus
-
-
A FocusModel implementation that wraps a List of foci.
-
-
SimpleKeyedFocusModel(List<Focus<K>>) - Constructor for class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
-
-
Constructs a keyed focus model.
-
-
SimpleKeyedFocusModel.Builder<K> - Class in io.github.cottonmc.cotton.gui.widget.focus
-
-
A builder for SimpleKeyedFocusModel.
-
-
singleImage - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
size() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
-
 
-
sliding - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
SLOT - Static variable in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
The SLOT background painter draws item slots or slot-like widgets.
-
-
SLOT_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
The default texture of item slots and BackgroundPainter.SLOT.
-
-
spacing - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
The spacing between widgets.
-
-
streamChildren() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Returns a stream of all visible top-level widgets in this panel.
-
-
supplier - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
The supplier of new empty widgets.
-
-
SyncedGuiDescription - Class in io.github.cottonmc.cotton.gui
-
-
A screen handler-based GUI description for GUIs with slots.
-
-
SyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Constructs a new synced GUI description without a block inventory or a property delegate.
-
-
SyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory, Inventory, PropertyDelegate) - Constructor for class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
Constructs a new synced GUI description.
-
-
-

T

-
-
text - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
text - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
text - Variable in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
TEXT_PADDING_X - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
TEXT_PADDING_Y - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
Texture - Record Class in io.github.cottonmc.cotton.gui.widget.data
-
-
Represents a texture for a widget.
-
-
Texture(Identifier) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Constructs a new texture that uses the full image.
-
-
Texture(Identifier, float, float, float, float) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Constructs a new texture with custom UV values.
-
-
texturedGuiRect(DrawContext, int, int, int, int, Identifier, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle with UV values based on the width and height.
-
-
texturedGuiRect(DrawContext, int, int, int, int, Identifier, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle with UV values based on the width and height.
-
-
texturedRect(DrawContext, int, int, int, int, Texture, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
texturedRect(DrawContext, int, int, int, int, Texture, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
texturedRect(DrawContext, int, int, int, int, Identifier, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
texturedRect(DrawContext, int, int, int, int, Identifier, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
Draws a textured rectangle.
-
-
TextureIcon - Class in io.github.cottonmc.cotton.gui.widget.icon
-
-
An icon that draws a texture.
-
-
TextureIcon(Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Constructs a new texture icon.
-
-
TextureIcon(Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
Constructs a new texture icon.
-
-
THUMB_SIZE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
tick() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Ticks all children of this panel.
-
-
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Executes a client-side tick for this widget.
-
-
tint - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
-
 
-
title(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Sets the tab title.
-
-
titleAlignment - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
titleAlignment - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
titleColor - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
titleColor - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
titleVisible - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
 
-
titleVisible - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
titleX - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
-
The X coordinate of the screen title.
-
-
titleY - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
-
The Y coordinate of the screen title.
-
-
tooltip(Collection<? extends Text>) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Adds lines to the tab's tooltip.
-
-
tooltip(Text...) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
Adds lines to the tab's tooltip.
-
-
TooltipBuilder - Class in io.github.cottonmc.cotton.gui.widget
-
-
A builder for widget tooltips.
-
-
TooltipBuilder() - Constructor for class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
-
 
-
tooltipLabel - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
The translation key of the tooltip.
-
-
tooltipTextComponent - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
A tooltip text component.
-
-
top - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
 
-
top() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns the value of the top record component.
-
-
TOP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
 
-
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
 
-
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
 
-
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
 
-
toRgb() - Method in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
-
Gets an ARGB integer representing this color in the sRGB colorspace.
-
-
toString() - Method in class io.github.cottonmc.cotton.gui.client.Scissors.Frame
-
 
-
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
Returns a string representation of this record class.
-
-
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns a string representation of this record class.
-
-
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns a string representation of this record class.
-
-
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Returns a string representation of this record class.
-
-
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
-
-
Returns a string representation of this record class.
-
-
toString() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
TRACK_WIDTH - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
-

U

-
-
u1() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns the value of the u1 record component.
-
-
u2() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns the value of the u2 record component.
-
-
unconfigured - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
UP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
 
-
UP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
 
-
updateLabel(int) - Method in interface io.github.cottonmc.cotton.gui.widget.WLabeledSlider.LabelUpdater
-
-
Gets the updated label for the new slider value.
-
-
updateValueCoordRatios() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
- -
-
-

V

-
-
v1() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns the value of the v1 record component.
-
-
v2() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Returns the value of the v2 record component.
-
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
-
Creates component peers and initializes animation data for this Widget and all its children.
-
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
-
 
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
-
-
Creates component peers and initializes animation data for this Widget and all its children.
-
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
 
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
 
-
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
Creates component peers and initializes animation data for this Widget and all its children.
-
-
ValidatedSlot - Class in io.github.cottonmc.cotton.gui
-
 
-
ValidatedSlot(Inventory, int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.ValidatedSlot
-
 
-
value - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
value - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
-
Returns the enum constant of this class with the specified name.
-
-
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
-
Returns the enum constant of this class with the specified name.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
-
Returns an array containing the constants of this enum class, in -the order they are declared.
-
-
valueToCoordRatio - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
A value:coordinate ratio.
-
-
VANILLA - Static variable in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
-
-
The VANILLA background painter draws a vanilla-like GUI panel using nine-patch textures.
-
-
Vec2i - Record Class in io.github.cottonmc.cotton.gui.widget.data
-
-
An immutable, two-dimensional int vector.
-
-
Vec2i(int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Creates an instance of a Vec2i record class.
-
-
VERTICAL - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
-
 
-
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
-
-
The vertical alignment for this box's children.
-
-
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
-
 
-
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
VerticalAlignment - Enum Class in io.github.cottonmc.cotton.gui.widget.data
-
 
-
verticalGap - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
The vertical gap between two grid cells.
-
-
verticalScrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
-
The vertical scroll bar of this panel.
-
-
-

W

-
-
WAbstractSlider - Class in io.github.cottonmc.cotton.gui.widget
-
-
A base class for slider widgets that can be used to select int values.
-
-
WAbstractSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
 
-
WAbstractSlider.Direction - Enum Class in io.github.cottonmc.cotton.gui.widget
-
-
The direction enum represents all four directions a slider can face.
-
-
WBar - Class in io.github.cottonmc.cotton.gui.widget
-
-
A bar that displays int values from a PropertyDelegate.
-
-
WBar(Texture, Texture, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
WBar(Texture, Texture, int, int, WBar.Direction) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
WBar(Identifier, Identifier, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
WBar(Identifier, Identifier, int, int, WBar.Direction) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
-
 
-
WBar.Direction - Enum Class in io.github.cottonmc.cotton.gui.widget
-
-
The direction of a WBar, representing where the bar will - grown when its field increases.
-
-
WBox - Class in io.github.cottonmc.cotton.gui.widget
-
-
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
-
-
WBox(Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBox
-
-
Constructs a box.
-
-
WButton - Class in io.github.cottonmc.cotton.gui.widget
-
 
-
WButton() - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Constructs a button with no label and no icon.
-
-
WButton(Icon) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Constructs a button with an icon.
-
-
WButton(Icon, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Constructs a button with an icon and a label.
-
-
WButton(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
-
-
Constructs a button with a label.
-
-
WCardPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
-
-
WCardPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WCardPanel
-
 
-
WClippedPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A panel that is clipped to only render widgets inside its bounds.
-
-
WClippedPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WClippedPanel
-
 
-
WDynamicLabel - Class in io.github.cottonmc.cotton.gui.widget
-
-
Dynamic labels are labels that pull their text from a Supplier<String>.
-
-
WDynamicLabel(Supplier<String>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
WDynamicLabel(Supplier<String>, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
 
-
WGridPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A panel that positions children in a grid.
-
-
WGridPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
Constructs a grid panel with the default grid size.
-
-
WGridPanel(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WGridPanel
-
-
Constructs a grid panel with a custom grid size.
-
-
WHITE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
WHITE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
width - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The width of this widget, defaults to 18 pixels.
-
-
width() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns the value of the width record component.
-
-
window - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
 
-
WItem - Class in io.github.cottonmc.cotton.gui.widget
-
-
A widget that displays an item or a list of items.
-
-
WItem(List<ItemStack>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
WItem(ItemStack) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
WItem(TagKey<? extends ItemConvertible>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
-
 
-
WItemSlot - Class in io.github.cottonmc.cotton.gui.widget
-
-
A widget that displays an item that can be interacted with.
-
-
WItemSlot(Inventory, int, int, int, boolean) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItemSlot
-
 
-
WItemSlot.ChangeListener - Interface in io.github.cottonmc.cotton.gui.widget
-
-
A listener for changes in an item slot.
-
-
withConstantMaximum(Texture, Texture, int, int, WBar.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
-
-
withConstantMaximum(Identifier, Identifier, int, int, WBar.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
-
-
withTooltip(String) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Adds a tooltip to the WBar.
-
-
withTooltip(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
-
-
Adds a tooltip Text to the WBar.
-
-
withUv(float, float, float, float) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
Creates a new texture with different UV values.
-
-
WLabel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A single-line label widget.
-
-
WLabel(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Constructs a new label with the default text color.
-
-
WLabel(Text, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabel
-
-
Constructs a new label.
-
-
WLabeledSlider - Class in io.github.cottonmc.cotton.gui.widget
-
-
A vanilla-style labeled slider widget.
-
-
WLabeledSlider(int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Constructs a horizontal slider with no default label.
-
-
WLabeledSlider(int, int, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Constructs a horizontal slider.
-
-
WLabeledSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Constructs a slider with no default label.
-
-
WLabeledSlider(int, int, Axis, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
-
-
Constructs a slider.
-
-
WLabeledSlider.LabelUpdater - Interface in io.github.cottonmc.cotton.gui.widget
-
-
A label updater updates the label of a slider based on the current value.
-
-
WListPanel<D,W extends WWidget> - Class in io.github.cottonmc.cotton.gui.widget
-
-
Similar to the RecyclerView in Android, this widget represents a scrollable list of items.
-
-
WListPanel(List<D>, Supplier<W>, BiConsumer<D, W>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WListPanel
-
-
Constructs a list panel.
-
-
world - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
 
-
WPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
Panels are widgets that contain other widgets.
-
-
WPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPanel
-
 
-
WPanelWithInsets - Class in io.github.cottonmc.cotton.gui.widget
-
-
A panel that has layout insets.
-
-
WPanelWithInsets() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
-
 
-
WPlainPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A panel that positions children by pixel-perfect positions.
-
-
WPlainPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlainPanel
-
 
-
WPlayerInvPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A player inventory widget that has a visually separate hotbar.
-
-
WPlayerInvPanel(PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
-
Constructs a player inventory panel with a label.
-
-
WPlayerInvPanel(PlayerInventory, boolean) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
-
Constructs a player inventory panel.
-
-
WPlayerInvPanel(PlayerInventory, WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
-
-
Constructs a player inventory panel.
-
-
WScrollBar - Class in io.github.cottonmc.cotton.gui.widget
-
 
-
WScrollBar() - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Constructs a horizontal scroll bar.
-
-
WScrollBar(Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
Constructs a scroll bar with a custom axis.
-
-
WScrollPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
-
-
WScrollPanel(WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollPanel
-
-
Creates a vertically scrolling panel.
-
-
WSlider - Class in io.github.cottonmc.cotton.gui.widget
-
-
A simple slider widget that can be used to select int values.
-
-
WSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSlider
-
 
-
WSprite - Class in io.github.cottonmc.cotton.gui.widget
-
 
-
WSprite(int, Texture...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Create a new animated sprite.
-
-
WSprite(int, Identifier...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Create a new animated sprite.
-
-
WSprite(Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Create a new sprite with a single image.
-
-
WSprite(Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Create a new sprite with a single image.
-
-
WSprite(Identifier, float, float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
-
-
Create a new sprite with a single image and custom UV values.
-
-
WTabPanel - Class in io.github.cottonmc.cotton.gui.widget
-
-
A panel that contains creative inventory-style tabs on the top.
-
-
WTabPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WTabPanel
-
-
Constructs a new tab panel.
-
-
WTabPanel.Tab - Class in io.github.cottonmc.cotton.gui.widget
-
-
The data of a tab.
-
-
WTabPanel.Tab.Builder - Class in io.github.cottonmc.cotton.gui.widget
-
-
A builder for tab data.
-
-
WText - Class in io.github.cottonmc.cotton.gui.widget
-
-
A multiline label widget.
-
-
WText(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
WText(Text, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WText
-
 
-
WTextField - Class in io.github.cottonmc.cotton.gui.widget
-
 
-
WTextField() - Constructor for class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
WTextField(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTextField
-
 
-
WTiledSprite - Class in io.github.cottonmc.cotton.gui.widget
-
-
A sprite whose texture will be tiled.
-
-
WTiledSprite(int, int, int, Texture...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Create a new animated tiled sprite.
-
-
WTiledSprite(int, int, int, Identifier...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Create a new animated tiled sprite.
-
-
WTiledSprite(int, int, Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Create a tiled sprite.
-
-
WTiledSprite(int, int, Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
-
-
Create a tiled sprite.
-
-
WToggleButton - Class in io.github.cottonmc.cotton.gui.widget
-
 
-
WToggleButton() - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with default images and no label.
-
-
WToggleButton(Texture, Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with custom images and no label.
-
-
WToggleButton(Texture, Texture, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with custom images.
-
-
WToggleButton(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with default images.
-
-
WToggleButton(Identifier, Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with custom images and no label.
-
-
WToggleButton(Identifier, Identifier, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
Constructs a toggle button with custom images.
-
-
WWidget - Class in io.github.cottonmc.cotton.gui.widget
-
-
The base class for all widgets.
-
-
WWidget() - Constructor for class io.github.cottonmc.cotton.gui.widget.WWidget
-
 
-
-

X

-
-
x - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The X coordinate of this widget relative to its parent.
-
-
x() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns the value of the x record component.
-
-
x() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Returns the value of the x record component.
-
-
-

Y

-
-
y - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
-
-
The Y coordinate of this widget relative to its parent.
-
-
y() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
Returns the value of the y record component.
-
-
y() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
Returns the value of the y record component.
-
-
YELLOW_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
-
 
-
-A B C D E F G H I K L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values
-
-
- - + + + + +Index (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I K L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values +

A

+
+
add(int, WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Adds a card to this panel without resizing it.
+
+
add(int, WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Adds a card to this panel and resizes it.
+
+
add(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
+
+
Adds a focus to this builder.
+
+
add(WTabPanel.Tab) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Adds a tab to this panel.
+
+
add(WWidget) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Adds a new widget to the HUD.
+
+
add(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Adds a widget to this box.
+
+
add(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Adds a card to this panel without resizing it.
+
+
add(WWidget, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Adds a new widget to the HUD at the specified offsets.
+
+
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Adds a widget to this box.
+
+
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Adds a card to this panel and resizes it.
+
+
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
Adds a widget to this panel.
+
+
add(WWidget, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
+
+
Adds a new widget to this panel.
+
+
add(WWidget, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Adds a new widget to the HUD at the specified offsets and resizes it.
+
+
add(WWidget, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
Adds a widget to this panel and resizes it to a custom size.
+
+
add(WWidget, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
+
+
Adds a new widget to this panel and resizes it to a custom size.
+
+
add(WWidget, CottonHud.Positioner) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Adds a new widget to the HUD with a custom positioner.
+
+
add(WWidget, CottonHud.Positioner, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Adds a new widget to the HUD with a custom positioner and resizes it.
+
+
add(WWidget, Consumer<WTabPanel.Tab.Builder>) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Configures and adds a tab to this panel.
+
+
add(K, Rect2i) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
+
+
Adds a focus to this builder.
+
+
add(OrderedText...) - Method in class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
+
+
Adds the lines to this builder.
+
+
add(Text...) - Method in class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
+
+
Adds the lines to this builder.
+
+
addAll(Collection<Focus<K>>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
+
+
Adds foci from a collection to this builder.
+
+
addChangeListener(WItemSlot.ChangeListener) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Adds a change listener to this slot.
+
+
addChangeListener(WItemSlot, WItemSlot.ChangeListener) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Adds a change listener to this slot.
+
+
addElementNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
addElementNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
addListener(ObservableView.ChangeListener<? super T>) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
 
+
addListener(ObservableView.ChangeListener<? super T>) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Adds a change listener to this property view.
+
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
addNarrations(NarrationMessageBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Adds the narrations of this widget to a narration builder.
+
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
addPainters() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Guis should use this method to add clientside styles and BackgroundPainters to their controls
+
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
 
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Adds the default background painters to this widget and all children.
+
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
 
+
addPainters() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Adds the default background painters to this widget and all children.
+
+
addSlotPeer(ValidatedSlot) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
addSlotPeer(ValidatedSlot) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Typical users won't call this.
+
+
addSlotPeer(ValidatedSlot) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
+
+
Adds this widget's tooltip to the tooltip builder.
+
+
addTooltip(TooltipBuilder) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Adds lines to this widget's tooltip.
+
+
adjustSlider(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
alignment - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
alignment - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
anchor - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
anchorValue - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
area() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Returns the value of the area record component.
+
+
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
The axis that the widgets are laid out on.
+
+
axis - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
Axis - Enum Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
+

B

+
+
BackgroundPainter - Interface in io.github.cottonmc.cotton.gui.client
+
+
Background painters are used to paint the background of a widget.
+
+
bar - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The bar texture.
+
+
bg - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The background texture.
+
+
BLACK - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
BLACK_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
blockInventory - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
BLUE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
BLUE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
bottom() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns the value of the bottom record component.
+
+
BOTTOM - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
 
+
BROWN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
build() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
+
+
Builds the observable property.
+
+
build() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder
+
+
Builds a new SimpleKeyedFocusModel from the data in this builder.
+
+
build() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Builds a tab from this builder.
+
+
builder() - Static method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
+
Creates a builder for SimpleKeyedFocusModel.
+
+
Builder(WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Constructs a new tab data builder.
+
+
+

C

+
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
canFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Tests whether this widget can have the focus in the GUI.
+
+
canHover() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Tests whether this widget receives mouse hovering status.
+
+
canInsert(ItemStack) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
canPlayerUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
canResize() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Checks whether this widget can be resized using setSize(int, int).
+
+
canTakeItems(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
canUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
+
canUse(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
cellHeight - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
The height of each child cell.
+
+
CENTER - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
 
+
CENTER - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
 
+
charTyped(char, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
charTyped(char, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
checkValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Checks that the current value is in the correct range + and adjusts it if needed.
+
+
children - Variable in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
The widgets contained within this panel.
+
+
choose(T, T) - Method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
+
+
Chooses a value based on this axis.
+
+
clear() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
CLIENT - Enum constant in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
+
+
The logical client.
+
+
close() - Method in class io.github.cottonmc.cotton.gui.client.Scissors.Frame
+
+
Pops this frame from the stack.
+
+
color - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
color - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
color - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
color - Variable in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
color - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
Color - Interface in io.github.cottonmc.cotton.gui.widget.data
+
 
+
Color.HSL - Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
Color.LCH - Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
Color.RGB - Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
colorAtOpacity(int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
 
+
coloredRect(DrawContext, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws an untextured rectangle of the specified RGB color.
+
+
configurator - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
The widget configurator that configures the passed widget + to display the passed data.
+
+
configured - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
coordToValueRatio - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
A coordinate:value ratio.
+
+
CottonClientScreen - Class in io.github.cottonmc.cotton.gui.client
+
 
+
CottonClientScreen(GuiDescription) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
CottonClientScreen(Text, GuiDescription) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
CottonHud - Class in io.github.cottonmc.cotton.gui.client
+
+
Manages widgets that are painted on the in-game HUD.
+
+
CottonHud() - Constructor for class io.github.cottonmc.cotton.gui.client.CottonHud
+
 
+
CottonHud.Positioner - Interface in io.github.cottonmc.cotton.gui.client
+
+
Positioners can be used to change the position of a widget based on the window dimensions.
+
+
CottonInventoryScreen<T extends SyncedGuiDescription> - Class in io.github.cottonmc.cotton.gui.client
+
+
A screen for a SyncedGuiDescription.
+
+
CottonInventoryScreen(T, PlayerEntity) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
+
Constructs a new screen without a title.
+
+
CottonInventoryScreen(T, PlayerEntity, Text) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
+
Constructs a new screen.
+
+
CottonInventoryScreen(T, PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
+
Constructs a new screen without a title.
+
+
CottonInventoryScreen(T, PlayerInventory, Text) - Constructor for class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
+
Constructs a new screen.
+
+
createColorful(int) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Creates a colorful gui panel painter.
+
+
createColorful(int, float) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Creates a colorful gui panel painter that has a custom contrast between the shadows and highlights.
+
+
createInventoryLabel(PlayerInventory) - Static method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
Creates a vanilla-style inventory label for a player inventory.
+
+
createLightDarkVariants(BackgroundPainter, BackgroundPainter) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Creates a background painter that uses either the light or the dark background painter + depending on the current setting.
+
+
createNinePatch(Texture, Consumer<NinePatch.Builder<Identifier>>) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Creates a new nine-patch background painter with a custom configuration.
+
+
createNinePatch(Identifier) - Static method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Creates a new nine-patch background painter.
+
+
createPlayerInventoryPanel() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Creates a player inventory widget from this panel's player inventory.
+
+
createPlayerInventoryPanel(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Creates a player inventory widget from this panel's player inventory.
+
+
createPlayerInventoryPanel(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Creates a player inventory widget from this panel's player inventory.
+
+
createSlotPeer(Inventory, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Creates a slot peer for this slot widget.
+
+
currentFrame - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
currentFrameTime - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
CURSOR_HEIGHT - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
CURSOR_PADDING_Y - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
CYAN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
+

D

+
+
DARK_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
darkmodeColor - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
darkmodeTitleColor - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
darkTitleColor - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
data - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
The list of data that this list represents.
+
+
DEFAULT_DARKMODE_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
DEFAULT_DARKMODE_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
The default text color for dark mode labels.
+
+
DEFAULT_FOCUS_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
DEFAULT_ITEM_FILTER - Static variable in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
The default item filter that allows all items.
+
+
DEFAULT_OFF_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
DEFAULT_ON_IMAGE - Static variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
DEFAULT_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
DEFAULT_TEXT_COLOR - Static variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
The default text color for light mode labels.
+
+
description - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
description - Variable in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
direction - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
direction - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The direction of this bar, representing where the bar will grow + when the field increases.
+
+
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Disables separate dark mode coloring by copying the dark color to be the light color.
+
+
disableDarkmode() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Disables separate dark mode coloring by copying the dark color to be the light color.
+
+
DOWN - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
 
+
DOWN - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
 
+
dragging - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
True if the user is currently dragging the thumb.
+
+
drawBackground(DrawContext, float, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
drawBeveledPanel(DrawContext, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a default-sized recessed itemslot panel
+
+
drawBeveledPanel(DrawContext, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a default-color recessed itemslot panel of variable size
+
+
drawBeveledPanel(DrawContext, int, int, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a generalized-case beveled panel.
+
+
drawForeground(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
drawGuiPanel(DrawContext, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
+
+
drawGuiPanel(DrawContext, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
+
+
drawGuiPanel(DrawContext, int, int, int, int, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
+
+
drawString(DrawContext, String, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a left-aligned string.
+
+
drawString(DrawContext, String, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a string with a custom alignment.
+
+
drawString(DrawContext, OrderedText, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a left-aligned text component.
+
+
drawString(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a text component with a custom alignment.
+
+
drawStringWithShadow(DrawContext, String, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a shadowed string.
+
+
drawStringWithShadow(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a shadowed text component.
+
+
drawTextHover(DrawContext, Style, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws the text hover effects for a text style.
+
+
DYE_COLORS - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
+

E

+
+
empty() - Static method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
+
Creates a "late init" property without an initial value.
+
+
EmptyInventory - Class in io.github.cottonmc.cotton.gui
+
+
An empty inventory that cannot hold any items.
+
+
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Indicates whether some other object is "equal to" this one.
+
+
expandToFit(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Expands this panel be at least as large as the widget.
+
+
expandToFit(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
+
 
+
expandToFit(WWidget, Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Expands this panel be at least as large as the widget.
+
+
+

F

+
+
field - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The ID of the displayed property in the WBar.properties.
+
+
find() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
+
+
fixedHeight - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
Whether this list has a fixed height for items.
+
+
foci() - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
+
+
Returns a stream of all foci in the target widget.
+
+
foci() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
 
+
focus - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
focus - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
Focus<K> - Record Class in io.github.cottonmc.cotton.gui.widget.focus
+
+
A focus is a focusable area in a widget.
+
+
Focus(K, Rect2i) - Constructor for record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Creates an instance of a Focus record class.
+
+
focusImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
FocusModel<K> - Interface in io.github.cottonmc.cotton.gui.widget.focus
+
+
Manages the state of individual foci in a widget.
+
+
frames - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
frameTime - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
fullscreen - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
fullscreen - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
+

G

+
+
get() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
 
+
get() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Returns the value of this property.
+
+
getA() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
getAbsoluteX() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the absolute X coordinate of this widget.
+
+
getAbsoluteY() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the absolute Y coordinate of this widget.
+
+
getAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
getAxis() - Method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
+
Gets the direction's axis.
+
+
getAxis() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getAxis() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Gets the axis of this box.
+
+
getB() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Gets this slot widget's background painter.
+
+
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Gets the current BackgroundPainter of this panel.
+
+
getBackgroundPainter() - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
getBlockInventory(ScreenHandlerContext) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the block inventory at the context.
+
+
getBlockInventory(ScreenHandlerContext, int) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the block inventory at the context.
+
+
getBlockPropertyDelegate(ScreenHandlerContext) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the property delegate at the context.
+
+
getBlockPropertyDelegate(ScreenHandlerContext, int) - Static method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the property delegate at the context.
+
+
getBottomPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
getCardCount() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Gets the number of cards in this panel.
+
+
getCaretPosition(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
getChroma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
 
+
getChroma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the chroma value, which is related to the length of the vector in projected (hexagonal) space.
+
+
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Gets the color tint of the texture.
+
+
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the light mode color of this label.
+
+
getColor() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the light mode color of this label.
+
+
getCursor() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
getDarkmodeColor() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the dark mode color of this label.
+
+
getDarkmodeColor() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the dark mode color of this label.
+
+
getDescription() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
getDescription() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
getDirection() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Gets the direction of this slider.
+
+
getDraggingFinishedListener() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getDuration() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
+
Returns the animation duration of this WItem.
+
+
getFilter() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Deprecated, for removal: This API element is subject to removal in a future version. + +
+
+
getFilter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Deprecated, for removal: This API element is subject to removal in a future version. + +
+
+
getFocus() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getFocus() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets the currently-focused WWidget.
+
+
getFocus() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getFocusedKey() - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
+
Returns the focused key, or null if not available.
+
+
getFocusedSlot() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Gets the currently focused slot index.
+
+
getFocusImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getFocusModel() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
getFocusModel() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Returns the focus model of this widget.
+
+
getG() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
getHandlePosition() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
getHandleSize() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Gets the on-axis size of the scrollbar handle in gui pixels
+
+
getHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
getHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
 
+
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Gets the horizontal alignment of this box.
+
+
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the horizontal text alignment of this label.
+
+
getHorizontalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the horizontal alignment of this text widget.
+
+
getHost() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the host of this widget.
+
+
getHSLSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the saturation for this color based on chrominance and HSL luma.
+
+
getHSVSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the saturation for this color based on chrominance and HSV Value
+
+
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
 
+
getHue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the HSV/HSL Hue, which is the angle around the color hexagon (or circle)
+
+
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Gets the icon of this button.
+
+
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Returns the icon if set, otherwise null.
+
+
getIcon() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
+
+
Gets the icon of this tab.
+
+
getIconSize() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Gets the current height / width of the icon.
+
+
getInputFilter() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Gets the item stack input filter of this slot.
+
+
getInputFilter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Gets the item stack input filter of this slot.
+
+
getInsets() - Method in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
+
+
Gets the layout insets of this panel.
+
+
getInventoryIndex() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Gets the index of this slot in its inventory.
+
+
getItems() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Gets the current label of this slider.
+
+
getLabel() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getLabelAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Gets the text alignment of this slider's label.
+
+
getLabelUpdater() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Gets the WLabeledSlider.LabelUpdater of this slider.
+
+
getLastResponder() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
getLastResponder() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
getLeftPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
getLightness() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the HSL Lightness, or average light intensity, of this color
+
+
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
 
+
getLuma() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the HSL Luma, or perceptual brightness, of this color
+
+
getMaxLength() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
getMaxScrollValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Gets the maximum scroll value achievable; this will typically be the maximum value minus the + window size
+
+
getMaxValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getMaxValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
getMinValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getMovableDistance() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Gets the number of pixels the scrollbar handle is able to move along its track from one end to the other.
+
+
getName() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
+
Returns the name of this property.
+
+
getNarrationName() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Returns a "narration name" for this slot.
+
+
getNetworkSide() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the network side this GUI description runs on.
+
+
getOffImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getOnClick() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Gets the click handler of this button.
+
+
getOnImage() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getOnToggle() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getOpacity() - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Gets the opacity of the texture.
+
+
getOrNull() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Returns the value of this property, or null if not initialized.
+
+
getOutputFilter() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Gets the item stack output filter of this slot.
+
+
getOutputFilter() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Gets the item stack output filter of this slot.
+
+
getPacketSender() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Gets the packet sender corresponding to this GUI's network side.
+
+
getParent() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the parent panel of this widget.
+
+
getProperties() - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Gets the current properties of this bar.
+
+
getPropertyDelegate() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getPropertyDelegate() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets the object which manages the integer properties used by WBars and such.
+
+
getPropertyDelegate() - Method in interface io.github.cottonmc.cotton.gui.PropertyDelegateHolder
+
+
Gets this block entity's property delegate.
+
+
getPropertyDelegate() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getR() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
getRightPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
getRootPanel() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getRootPanel() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
 
+
getRootPanel() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getSaturation() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
getScrollBar() - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
Gets the WScrollBar attached to this panel.
+
+
getSelectedCard() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Gets the selected card of this panel.
+
+
getSelectedIndex() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Gets the index of the selected card in this panel.
+
+
getSelectedIndex() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Returns the index of the currently open tab.
+
+
getSelectedTab() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Returns the currently open tab's data.
+
+
getSelection() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
getSpacing() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Gets the spacing between widgets.
+
+
getStack() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
getStack(int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
getSuggestion() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
getTabCount() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Returns the number of tabs in this tab panel.
+
+
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the text of this label.
+
+
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the text of this label.
+
+
getText() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
+
Returns the text in this text field.
+
+
getTextStyleAt(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the text style at the specific widget-space coordinates.
+
+
getTextStyleAt(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the text style at the specific widget-space coordinates.
+
+
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Returns the thumb size along the slider axis.
+
+
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
getThumbWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
getTileHeight() - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Gets the tile height of this sprite.
+
+
getTileWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Gets the tile width of this sprite.
+
+
getTitle() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
+
+
Gets the title of this tab.
+
+
getTitleAlignment() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getTitleAlignment() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets the horizontal alignment of the GUI title.
+
+
getTitleAlignment() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getTitleColor() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getTitleColor() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
 
+
getTitleColor() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getTitlePos() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
getTitlePos() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets the position of the screen title.
+
+
getTitlePos() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
getToggle() - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
getTopPadding() - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Gets the HSV Value, which is just the largest component in the color
+
+
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getValue() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
getValueChangeListener() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Gets the vertical alignment of this box.
+
+
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Gets the vertical text alignment of this label.
+
+
getVerticalAlignment() - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Gets the vertical alignment of this text widget.
+
+
getWidget() - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
+
+
Gets the contained widget of this tab.
+
+
getWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
getWidth() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
 
+
getWindow() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
getX() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the X coordinate of this widget relative to its parent.
+
+
getY() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Gets the Y coordinate of this widget relative to its parent.
+
+
GRAY_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
GREEN - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
GREEN_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
grid - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
The grid size in pixels.
+
+
GuiDescription - Interface in io.github.cottonmc.cotton.gui
+
+
A GUI description represents a GUI without depending on screens.
+
+
+

H

+
+
handledScreenTick() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Returns a hash code value for this object.
+
+
hasValue() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
 
+
hasValue() - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Returns whether this property has been set to a value.
+
+
height - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The height of this widget, defaults to 18 pixels.
+
+
height() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns the value of the height record component.
+
+
hit(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Finds the most specific child node at this location.
+
+
hit(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Find the most specific child node at this location.
+
+
HORIZONTAL - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
+
 
+
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
The horizontal alignment for this box's children.
+
+
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
horizontalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
HorizontalAlignment - Enum Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
horizontalGap - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
The horizontal gap between two grid cells.
+
+
horizontallyCentered(int) - Static method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
+
+
Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis.
+
+
horizontalScrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
+
The horizontal scroll bar of this panel.
+
+
host - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The containing GuiDescription of this widget.
+
+
hotbar - Variable in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
A 9 by 1 WItemSlot that represents the player's hotbar.
+
+
hoveredProperty() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Returns whether the user is hovering over this widget.
+
+
HSL(float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
HSL(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
+

I

+
+
icon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Sets the tab icon.
+
+
Icon - Interface in io.github.cottonmc.cotton.gui.widget.icon
+
+
A square icon for a widget such as a button.
+
+
iconSize - Variable in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
The size (width/height) of this button's icon in pixels.
+
+
IGNORED - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
+
 
+
image() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns the value of the image record component.
+
+
init() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
init() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
InputResult - Enum Class in io.github.cottonmc.cotton.gui.widget.data
+
+
Specifies whether an input event was ignored or processed.
+
+
insets - Variable in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
+
+
The layout insets of this panel.
+
+
Insets - Record Class in io.github.cottonmc.cotton.gui.widget.data
+
+
The layout insets of a panel.
+
+
Insets(int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Constructs layout insets.
+
+
Insets(int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Constructs layout insets.
+
+
Insets(int, int, int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Constructs layout insets.
+
+
INSTANCE - Static variable in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
interpolate(Color.RGB, double) - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Calculates an interpolated value along the fraction t between 0.0 and 1.0.
+
+
inventory - Variable in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
A 9 by 3 WItemSlot that represents the player's inventory.
+
+
io.github.cottonmc.cotton.gui - package io.github.cottonmc.cotton.gui
+
+
Basic GUI classes and server-side GUI descriptions.
+
+
io.github.cottonmc.cotton.gui.client - package io.github.cottonmc.cotton.gui.client
+
+
Client-side APIs for rendering GUIs and configuring LibGui.
+
+
io.github.cottonmc.cotton.gui.networking - package io.github.cottonmc.cotton.gui.networking
+
+
Screen networking helpers.
+
+
io.github.cottonmc.cotton.gui.widget - package io.github.cottonmc.cotton.gui.widget
+
+
Widgets for building GUIs.
+
+
io.github.cottonmc.cotton.gui.widget.data - package io.github.cottonmc.cotton.gui.widget.data
+
+
Data classes used by widgets.
+
+
io.github.cottonmc.cotton.gui.widget.focus - package io.github.cottonmc.cotton.gui.widget.focus
+
+
The widget focus API.
+
+
io.github.cottonmc.cotton.gui.widget.icon - package io.github.cottonmc.cotton.gui.widget.icon
+
+
The icon API for displaying various icons on widgets.
+
+
isActivationKey(int) - Static method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Tests if the provided key code is an activation key for widgets.
+
+
isBigSlot() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
isDarkMode() - Static method in class io.github.cottonmc.cotton.gui.client.LibGui
+
+
Returns whether LibGui is running in dark mode and widgets should use dark theming.
+
+
isDarkMode() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Checks whether dark mode is used for this GUI description.
+
+
isDecreasingKey(int, WAbstractSlider.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Tests if the key should decrease sliders with the specified direction.
+
+
isDragging() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Tests whether the user is dragging this slider.
+
+
isEditable() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
isEmpty() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
isEnabled() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
isEnabled() - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
isFocused() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Tests whether this widget has focus.
+
+
isFocused(Focus<K>) - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
+
+
Checks if a focus is focused in the target widget.
+
+
isFocused(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
 
+
isFocused(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
isFocused(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Tests whether the widget is the currently-focused one.
+
+
isFocused(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
isFullscreen() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
isFullscreen() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets whether this GUI is fullscreen.
+
+
isFullscreen() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
isHovered() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Returns whether the user is hovering over this widget.
+
+
isIncreasingKey(int, WAbstractSlider.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Tests if the key should increase sliders with the specified direction.
+
+
isInsertingAllowed() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Returns whether items can be inserted into this slot.
+
+
isInsertingAllowed() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Returns whether items can be inserted into this slot.
+
+
isInverted() - Method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
+
Returns whether this slider is inverted.
+
+
isModifiable() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Returns true if the contents of this WItemSlot can be modified by players.
+
+
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Checks if the mouse cursor is close enough to the slider that the user can start dragging.
+
+
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
isMouseInsideBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
isNarratable() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Returns whether this widget can be narrated.
+
+
isOn - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
isScrollingHorizontally() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
+
Returns whether this scroll panel has a horizontal scroll bar.
+
+
isScrollingVertically() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
+
Returns whether this scroll panel has a vertical scroll bar.
+
+
isTakingAllowed() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Returns whether items can be taken from this slot.
+
+
isTakingAllowed() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Returns whether items can be taken from this slot.
+
+
isTitleVisible() - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
isTitleVisible() - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Gets whether the title of this GUI should be rendered by the screen.
+
+
isTitleVisible() - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
isVisible() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Tests whether this slot is visible.
+
+
isWithinBounds(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Checks whether a location is within this widget's bounds.
+
+
ItemIcon - Class in io.github.cottonmc.cotton.gui.widget.icon
+
+
An icon that draws an item stack.
+
+
ItemIcon(Item) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
+
+
Constructs an item icon with the item's default stack.
+
+
ItemIcon(ItemStack) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
+
+
Constructs an item icon.
+
+
ItemSyncedGuiDescription - Class in io.github.cottonmc.cotton.gui
+
+ +
+
ItemSyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory, StackReference) - Constructor for class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
+
+
Constructs an ItemSyncedGuiDescription.
+
+
+

K

+
+
key() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Returns the value of the key record component.
+
+
keyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
keyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
keyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
keyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
+

L

+
+
label - Variable in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
The label seen above WPlayerInvPanel.inventory.
+
+
label - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
lastFrame - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
lastResponder - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
lastResponder - Variable in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
 
+
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
 
+
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
+
+
layout() - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
LCH(float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
 
+
left - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
left() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns the value of the left record component.
+
+
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
 
+
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
 
+
LEFT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
 
+
LibGui - Class in io.github.cottonmc.cotton.gui.client
+
+
This class provides access to LibGui configuration and other global data.
+
+
LIGHT_BLUE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
LIGHT_GRAY_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
LIGHT_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
LightweightGuiDescription - Class in io.github.cottonmc.cotton.gui.client
+
+
A GuiDescription without any associated Minecraft classes
+
+
LightweightGuiDescription() - Constructor for class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
LIME_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
listeners - Variable in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
+

M

+
+
MAGENTA_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
margin - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
markDirty() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
markDirty() - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
max - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
max - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The ID of the property representing the maximum value of the WBar.field.
+
+
maxValue - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The constant maximum value of the WBar.field.
+
+
maxValue - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
min - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
mouseClicked(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
mouseClicked(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
mouseDragged(double, double, int, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
mouseDragged(double, double, int, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
mouseMoved(double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
mouseMoved(double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
mouseReleased(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
mouseReleased(double, double, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
mouseScrolled(double, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
mouseScrolled(double, double, double) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
multiplyColor(int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
 
+
+

N

+
+
name(String) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
+
+
Sets the name of this property, which is used in debug messages.
+
+
NetworkSide - Enum Class in io.github.cottonmc.cotton.gui.networking
+
+
The sides of a network connection.
+
+
NinePatchBackgroundPainter - Class in io.github.cottonmc.cotton.gui.client
+
+
Nine-patch background painters paint rectangles using a special nine-patch texture.
+
+
NinePatchBackgroundPainter(NinePatch<Identifier>) - Constructor for class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
NONE - Static variable in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Empty layout insets that do not provide any borders around content.
+
+
nonnull() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder
+
+
Disallows null values.
+
+
+

O

+
+
ObservableProperty<T> - Class in io.github.cottonmc.cotton.gui.widget.data
+
+
An observable mutable property.
+
+
ObservableProperty.Builder<T> - Class in io.github.cottonmc.cotton.gui.widget.data
+
+
A builder for properties.
+
+
ObservableView<T> - Interface in io.github.cottonmc.cotton.gui.widget.data
+
+
A read-only observable property.
+
+
ObservableView.ChangeListener<T> - Interface in io.github.cottonmc.cotton.gui.widget.data
+
+
A listener for changes in observable views and properties.
+
+
of(boolean) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
+
+
Gets the corresponding input result for a processed boolean.
+
+
of(int, int) - Static method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
+
+
Creates a new positioner that offsets widgets.
+
+
of(SyncedGuiDescription, NetworkSide) - Static method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
+
+
Gets a networking handler for the GUI description that is active on the specified side.
+
+
of(Rect2i) - Static method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Creates a focus of an area and null data.
+
+
of(Inventory, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
of(Inventory, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
of(T) - Static method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
+
Creates a property with an initial value.
+
+
offImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
ofPlayerStorage(Inventory) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Creates a 9x3 slot widget from the "main" part of a player inventory.
+
+
onCharTyped(char) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
onCharTyped(char) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that a character has been typed.
+
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
onClick(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
+
+
onClosed(PlayerEntity) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
onDirectionalKey(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
onFocusGained() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
onFocusGained() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that it has gained focus
+
+
onFocusLost() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
onFocusLost() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that it has lost focus
+
+
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
onHidden() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that it won't be drawn and + hides any visible peers of itself and its children.
+
+
onImage - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
onKeyPressed(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that a key has been pressed.
+
+
onKeyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onKeyReleased(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that a key has been released
+
+
onMessage(PacketByteBuf) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking.MessageReceiver
+
+
Handles a received screen message.
+
+
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
onMouseDown(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been pressed while inside its bounds
+
+
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
onMouseDrag(int, int, int, double, double) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been moved while pressed and inside its bounds.
+
+
onMouseMove(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
onMouseMove(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been moved while inside its bounds.
+
+
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
onMouseScroll(int, int, double) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been scrolled inside its bounds.
+
+
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
onMouseUp(int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that the mouse has been released while inside its bounds
+
+
onPropertyChange(ObservableView<? extends T>, T, T) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener
+
+
Handles a change in an observable property.
+
+
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
onShown() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Notifies this widget that it is visible and + shows any hidden peers of itself and its children.
+
+
onStackChanged(WItemSlot, Inventory, int, ItemStack) - Method in interface io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener
+
+
Handles a changed item stack in an item slot.
+
+
onToggle - Variable in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
onToggle(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
onValueChanged(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
onValueChanged(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
opaqueRgb(int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
ORANGE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
outputOf(Inventory, int) - Static method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
owner - Variable in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
+
+
A reference to the owning item stack of this GUI.
+
+
ownerStack - Variable in class io.github.cottonmc.cotton.gui.ItemSyncedGuiDescription
+
+
The initial item stack of this GUI.
+
+
+

P

+
+
paint(DrawContext, int, int, int) - Method in interface io.github.cottonmc.cotton.gui.widget.icon.Icon
+
+
Paints this icon.
+
+
paint(DrawContext, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
+
 
+
paint(DrawContext, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WClippedPanel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
paint(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Paints this widget.
+
+
paintBackground(DrawContext, int, int, WWidget) - Method in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
Paint the specified panel to the screen.
+
+
paintBackground(DrawContext, int, int, WWidget) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
paintFrame(DrawContext, int, int, Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Paints a single frame for this sprite.
+
+
paintFrame(DrawContext, int, int, Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
 
+
parent - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The containing panel of this widget.
+
+
PINK_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
pixelsToValues(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
playerInventory - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
pop() - Static method in class io.github.cottonmc.cotton.gui.client.Scissors
+
+
Pops the topmost scissor frame and refreshes the scissored area.
+
+
PROCESSED - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
+
 
+
properties - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The properties used for painting this bar.
+
+
propertyDelegate - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
propertyDelegate - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
PropertyDelegateHolder - Interface in io.github.cottonmc.cotton.gui
+
+
This interface can be implemented on block entity classes + for providing a property delegate.
+
+
PURPLE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
push(int, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.Scissors
+
+
Pushes a new scissor frame onto the stack and refreshes the scissored area.
+
+
+

Q

+
+
quickMove(PlayerEntity, int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
+

R

+
+
readOnly() - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
+
Returns a read-only view of this property.
+
+
receive(Identifier, ScreenNetworking.MessageReceiver) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
+
+
Registers a message receiver for the message.
+
+
Rect2i - Record Class in io.github.cottonmc.cotton.gui.widget.data
+
+
An immutable, two-dimensional int rectangle consisting of a position and dimensions.
+
+
Rect2i(int, int, int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Creates an instance of a Rect2i record class.
+
+
RED - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
RED_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
releaseFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
If this widget has a host, releases this widget's focus.
+
+
releaseFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
releaseFocus(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Notifies this gui that the widget wants to give up its hold over focus.
+
+
releaseFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
remove(WWidget) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Removes the widget from the HUD.
+
+
remove(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Removes the widget from this panel.
+
+
removed() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
removed() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
removeListener(ObservableView.ChangeListener<? super T>) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
 
+
removeListener(ObservableView.ChangeListener<? super T>) - Method in interface io.github.cottonmc.cotton.gui.widget.data.ObservableView
+
+
Removes a change listener from this property view if present.
+
+
removeStack(int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
removeStack(int, int) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
render(DrawContext, int, int, float) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
render(DrawContext, int, int, float) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
renderBox(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderCursor(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderSelection(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderSuggestion(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderText(DrawContext, int, int, String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderTextField(DrawContext, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
renderTooltip(DrawContext, int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Internal method to render tooltip data.
+
+
reposition(int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
+
Repositions the root panel.
+
+
reposition(int, int) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
+
Repositions the root panel.
+
+
reposition(WWidget, int, int) - Method in interface io.github.cottonmc.cotton.gui.client.CottonHud.Positioner
+
+
Repositions the widget according to the HUD dimensions.
+
+
requestFocus() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
If this widget has a host, requests the focus from the host.
+
+
requestFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
requestFocus(WWidget) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Notifies this gui that the widget wants to acquire focus.
+
+
requestFocus(WWidget) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
rgb(int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
rgb(int, int, int, int) - Static method in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
RGB(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
RGB(int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
Constructs an RGB object with 100% alpha value (no transparency)
+
+
RGB(int, int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
right() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns the value of the right record component.
+
+
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
 
+
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
 
+
RIGHT - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
 
+
ROOT_PANEL - Static variable in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
The default insets of a root panel, providing 7 pixels around the content on all sides.
+
+
rootPanel - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
rootPanel - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
+

S

+
+
Scissors - Class in io.github.cottonmc.cotton.gui.client
+
+
Contains a stack for GL scissors for restricting the drawn area of a widget.
+
+
Scissors.Frame - Class in io.github.cottonmc.cotton.gui.client
+
+
A single scissor frame in the stack.
+
+
ScreenDrawing - Class in io.github.cottonmc.cotton.gui.client
+
+
ScreenDrawing contains utility methods for drawing contents on a screen.
+
+
ScreenNetworking - Interface in io.github.cottonmc.cotton.gui.networking
+
+
ScreenNetworking handles screen-related network messages sent between the server and the client.
+
+
ScreenNetworking.MessageReceiver - Interface in io.github.cottonmc.cotton.gui.networking
+
+
A handler for received screen messages.
+
+
scrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
The scroll bar of this list.
+
+
scrollCursorIntoView() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
send(Identifier, Consumer<PacketByteBuf>) - Method in interface io.github.cottonmc.cotton.gui.networking.ScreenNetworking
+
+
Sends a screen message to the other side of the connection.
+
+
SERVER - Enum constant in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
+
+
The logical server.
+
+
set(T) - Method in class io.github.cottonmc.cotton.gui.widget.data.ObservableProperty
+
+
Sets this property to a constant value.
+
+
setAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
setAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
setAxis(Axis) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Sets the axis of this box.
+
+
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets this item slot's background painter.
+
+
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Sets the BackgroundPainter of this panel.
+
+
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
Sets the background painter of this inventory widget's slots.
+
+
setBackgroundPainter(BackgroundPainter) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setBottomPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setChangedListener(Consumer<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Sets the color tint of the texture.
+
+
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the light mode color of this label.
+
+
setColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the light mode color of this label.
+
+
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the light and dark mode colors of this label.
+
+
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the light and dark mode colors of this label.
+
+
setColor(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setCursorPos(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the dark mode color of this label.
+
+
setDarkmodeColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the dark mode color of this label.
+
+
setDirection(WAbstractSlider.Direction) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Sets the direction of this slider.
+
+
setDisabledColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setDraggingFinishedListener(IntConsumer) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
setDuration(int) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
setEditable(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setEnabled(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
setEnabledColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Deprecated, for removal: This API element is subject to removal in a future version. + +
+
+
setFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Deprecated, for removal: This API element is subject to removal in a future version. + +
+
+
setFocused(Focus<K>) - Method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
+
+
Applies a focus to the target widget.
+
+
setFocused(Focus<K>) - Method in class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
 
+
setFocusImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setFrames(Texture...) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the animation frames of this sprite.
+
+
setFrames(Identifier...) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the animation frames of this sprite.
+
+
setFullscreen(boolean) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setFullscreen(boolean) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets whether this GUI is fullscreen.
+
+
setFullscreen(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setGaps(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
Set the gaps between grid cells.
+
+
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Sets the horizontal alignment of this box.
+
+
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the horizontal text alignment of this label.
+
+
setHorizontalAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the horizontal alignment of this text widget.
+
+
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
setHost(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Sets the host of this widget and all its children without creating peers.
+
+
setHovered(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Sets the hovered property.
+
+
setIcon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Sets the icon of this button.
+
+
setIcon(Icon) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets the icon to this slot.
+
+
setIconSize(int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Sets the new size of the icon.
+
+
setImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the image of this sprite.
+
+
setImage(Identifier) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the image of this sprite.
+
+
setInputFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Sets the item stack input filter of this slot.
+
+
setInputFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets the item input filter of this item slot.
+
+
setInsertingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Sets whether inserting items into this slot is allowed.
+
+
setInsertingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets whether inserting items into this slot is allowed.
+
+
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
 
+
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
 
+
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
+
+
Sets the layout insets of this panel.
+
+
setInsets(Insets) - Method in class io.github.cottonmc.cotton.gui.widget.WPlainPanel
+
 
+
setItems(List<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
+
Sets the item list of this WItem and resets the animation state.
+
+
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Sets the label of this slider.
+
+
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setLabel(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
setLabelAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Sets the text alignment of this slider's label.
+
+
setLabelUpdater(WLabeledSlider.LabelUpdater) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Sets the WLabeledSlider.LabelUpdater of this slider.
+
+
setLastResponder(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
setLastResponder(WWidget) - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
setLeftPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setListItemHeight(int) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
Sets the height of this list's items to a constant value.
+
+
setLocation(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Sets the location of this widget relative to its parent.
+
+
setMaxLength(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setMaxValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
setMaxValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
setMinValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
setModifiable(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
setOffImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setOnClick(Runnable) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Sets the click handler of this button.
+
+
setOnImage(Texture) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setOnToggle(Consumer<Boolean>) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setOpacity(float) - Method in class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Sets the opacity of the texture.
+
+
setOpaqueTint(int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the tint for this sprite to the following opaque color.
+
+
setOutputFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Sets the item stack output filter of this slot.
+
+
setOutputFilter(Predicate<ItemStack>) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets the item output filter of this item slot.
+
+
setPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setPadding(int, int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setPadding(int, int, int, int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setParent(WPanel) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Sets the parent panel of this widget.
+
+
setPositioner(WWidget, CottonHud.Positioner) - Static method in class io.github.cottonmc.cotton.gui.client.CottonHud
+
+
Sets the positioner of the widget.
+
+
setProperties(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Sets the current properties of this bar.
+
+
setPropertyDelegate(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setPropertyDelegate(PropertyDelegate) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets the object which manages the integer properties used by WBars
+
+
setPropertyDelegate(PropertyDelegate) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setRightPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setRootPanel(WPanel) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setRootPanel(WPanel) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
 
+
setRootPanel(WPanel) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setScrollingHorizontally(TriState) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
setScrollingVertically(TriState) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
setSelectedCard(WWidget) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Sets the selected card of this panel.
+
+
setSelectedIndex(int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Sets the selected index of this panel.
+
+
setSelectedIndex(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Sets the currently open tab by its index.
+
+
setSelectedTab(WTabPanel.Tab) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Sets the currently open tab to the provided WTabPanel.Tab.
+
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WButton
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Sets the size of this widget.
+
+
setSpacing(int) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Sets the spacing between widgets in this box.
+
+
setStack(int, ItemStack) - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
setSuggestion(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setSuggestionColor(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setTakingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Sets whether taking items from this slot is allowed.
+
+
setTakingAllowed(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
Sets whether taking items from this slot is allowed.
+
+
setText(String) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
+
Sets the text of this text field.
+
+
setText(Supplier<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
setText(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the text of this label.
+
+
setText(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the text of this label.
+
+
setTextPredicate(Predicate<String>) - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
setTileHeight(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Sets the tile height of this sprite.
+
+
setTileSize(int, int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Sets the tiling size.
+
+
setTileWidth(int) - Method in class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Sets the tile width of this sprite.
+
+
setTint(int) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the tint for this sprite to the following color-with-alpha.
+
+
setTitleAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setTitleAlignment(HorizontalAlignment) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets the horizontal alignment of the GUI title.
+
+
setTitleAlignment(HorizontalAlignment) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setTitleColor(int) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setTitleColor(int) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets the title color of this GUI.
+
+
setTitleColor(int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setTitleColor(int, int) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setTitleColor(int, int) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets the light and dark title colors of this GUI.
+
+
setTitleColor(int, int) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setTitlePos(Vec2i) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setTitlePos(Vec2i) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets the position of the screen title.
+
+
setTitlePos(Vec2i) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setTitleVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
setTitleVisible(boolean) - Method in interface io.github.cottonmc.cotton.gui.GuiDescription
+
+
Sets whether the title of this GUI should be rendered by the screen.
+
+
setTitleVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
setToggle(boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
 
+
setTopPadding(int) - Method in class io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
 
+
setUv(float, float, float, float) - Method in class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Sets the UV values of this sprite.
+
+
setValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Sets the slider value without calling listeners.
+
+
setValue(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
setValue(int, boolean) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
Sets the slider value.
+
+
setValueChangeListener(IntConsumer) - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Sets the vertical alignment of this box.
+
+
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Sets the vertical text alignment of this label.
+
+
setVerticalAlignment(VerticalAlignment) - Method in class io.github.cottonmc.cotton.gui.widget.WText
+
+
Sets the vertical alignment of this text widget.
+
+
setVisible(boolean) - Method in class io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
Sets whether this slot is visible.
+
+
setWindow(int) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
shouldPause() - Method in class io.github.cottonmc.cotton.gui.client.CottonInventoryScreen
+
 
+
shouldRenderInDarkMode() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Checks if this widget should be rendered in dark mode.
+
+
simple(WWidget) - Static method in interface io.github.cottonmc.cotton.gui.widget.focus.FocusModel
+
+
Creates a simple focus model for a focusable widget.
+
+
SimpleKeyedFocusModel<K> - Class in io.github.cottonmc.cotton.gui.widget.focus
+
+
A FocusModel implementation that wraps a List of foci.
+
+
SimpleKeyedFocusModel(List<Focus<K>>) - Constructor for class io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel
+
+
Constructs a keyed focus model.
+
+
SimpleKeyedFocusModel.Builder<K> - Class in io.github.cottonmc.cotton.gui.widget.focus
+
+
A builder for SimpleKeyedFocusModel.
+
+
singleImage - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
size() - Method in class io.github.cottonmc.cotton.gui.EmptyInventory
+
 
+
sliding - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
SLOT - Static variable in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
The SLOT background painter draws item slots or slot-like widgets.
+
+
SLOT_TEXTURE - Static variable in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
The default texture of item slots and BackgroundPainter.SLOT.
+
+
spacing - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
The spacing between widgets.
+
+
streamChildren() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Returns a stream of all visible top-level widgets in this panel.
+
+
supplier - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
The supplier of new empty widgets.
+
+
SyncedGuiDescription - Class in io.github.cottonmc.cotton.gui
+
+
A screen handler-based GUI description for GUIs with slots.
+
+
SyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Constructs a new synced GUI description without a block inventory or a property delegate.
+
+
SyncedGuiDescription(ScreenHandlerType<?>, int, PlayerInventory, Inventory, PropertyDelegate) - Constructor for class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
Constructs a new synced GUI description.
+
+
+

T

+
+
text - Variable in class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
text - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
text - Variable in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
TEXT_PADDING_X - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
TEXT_PADDING_Y - Static variable in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
Texture - Record Class in io.github.cottonmc.cotton.gui.widget.data
+
+
Represents a texture for a widget.
+
+
Texture(Identifier) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Constructs a new texture that uses the full image.
+
+
Texture(Identifier, float, float, float, float) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Constructs a new texture with custom UV values.
+
+
texturedGuiRect(DrawContext, int, int, int, int, Identifier, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle with UV values based on the width and height.
+
+
texturedGuiRect(DrawContext, int, int, int, int, Identifier, int, int, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle with UV values based on the width and height.
+
+
texturedRect(DrawContext, int, int, int, int, Texture, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
texturedRect(DrawContext, int, int, int, int, Texture, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
texturedRect(DrawContext, int, int, int, int, Identifier, int) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
texturedRect(DrawContext, int, int, int, int, Identifier, int, float) - Static method in class io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
Draws a textured rectangle.
+
+
TextureIcon - Class in io.github.cottonmc.cotton.gui.widget.icon
+
+
An icon that draws a texture.
+
+
TextureIcon(Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Constructs a new texture icon.
+
+
TextureIcon(Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
Constructs a new texture icon.
+
+
THUMB_SIZE - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
tick() - Method in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Ticks all children of this panel.
+
+
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
tick() - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Executes a client-side tick for this widget.
+
+
tint - Variable in class io.github.cottonmc.cotton.gui.widget.WSprite
+
 
+
title(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Sets the tab title.
+
+
titleAlignment - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
titleAlignment - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
titleColor - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
titleColor - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
titleVisible - Variable in class io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
 
+
titleVisible - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
titleX - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
+
The X coordinate of the screen title.
+
+
titleY - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
+
The Y coordinate of the screen title.
+
+
tooltip(Collection<? extends Text>) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Adds lines to the tab's tooltip.
+
+
tooltip(Text...) - Method in class io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
Adds lines to the tab's tooltip.
+
+
TooltipBuilder - Class in io.github.cottonmc.cotton.gui.widget
+
+
A builder for widget tooltips.
+
+
TooltipBuilder() - Constructor for class io.github.cottonmc.cotton.gui.widget.TooltipBuilder
+
 
+
tooltipLabel - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
The translation key of the tooltip.
+
+
tooltipTextComponent - Variable in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
A tooltip text component.
+
+
top - Variable in class io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
 
+
top() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns the value of the top record component.
+
+
TOP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
 
+
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
 
+
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
 
+
toRgb() - Method in class io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
 
+
toRgb() - Method in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
+
Gets an ARGB integer representing this color in the sRGB colorspace.
+
+
toString() - Method in class io.github.cottonmc.cotton.gui.client.Scissors.Frame
+
 
+
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class io.github.cottonmc.cotton.gui.widget.focus.Focus
+
+
Returns a string representation of this record class.
+
+
toString() - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
TRACK_WIDTH - Static variable in class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
+

U

+
+
u1() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns the value of the u1 record component.
+
+
u2() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns the value of the u2 record component.
+
+
unconfigured - Variable in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
UP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
 
+
UP - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
 
+
updateLabel(int) - Method in interface io.github.cottonmc.cotton.gui.widget.WLabeledSlider.LabelUpdater
+
+
Gets the updated label for the new slider value.
+
+
updateValueCoordRatios() - Method in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+ +
+
+

V

+
+
v1() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns the value of the v1 record component.
+
+
v2() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Returns the value of the v2 record component.
+
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
+
Creates component peers and initializes animation data for this Widget and all its children.
+
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WListPanel
+
 
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPanel
+
+
Creates component peers and initializes animation data for this Widget and all its children.
+
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
 
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
 
+
validate(GuiDescription) - Method in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
Creates component peers and initializes animation data for this Widget and all its children.
+
+
ValidatedSlot - Class in io.github.cottonmc.cotton.gui
+
 
+
ValidatedSlot(Inventory, int, int, int) - Constructor for class io.github.cottonmc.cotton.gui.ValidatedSlot
+
 
+
value - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
value - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
+
Returns the enum constant of this class with the specified name.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.networking.NetworkSide
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.InputResult
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
valueToCoordRatio - Variable in class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
A value:coordinate ratio.
+
+
VANILLA - Static variable in interface io.github.cottonmc.cotton.gui.client.BackgroundPainter
+
+
The VANILLA background painter draws a vanilla-like GUI panel using nine-patch textures.
+
+
Vec2i - Record Class in io.github.cottonmc.cotton.gui.widget.data
+
+
An immutable, two-dimensional int vector.
+
+
Vec2i(int, int) - Constructor for record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Creates an instance of a Vec2i record class.
+
+
VERTICAL - Enum constant in enum class io.github.cottonmc.cotton.gui.widget.data.Axis
+
 
+
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WBox
+
+
The vertical alignment for this box's children.
+
+
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WLabel
+
 
+
verticalAlignment - Variable in class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
VerticalAlignment - Enum Class in io.github.cottonmc.cotton.gui.widget.data
+
 
+
verticalGap - Variable in class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
The vertical gap between two grid cells.
+
+
verticalScrollBar - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
+
The vertical scroll bar of this panel.
+
+
+

W

+
+
WAbstractSlider - Class in io.github.cottonmc.cotton.gui.widget
+
+
A base class for slider widgets that can be used to select int values.
+
+
WAbstractSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
 
+
WAbstractSlider.Direction - Enum Class in io.github.cottonmc.cotton.gui.widget
+
+
The direction enum represents all four directions a slider can face.
+
+
WBar - Class in io.github.cottonmc.cotton.gui.widget
+
+
A bar that displays int values from a PropertyDelegate.
+
+
WBar(Texture, Texture, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
WBar(Texture, Texture, int, int, WBar.Direction) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
WBar(Identifier, Identifier, int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
WBar(Identifier, Identifier, int, int, WBar.Direction) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBar
+
 
+
WBar.Direction - Enum Class in io.github.cottonmc.cotton.gui.widget
+
+
The direction of a WBar, representing where the bar will + grown when its field increases.
+
+
WBox - Class in io.github.cottonmc.cotton.gui.widget
+
+
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
+
+
WBox(Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WBox
+
+
Constructs a box.
+
+
WButton - Class in io.github.cottonmc.cotton.gui.widget
+
 
+
WButton() - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Constructs a button with no label and no icon.
+
+
WButton(Icon) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Constructs a button with an icon.
+
+
WButton(Icon, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Constructs a button with an icon and a label.
+
+
WButton(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WButton
+
+
Constructs a button with a label.
+
+
WCardPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
+
+
WCardPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WCardPanel
+
 
+
WClippedPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A panel that is clipped to only render widgets inside its bounds.
+
+
WClippedPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WClippedPanel
+
 
+
WDynamicLabel - Class in io.github.cottonmc.cotton.gui.widget
+
+
Dynamic labels are labels that pull their text from a Supplier<String>.
+
+
WDynamicLabel(Supplier<String>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
WDynamicLabel(Supplier<String>, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
 
+
WGridPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A panel that positions children in a grid.
+
+
WGridPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
Constructs a grid panel with the default grid size.
+
+
WGridPanel(int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WGridPanel
+
+
Constructs a grid panel with a custom grid size.
+
+
WHITE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
WHITE_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
width - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The width of this widget, defaults to 18 pixels.
+
+
width() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns the value of the width record component.
+
+
window - Variable in class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
 
+
WItem - Class in io.github.cottonmc.cotton.gui.widget
+
+
A widget that displays an item or a list of items.
+
+
WItem(List<ItemStack>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
WItem(ItemStack) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
WItem(TagKey<? extends ItemConvertible>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItem
+
 
+
WItemSlot - Class in io.github.cottonmc.cotton.gui.widget
+
+
A widget that displays an item that can be interacted with.
+
+
WItemSlot(Inventory, int, int, int, boolean) - Constructor for class io.github.cottonmc.cotton.gui.widget.WItemSlot
+
 
+
WItemSlot.ChangeListener - Interface in io.github.cottonmc.cotton.gui.widget
+
+
A listener for changes in an item slot.
+
+
withConstantMaximum(Texture, Texture, int, int, WBar.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
+
+
withConstantMaximum(Identifier, Identifier, int, int, WBar.Direction) - Static method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
+
+
withTooltip(String) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Adds a tooltip to the WBar.
+
+
withTooltip(Text) - Method in class io.github.cottonmc.cotton.gui.widget.WBar
+
+
Adds a tooltip Text to the WBar.
+
+
withUv(float, float, float, float) - Method in record class io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
Creates a new texture with different UV values.
+
+
WLabel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A single-line label widget.
+
+
WLabel(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Constructs a new label with the default text color.
+
+
WLabel(Text, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabel
+
+
Constructs a new label.
+
+
WLabeledSlider - Class in io.github.cottonmc.cotton.gui.widget
+
+
A vanilla-style labeled slider widget.
+
+
WLabeledSlider(int, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Constructs a horizontal slider with no default label.
+
+
WLabeledSlider(int, int, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Constructs a horizontal slider.
+
+
WLabeledSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Constructs a slider with no default label.
+
+
WLabeledSlider(int, int, Axis, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WLabeledSlider
+
+
Constructs a slider.
+
+
WLabeledSlider.LabelUpdater - Interface in io.github.cottonmc.cotton.gui.widget
+
+
A label updater updates the label of a slider based on the current value.
+
+
WListPanel<D,W extends WWidget> - Class in io.github.cottonmc.cotton.gui.widget
+
+
Similar to the RecyclerView in Android, this widget represents a scrollable list of items.
+
+
WListPanel(List<D>, Supplier<W>, BiConsumer<D, W>) - Constructor for class io.github.cottonmc.cotton.gui.widget.WListPanel
+
+
Constructs a list panel.
+
+
world - Variable in class io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
 
+
WPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
Panels are widgets that contain other widgets.
+
+
WPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPanel
+
 
+
WPanelWithInsets - Class in io.github.cottonmc.cotton.gui.widget
+
+
A panel that has layout insets.
+
+
WPanelWithInsets() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
+
 
+
WPlainPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A panel that positions children by pixel-perfect positions.
+
+
WPlainPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlainPanel
+
 
+
WPlayerInvPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A player inventory widget that has a visually separate hotbar.
+
+
WPlayerInvPanel(PlayerInventory) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
Constructs a player inventory panel with a label.
+
+
WPlayerInvPanel(PlayerInventory, boolean) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
Constructs a player inventory panel.
+
+
WPlayerInvPanel(PlayerInventory, WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel
+
+
Constructs a player inventory panel.
+
+
WScrollBar - Class in io.github.cottonmc.cotton.gui.widget
+
 
+
WScrollBar() - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Constructs a horizontal scroll bar.
+
+
WScrollBar(Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
Constructs a scroll bar with a custom axis.
+
+
WScrollPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
+
+
WScrollPanel(WWidget) - Constructor for class io.github.cottonmc.cotton.gui.widget.WScrollPanel
+
+
Creates a vertically scrolling panel.
+
+
WSlider - Class in io.github.cottonmc.cotton.gui.widget
+
+
A simple slider widget that can be used to select int values.
+
+
WSlider(int, int, Axis) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSlider
+
 
+
WSprite - Class in io.github.cottonmc.cotton.gui.widget
+
 
+
WSprite(int, Texture...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Create a new animated sprite.
+
+
WSprite(int, Identifier...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Create a new animated sprite.
+
+
WSprite(Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Create a new sprite with a single image.
+
+
WSprite(Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Create a new sprite with a single image.
+
+
WSprite(Identifier, float, float, float, float) - Constructor for class io.github.cottonmc.cotton.gui.widget.WSprite
+
+
Create a new sprite with a single image and custom UV values.
+
+
WTabPanel - Class in io.github.cottonmc.cotton.gui.widget
+
+
A panel that contains creative inventory-style tabs on the top.
+
+
WTabPanel() - Constructor for class io.github.cottonmc.cotton.gui.widget.WTabPanel
+
+
Constructs a new tab panel.
+
+
WTabPanel.Tab - Class in io.github.cottonmc.cotton.gui.widget
+
+
The data of a tab.
+
+
WTabPanel.Tab.Builder - Class in io.github.cottonmc.cotton.gui.widget
+
+
A builder for tab data.
+
+
WText - Class in io.github.cottonmc.cotton.gui.widget
+
+
A multiline label widget.
+
+
WText(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
WText(Text, int) - Constructor for class io.github.cottonmc.cotton.gui.widget.WText
+
 
+
WTextField - Class in io.github.cottonmc.cotton.gui.widget
+
 
+
WTextField() - Constructor for class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
WTextField(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTextField
+
 
+
WTiledSprite - Class in io.github.cottonmc.cotton.gui.widget
+
+
A sprite whose texture will be tiled.
+
+
WTiledSprite(int, int, int, Texture...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Create a new animated tiled sprite.
+
+
WTiledSprite(int, int, int, Identifier...) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Create a new animated tiled sprite.
+
+
WTiledSprite(int, int, Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Create a tiled sprite.
+
+
WTiledSprite(int, int, Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WTiledSprite
+
+
Create a tiled sprite.
+
+
WToggleButton - Class in io.github.cottonmc.cotton.gui.widget
+
 
+
WToggleButton() - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with default images and no label.
+
+
WToggleButton(Texture, Texture) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with custom images and no label.
+
+
WToggleButton(Texture, Texture, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with custom images.
+
+
WToggleButton(Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with default images.
+
+
WToggleButton(Identifier, Identifier) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with custom images and no label.
+
+
WToggleButton(Identifier, Identifier, Text) - Constructor for class io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
Constructs a toggle button with custom images.
+
+
WWidget - Class in io.github.cottonmc.cotton.gui.widget
+
+
The base class for all widgets.
+
+
WWidget() - Constructor for class io.github.cottonmc.cotton.gui.widget.WWidget
+
 
+
+

X

+
+
x - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The X coordinate of this widget relative to its parent.
+
+
x() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns the value of the x record component.
+
+
x() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Returns the value of the x record component.
+
+
+

Y

+
+
y - Variable in class io.github.cottonmc.cotton.gui.widget.WWidget
+
+
The Y coordinate of this widget relative to its parent.
+
+
y() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
Returns the value of the y record component.
+
+
y() - Method in record class io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
Returns the value of the y record component.
+
+
YELLOW_DYE - Static variable in interface io.github.cottonmc.cotton.gui.widget.data.Color
+
 
+
+A B C D E F G H I K L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values
+
+
+ + diff --git a/libgui/index.html b/libgui/index.html index 17b581f..55b8f81 100644 --- a/libgui/index.html +++ b/libgui/index.html @@ -1,91 +1,92 @@ - - - - -Overview (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

LibGui 8.0.0+1.20 API

-
-
-
Packages
-
-
Package
-
Description
- -
-
Basic GUI classes and server-side GUI descriptions.
-
- -
-
Client-side APIs for rendering GUIs and configuring LibGui.
-
- -
-
Screen networking helpers.
-
- -
-
Widgets for building GUIs.
-
- -
-
Data classes used by widgets.
-
- -
-
The widget focus API.
-
- -
-
The icon API for displaying various icons on widgets.
-
-
-
-
-
-
- - + + + + +Overview (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

LibGui 8.1.0+1.20.1 API

+
+
+
Packages
+
+
Package
+
Description
+ +
+
Basic GUI classes and server-side GUI descriptions.
+
+ +
+
Client-side APIs for rendering GUIs and configuring LibGui.
+
+ +
+
Screen networking helpers.
+
+ +
+
Widgets for building GUIs.
+
+ +
+
Data classes used by widgets.
+
+ +
+
The widget focus API.
+
+ +
+
The icon API for displaying various icons on widgets.
+
+
+
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/EmptyInventory.html b/libgui/io/github/cottonmc/cotton/gui/EmptyInventory.html index 016c155..6d3c2e9 100644 --- a/libgui/io/github/cottonmc/cotton/gui/EmptyInventory.html +++ b/libgui/io/github/cottonmc/cotton/gui/EmptyInventory.html @@ -1,283 +1,284 @@ - - - - -EmptyInventory (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class EmptyInventory

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.EmptyInventory
-
-
-
-
All Implemented Interfaces:
-
Inventory, Clearable
-
-
-
public class EmptyInventory -extends Object -implements Inventory
-
An empty inventory that cannot hold any items.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - + + + + +EmptyInventory (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EmptyInventory

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.EmptyInventory
+
+
+
+
All Implemented Interfaces:
+
Inventory, Clearable
+
+
+
public class EmptyInventory +extends Object +implements Inventory
+
An empty inventory that cannot hold any items.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/GuiDescription.html b/libgui/io/github/cottonmc/cotton/gui/GuiDescription.html index b2d1173..a6d2c68 100644 --- a/libgui/io/github/cottonmc/cotton/gui/GuiDescription.html +++ b/libgui/io/github/cottonmc/cotton/gui/GuiDescription.html @@ -1,474 +1,475 @@ - - - - -GuiDescription (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface GuiDescription

-
-
-
-
All Known Implementing Classes:
-
ItemSyncedGuiDescription, LightweightGuiDescription, SyncedGuiDescription
-
-
-
public interface GuiDescription
-
A GUI description represents a GUI without depending on screens. - -

GUI descriptions contain the root panel and the property delegate of the GUI. - They also manage the focused widget.

-
-
See Also:
-
- -
-
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getRootPanel

      -
      WPanel getRootPanel()
      -
      -
    • -
    • -
      -

      getTitleColor

      -
      int getTitleColor()
      -
      -
    • -
    • -
      -

      setRootPanel

      -
      GuiDescription setRootPanel(WPanel panel)
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      GuiDescription setTitleColor(int color)
      -
      Sets the title color of this GUI. - -

      The dark-mode title color will also be set by this method. - If the specified color is WLabel.DEFAULT_TEXT_COLOR, - the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; - otherwise it will be the specified color.

      -
      -
      Parameters:
      -
      color - the new title color
      -
      Returns:
      -
      this GUI
      -
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      GuiDescription setTitleColor(int lightColor, - int darkColor)
      -
      Sets the light and dark title colors of this GUI.
      -
      -
      Parameters:
      -
      lightColor - the light-mode color
      -
      darkColor - the dark-mode color
      -
      Returns:
      -
      this GUI
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      setPropertyDelegate

      -
      GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      -
      Sets the object which manages the integer properties used by WBars
      -
      -
    • -
    • -
      -

      addSlotPeer

      -
      void addSlotPeer(ValidatedSlot slot)
      -
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -void addPainters()
      -
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      -
      -
    • -
    • -
      -

      getPropertyDelegate

      -
      @Nullable -@Nullable PropertyDelegate getPropertyDelegate()
      -
      Gets the object which manages the integer properties used by WBars and such.
      -
      -
    • -
    • -
      -

      isFocused

      -
      boolean isFocused(WWidget widget)
      -
      Tests whether the widget is the currently-focused one.
      -
      -
    • -
    • -
      -

      getFocus

      - -
      Gets the currently-focused WWidget. May be null.
      -
      -
    • -
    • -
      -

      requestFocus

      -
      void requestFocus(WWidget widget)
      -
      Notifies this gui that the widget wants to acquire focus.
      -
      -
    • -
    • -
      -

      releaseFocus

      -
      void releaseFocus(WWidget widget)
      -
      Notifies this gui that the widget wants to give up its hold over focus.
      -
      -
    • -
    • -
      -

      isFullscreen

      -
      boolean isFullscreen()
      -
      Gets whether this GUI is fullscreen. - -

      Fullscreen GUIs have no default background painter and - have the root panel stretched to fit the entire screen on the client.

      -
      -
      Returns:
      -
      true if this GUI is fullscreen, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setFullscreen

      -
      void setFullscreen(boolean fullscreen)
      -
      Sets whether this GUI is fullscreen.
      -
      -
      Parameters:
      -
      fullscreen - true if this GUI is fullscreen, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      isTitleVisible

      -
      boolean isTitleVisible()
      -
      Gets whether the title of this GUI should be rendered by the screen. - -

      Modders can disable this to render the title themselves with a widget.

      -
      -
      Returns:
      -
      true if the title is visible, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setTitleVisible

      -
      void setTitleVisible(boolean titleVisible)
      -
      Sets whether the title of this GUI should be rendered by the screen.
      -
      -
      Parameters:
      -
      titleVisible - true if the title is visible, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      getTitleAlignment

      -
      HorizontalAlignment getTitleAlignment()
      -
      Gets the horizontal alignment of the GUI title.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      setTitleAlignment

      -
      void setTitleAlignment(HorizontalAlignment alignment)
      -
      Sets the horizontal alignment of the GUI title.
      -
      -
      Parameters:
      -
      alignment - the new alignment
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      getTitlePos

      -
      Vec2i getTitlePos()
      -
      Gets the position of the screen title.
      -
      -
      Returns:
      -
      the title position
      -
      Since:
      -
      4.0.0
      -
      -
      -
    • -
    • -
      -

      setTitlePos

      -
      void setTitlePos(Vec2i titlePos)
      -
      Sets the position of the screen title.
      -
      -
      Parameters:
      -
      titlePos - the new title position
      -
      Since:
      -
      4.0.0
      -
      -
      -
    • -
    • -
      -

      isDarkMode

      -
      default net.fabricmc.fabric.api.util.TriState isDarkMode()
      -
      Checks whether dark mode is used for this GUI description.
      -
      -
      Returns:
      -
        -
      • TriState.TRUE to force dark mode -
      • TriState.FALSE to force light mode -
      • TriState.DEFAULT to use the global dark mode setting -
      -
      Since:
      -
      7.1.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +GuiDescription (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface GuiDescription

+
+
+
+
All Known Implementing Classes:
+
ItemSyncedGuiDescription, LightweightGuiDescription, SyncedGuiDescription
+
+
+
public interface GuiDescription
+
A GUI description represents a GUI without depending on screens. + +

GUI descriptions contain the root panel and the property delegate of the GUI. + They also manage the focused widget.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRootPanel

      +
      WPanel getRootPanel()
      +
      +
    • +
    • +
      +

      getTitleColor

      +
      int getTitleColor()
      +
      +
    • +
    • +
      +

      setRootPanel

      +
      GuiDescription setRootPanel(WPanel panel)
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      GuiDescription setTitleColor(int color)
      +
      Sets the title color of this GUI. + +

      The dark-mode title color will also be set by this method. + If the specified color is WLabel.DEFAULT_TEXT_COLOR, + the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; + otherwise it will be the specified color.

      +
      +
      Parameters:
      +
      color - the new title color
      +
      Returns:
      +
      this GUI
      +
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      GuiDescription setTitleColor(int lightColor, + int darkColor)
      +
      Sets the light and dark title colors of this GUI.
      +
      +
      Parameters:
      +
      lightColor - the light-mode color
      +
      darkColor - the dark-mode color
      +
      Returns:
      +
      this GUI
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      setPropertyDelegate

      +
      GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      +
      Sets the object which manages the integer properties used by WBars
      +
      +
    • +
    • +
      +

      addSlotPeer

      +
      void addSlotPeer(ValidatedSlot slot)
      +
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +void addPainters()
      +
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      +
      +
    • +
    • +
      +

      getPropertyDelegate

      +
      @Nullable +@Nullable PropertyDelegate getPropertyDelegate()
      +
      Gets the object which manages the integer properties used by WBars and such.
      +
      +
    • +
    • +
      +

      isFocused

      +
      boolean isFocused(WWidget widget)
      +
      Tests whether the widget is the currently-focused one.
      +
      +
    • +
    • +
      +

      getFocus

      + +
      Gets the currently-focused WWidget. May be null.
      +
      +
    • +
    • +
      +

      requestFocus

      +
      void requestFocus(WWidget widget)
      +
      Notifies this gui that the widget wants to acquire focus.
      +
      +
    • +
    • +
      +

      releaseFocus

      +
      void releaseFocus(WWidget widget)
      +
      Notifies this gui that the widget wants to give up its hold over focus.
      +
      +
    • +
    • +
      +

      isFullscreen

      +
      boolean isFullscreen()
      +
      Gets whether this GUI is fullscreen. + +

      Fullscreen GUIs have no default background painter and + have the root panel stretched to fit the entire screen on the client.

      +
      +
      Returns:
      +
      true if this GUI is fullscreen, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setFullscreen

      +
      void setFullscreen(boolean fullscreen)
      +
      Sets whether this GUI is fullscreen.
      +
      +
      Parameters:
      +
      fullscreen - true if this GUI is fullscreen, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      isTitleVisible

      +
      boolean isTitleVisible()
      +
      Gets whether the title of this GUI should be rendered by the screen. + +

      Modders can disable this to render the title themselves with a widget.

      +
      +
      Returns:
      +
      true if the title is visible, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setTitleVisible

      +
      void setTitleVisible(boolean titleVisible)
      +
      Sets whether the title of this GUI should be rendered by the screen.
      +
      +
      Parameters:
      +
      titleVisible - true if the title is visible, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      getTitleAlignment

      +
      HorizontalAlignment getTitleAlignment()
      +
      Gets the horizontal alignment of the GUI title.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      setTitleAlignment

      +
      void setTitleAlignment(HorizontalAlignment alignment)
      +
      Sets the horizontal alignment of the GUI title.
      +
      +
      Parameters:
      +
      alignment - the new alignment
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      getTitlePos

      +
      Vec2i getTitlePos()
      +
      Gets the position of the screen title.
      +
      +
      Returns:
      +
      the title position
      +
      Since:
      +
      4.0.0
      +
      +
      +
    • +
    • +
      +

      setTitlePos

      +
      void setTitlePos(Vec2i titlePos)
      +
      Sets the position of the screen title.
      +
      +
      Parameters:
      +
      titlePos - the new title position
      +
      Since:
      +
      4.0.0
      +
      +
      +
    • +
    • +
      +

      isDarkMode

      +
      default net.fabricmc.fabric.api.util.TriState isDarkMode()
      +
      Checks whether dark mode is used for this GUI description.
      +
      +
      Returns:
      +
        +
      • TriState.TRUE to force dark mode +
      • TriState.FALSE to force light mode +
      • TriState.DEFAULT to use the global dark mode setting +
      +
      Since:
      +
      7.1.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/ItemSyncedGuiDescription.html b/libgui/io/github/cottonmc/cotton/gui/ItemSyncedGuiDescription.html index a665f2a..9cf2222 100644 --- a/libgui/io/github/cottonmc/cotton/gui/ItemSyncedGuiDescription.html +++ b/libgui/io/github/cottonmc/cotton/gui/ItemSyncedGuiDescription.html @@ -1,265 +1,266 @@ - - - - -ItemSyncedGuiDescription (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ItemSyncedGuiDescription

-
- -
-
-
All Implemented Interfaces:
-
GuiDescription
-
-
-
public class ItemSyncedGuiDescription -extends SyncedGuiDescription
-
A SyncedGuiDescription for an item stack - in an inventory. - -

The owning item is represented with a StackReference, which can be - an item in an entity's inventory or a block's container, or any other reference - to an item stack. - -

If the owning item stack changes in any way, the screen closes by default (see canUse(PlayerEntity)).

-
-
Since:
-
7.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      owner

      -
      protected final StackReference owner
      -
      A reference to the owning item stack of this GUI.
      -
      -
    • -
    • -
      -

      ownerStack

      -
      protected final ItemStack ownerStack
      -
      The initial item stack of this GUI. This stack must not be mutated!
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      ItemSyncedGuiDescription

      -
      public ItemSyncedGuiDescription(ScreenHandlerType<?> type, - int syncId, - PlayerInventory playerInventory, - StackReference owner)
      -
      Constructs an ItemSyncedGuiDescription.
      -
      -
      Parameters:
      -
      type - the screen handler type
      -
      syncId - the sync ID
      -
      playerInventory - the inventory of the player viewing this GUI description
      -
      owner - a reference to the owning item stack of this GUI description
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      canUse

      -
      public boolean canUse(PlayerEntity entity)
      -
      - -

      The default implementation for ItemSyncedGuiDescription returns true if and only if - the current owning item stack is fully equal - to the original owner. - -

      If the item NBT is intended to change, subclasses should override this method to only check - the item and the count. Those subclasses should also take care to respond properly - to any NBT changes in the owning item stack.

      -
      -
      Overrides:
      -
      canUse in class SyncedGuiDescription
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ItemSyncedGuiDescription (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ItemSyncedGuiDescription

+
+ +
+
+
All Implemented Interfaces:
+
GuiDescription
+
+
+
public class ItemSyncedGuiDescription +extends SyncedGuiDescription
+
A SyncedGuiDescription for an item stack + in an inventory. + +

The owning item is represented with a StackReference, which can be + an item in an entity's inventory or a block's container, or any other reference + to an item stack. + +

If the owning item stack changes in any way, the screen closes by default (see canUse(PlayerEntity)).

+
+
Since:
+
7.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      owner

      +
      protected final StackReference owner
      +
      A reference to the owning item stack of this GUI.
      +
      +
    • +
    • +
      +

      ownerStack

      +
      protected final ItemStack ownerStack
      +
      The initial item stack of this GUI. This stack must not be mutated!
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ItemSyncedGuiDescription

      +
      public ItemSyncedGuiDescription(ScreenHandlerType<?> type, + int syncId, + PlayerInventory playerInventory, + StackReference owner)
      +
      Constructs an ItemSyncedGuiDescription.
      +
      +
      Parameters:
      +
      type - the screen handler type
      +
      syncId - the sync ID
      +
      playerInventory - the inventory of the player viewing this GUI description
      +
      owner - a reference to the owning item stack of this GUI description
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      canUse

      +
      public boolean canUse(PlayerEntity entity)
      +
      + +

      The default implementation for ItemSyncedGuiDescription returns true if and only if + the current owning item stack is fully equal + to the original owner. + +

      If the item NBT is intended to change, subclasses should override this method to only check + the item and the count. Those subclasses should also take care to respond properly + to any NBT changes in the owning item stack.

      +
      +
      Overrides:
      +
      canUse in class SyncedGuiDescription
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.html b/libgui/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.html index 4d52664..2f8e86b 100644 --- a/libgui/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.html +++ b/libgui/io/github/cottonmc/cotton/gui/PropertyDelegateHolder.html @@ -1,143 +1,144 @@ - - - - -PropertyDelegateHolder (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface PropertyDelegateHolder

-
-
-
-
public interface PropertyDelegateHolder
-
This interface can be implemented on block entity classes - for providing a property delegate.
-
-
See Also:
-
- -
-
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    Gets this block entity's property delegate.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getPropertyDelegate

      -
      PropertyDelegate getPropertyDelegate()
      -
      Gets this block entity's property delegate. - -

      On the client, the returned property delegate must have a working implementation of - PropertyDelegate.set(int, int).

      -
      -
      Returns:
      -
      the property delegate
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +PropertyDelegateHolder (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PropertyDelegateHolder

+
+
+
+
public interface PropertyDelegateHolder
+
This interface can be implemented on block entity classes + for providing a property delegate.
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Gets this block entity's property delegate.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPropertyDelegate

      +
      PropertyDelegate getPropertyDelegate()
      +
      Gets this block entity's property delegate. + +

      On the client, the returned property delegate must have a working implementation of + PropertyDelegate.set(int, int).

      +
      +
      Returns:
      +
      the property delegate
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/SyncedGuiDescription.html b/libgui/io/github/cottonmc/cotton/gui/SyncedGuiDescription.html index 445a9e5..591baee 100644 --- a/libgui/io/github/cottonmc/cotton/gui/SyncedGuiDescription.html +++ b/libgui/io/github/cottonmc/cotton/gui/SyncedGuiDescription.html @@ -1,957 +1,958 @@ - - - - -SyncedGuiDescription (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class SyncedGuiDescription

-
-
java.lang.Object -
net.minecraft.screen.ScreenHandler -
io.github.cottonmc.cotton.gui.SyncedGuiDescription
-
-
-
-
-
All Implemented Interfaces:
-
GuiDescription
-
-
-
Direct Known Subclasses:
-
ItemSyncedGuiDescription
-
-
-
public class SyncedGuiDescription -extends ScreenHandler -implements GuiDescription
-
A screen handler-based GUI description for GUIs with slots.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      blockInventory

      -
      protected Inventory blockInventory
      -
      -
    • -
    • -
      -

      playerInventory

      -
      protected PlayerInventory playerInventory
      -
      -
    • -
    • -
      -

      world

      -
      protected World world
      -
      -
    • -
    • -
      -

      propertyDelegate

      -
      protected PropertyDelegate propertyDelegate
      -
      -
    • -
    • -
      -

      rootPanel

      -
      protected WPanel rootPanel
      -
      -
    • -
    • -
      -

      titleColor

      -
      protected int titleColor
      -
      -
    • -
    • -
      -

      darkTitleColor

      -
      protected int darkTitleColor
      -
      -
    • -
    • -
      -

      fullscreen

      -
      protected boolean fullscreen
      -
      -
    • -
    • -
      -

      titleVisible

      -
      protected boolean titleVisible
      -
      -
    • -
    • -
      -

      titleAlignment

      -
      protected HorizontalAlignment titleAlignment
      -
      -
    • -
    • -
      -

      focus

      -
      protected WWidget focus
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      SyncedGuiDescription

      -
      public SyncedGuiDescription(ScreenHandlerType<?> type, - int syncId, - PlayerInventory playerInventory)
      -
      Constructs a new synced GUI description without a block inventory or a property delegate.
      -
      -
      Parameters:
      -
      type - the ScreenHandlerType of this GUI description
      -
      syncId - the current sync ID
      -
      playerInventory - the player inventory of the player viewing this screen
      -
      -
      -
    • -
    • -
      -

      SyncedGuiDescription

      -
      public SyncedGuiDescription(ScreenHandlerType<?> type, - int syncId, - PlayerInventory playerInventory, - @Nullable - @Nullable Inventory blockInventory, - @Nullable - @Nullable PropertyDelegate propertyDelegate)
      -
      Constructs a new synced GUI description.
      -
      -
      Parameters:
      -
      type - the ScreenHandlerType of this GUI description
      -
      syncId - the current sync ID
      -
      playerInventory - the player inventory of the player viewing this screen
      -
      blockInventory - the block inventory of a corresponding container block, or null if not found or applicable
      -
      propertyDelegate - a property delegate whose properties, if any, will automatically be added
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getRootPanel

      -
      public WPanel getRootPanel()
      -
      -
      Specified by:
      -
      getRootPanel in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      getTitleColor

      -
      public int getTitleColor()
      -
      -
      Specified by:
      -
      getTitleColor in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setRootPanel

      -
      public SyncedGuiDescription setRootPanel(WPanel panel)
      -
      -
      Specified by:
      -
      setRootPanel in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      public SyncedGuiDescription setTitleColor(int color)
      -
      Description copied from interface: GuiDescription
      -
      Sets the title color of this GUI. - -

      The dark-mode title color will also be set by this method. - If the specified color is WLabel.DEFAULT_TEXT_COLOR, - the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; - otherwise it will be the specified color.

      -
      -
      Specified by:
      -
      setTitleColor in interface GuiDescription
      -
      Parameters:
      -
      color - the new title color
      -
      Returns:
      -
      this GUI
      -
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      public SyncedGuiDescription setTitleColor(int lightColor, - int darkColor)
      -
      Description copied from interface: GuiDescription
      -
      Sets the light and dark title colors of this GUI.
      -
      -
      Specified by:
      -
      setTitleColor in interface GuiDescription
      -
      Parameters:
      -
      lightColor - the light-mode color
      -
      darkColor - the dark-mode color
      -
      Returns:
      -
      this GUI
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Description copied from interface: GuiDescription
      -
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      -
      -
      Specified by:
      -
      addPainters in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      addSlotPeer

      -
      public void addSlotPeer(ValidatedSlot slot)
      -
      Description copied from interface: GuiDescription
      -
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      -
      -
      Specified by:
      -
      addSlotPeer in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      quickMove

      -
      public ItemStack quickMove(PlayerEntity player, - int index)
      -
      -
      Specified by:
      -
      quickMove in class ScreenHandler
      -
      -
      -
    • -
    • -
      -

      getPropertyDelegate

      -
      @Nullable -public @Nullable PropertyDelegate getPropertyDelegate()
      -
      Description copied from interface: GuiDescription
      -
      Gets the object which manages the integer properties used by WBars and such.
      -
      -
      Specified by:
      -
      getPropertyDelegate in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setPropertyDelegate

      -
      public GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      -
      Description copied from interface: GuiDescription
      -
      Sets the object which manages the integer properties used by WBars
      -
      -
      Specified by:
      -
      setPropertyDelegate in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      createPlayerInventoryPanel

      -
      public WPlayerInvPanel createPlayerInventoryPanel()
      -
      Creates a player inventory widget from this panel's player inventory.
      -
      -
      Returns:
      -
      the created inventory widget
      -
      -
      -
    • -
    • -
      -

      createPlayerInventoryPanel

      -
      public WPlayerInvPanel createPlayerInventoryPanel(boolean hasLabel)
      -
      Creates a player inventory widget from this panel's player inventory.
      -
      -
      Parameters:
      -
      hasLabel - whether the "Inventory" label should be displayed
      -
      Returns:
      -
      the created inventory widget
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      createPlayerInventoryPanel

      -
      public WPlayerInvPanel createPlayerInventoryPanel(WWidget label)
      -
      Creates a player inventory widget from this panel's player inventory.
      -
      -
      Parameters:
      -
      label - the inventory label widget
      -
      Returns:
      -
      the created inventory widget
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      getBlockInventory

      -
      public static Inventory getBlockInventory(ScreenHandlerContext ctx)
      -
      Gets the block inventory at the context. - -

      If no inventory is found, returns EmptyInventory.INSTANCE. - -

      Searches for these implementations in the following order: -

        -
      1. Blocks implementing InventoryProvider
      2. -
      3. Block entities implementing InventoryProvider
      4. -
      5. Block entities implementing Inventory
      6. -
      -
      -
      Parameters:
      -
      ctx - the context
      -
      Returns:
      -
      the found inventory
      -
      -
      -
    • -
    • -
      -

      getBlockInventory

      -
      public static Inventory getBlockInventory(ScreenHandlerContext ctx, - int size)
      -
      Gets the block inventory at the context. - -

      If no inventory is found, returns a simple mutable inventory - with the specified number of slots. - -

      Searches for these implementations in the following order: -

        -
      1. Blocks implementing InventoryProvider
      2. -
      3. Block entities implementing InventoryProvider
      4. -
      5. Block entities implementing Inventory
      6. -
      -
      -
      Parameters:
      -
      ctx - the context
      -
      size - the fallback inventory size
      -
      Returns:
      -
      the found inventory
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      getBlockPropertyDelegate

      -
      public static PropertyDelegate getBlockPropertyDelegate(ScreenHandlerContext ctx)
      -
      Gets the property delegate at the context. - -

      If no property delegate is found, returns an empty property delegate with no properties. - -

      Searches for block entities implementing PropertyDelegateHolder.

      -
      -
      Parameters:
      -
      ctx - the context
      -
      Returns:
      -
      the found property delegate
      -
      -
      -
    • -
    • -
      -

      getBlockPropertyDelegate

      -
      public static PropertyDelegate getBlockPropertyDelegate(ScreenHandlerContext ctx, - int size)
      -
      Gets the property delegate at the context. - -

      If no property delegate is found, returns an array property delegate - with the specified number of properties. - -

      Searches for block entities implementing PropertyDelegateHolder.

      -
      -
      Parameters:
      -
      ctx - the context
      -
      size - the number of properties
      -
      Returns:
      -
      the found property delegate
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      canUse

      -
      public boolean canUse(PlayerEntity entity)
      -
      -
      Specified by:
      -
      canUse in class ScreenHandler
      -
      -
      -
    • -
    • -
      -

      onClosed

      -
      public void onClosed(PlayerEntity player)
      -
      -
      Overrides:
      -
      onClosed in class ScreenHandler
      -
      -
      -
    • -
    • -
      -

      isFocused

      -
      public boolean isFocused(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Tests whether the widget is the currently-focused one.
      -
      -
      Specified by:
      -
      isFocused in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      getFocus

      -
      public WWidget getFocus()
      -
      Description copied from interface: GuiDescription
      -
      Gets the currently-focused WWidget. May be null.
      -
      -
      Specified by:
      -
      getFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      requestFocus

      -
      public void requestFocus(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Notifies this gui that the widget wants to acquire focus.
      -
      -
      Specified by:
      -
      requestFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      releaseFocus

      -
      public void releaseFocus(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Notifies this gui that the widget wants to give up its hold over focus.
      -
      -
      Specified by:
      -
      releaseFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      isFullscreen

      -
      public boolean isFullscreen()
      -
      Description copied from interface: GuiDescription
      -
      Gets whether this GUI is fullscreen. - -

      Fullscreen GUIs have no default background painter and - have the root panel stretched to fit the entire screen on the client.

      -
      -
      Specified by:
      -
      isFullscreen in interface GuiDescription
      -
      Returns:
      -
      true if this GUI is fullscreen, false otherwise
      -
      -
      -
    • -
    • -
      -

      setFullscreen

      -
      public void setFullscreen(boolean fullscreen)
      -
      Description copied from interface: GuiDescription
      -
      Sets whether this GUI is fullscreen.
      -
      -
      Specified by:
      -
      setFullscreen in interface GuiDescription
      -
      Parameters:
      -
      fullscreen - true if this GUI is fullscreen, false otherwise
      -
      -
      -
    • -
    • -
      -

      isTitleVisible

      -
      public boolean isTitleVisible()
      -
      Description copied from interface: GuiDescription
      -
      Gets whether the title of this GUI should be rendered by the screen. - -

      Modders can disable this to render the title themselves with a widget.

      -
      -
      Specified by:
      -
      isTitleVisible in interface GuiDescription
      -
      Returns:
      -
      true if the title is visible, false otherwise
      -
      -
      -
    • -
    • -
      -

      setTitleVisible

      -
      public void setTitleVisible(boolean titleVisible)
      -
      Description copied from interface: GuiDescription
      -
      Sets whether the title of this GUI should be rendered by the screen.
      -
      -
      Specified by:
      -
      setTitleVisible in interface GuiDescription
      -
      Parameters:
      -
      titleVisible - true if the title is visible, false otherwise
      -
      -
      -
    • -
    • -
      -

      getTitleAlignment

      -
      public HorizontalAlignment getTitleAlignment()
      -
      Description copied from interface: GuiDescription
      -
      Gets the horizontal alignment of the GUI title.
      -
      -
      Specified by:
      -
      getTitleAlignment in interface GuiDescription
      -
      Returns:
      -
      the alignment
      -
      -
      -
    • -
    • -
      -

      setTitleAlignment

      -
      public void setTitleAlignment(HorizontalAlignment titleAlignment)
      -
      Description copied from interface: GuiDescription
      -
      Sets the horizontal alignment of the GUI title.
      -
      -
      Specified by:
      -
      setTitleAlignment in interface GuiDescription
      -
      Parameters:
      -
      titleAlignment - the new alignment
      -
      -
      -
    • -
    • -
      -

      getTitlePos

      -
      public Vec2i getTitlePos()
      -
      Description copied from interface: GuiDescription
      -
      Gets the position of the screen title.
      -
      -
      Specified by:
      -
      getTitlePos in interface GuiDescription
      -
      Returns:
      -
      the title position
      -
      -
      -
    • -
    • -
      -

      setTitlePos

      -
      public void setTitlePos(Vec2i titlePos)
      -
      Description copied from interface: GuiDescription
      -
      Sets the position of the screen title.
      -
      -
      Specified by:
      -
      setTitlePos in interface GuiDescription
      -
      Parameters:
      -
      titlePos - the new title position
      -
      -
      -
    • -
    • -
      -

      getNetworkSide

      -
      public final NetworkSide getNetworkSide()
      -
      Gets the network side this GUI description runs on.
      -
      -
      Returns:
      -
      this GUI's network side
      -
      Since:
      -
      3.3.0
      -
      -
      -
    • -
    • -
      -

      getPacketSender

      -
      public final net.fabricmc.fabric.api.networking.v1.PacketSender getPacketSender()
      -
      Gets the packet sender corresponding to this GUI's network side.
      -
      -
      Returns:
      -
      the packet sender
      -
      Since:
      -
      3.3.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +SyncedGuiDescription (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SyncedGuiDescription

+
+
java.lang.Object +
net.minecraft.screen.ScreenHandler +
io.github.cottonmc.cotton.gui.SyncedGuiDescription
+
+
+
+
+
All Implemented Interfaces:
+
GuiDescription
+
+
+
Direct Known Subclasses:
+
ItemSyncedGuiDescription
+
+
+
public class SyncedGuiDescription +extends ScreenHandler +implements GuiDescription
+
A screen handler-based GUI description for GUIs with slots.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      blockInventory

      +
      protected Inventory blockInventory
      +
      +
    • +
    • +
      +

      playerInventory

      +
      protected PlayerInventory playerInventory
      +
      +
    • +
    • +
      +

      world

      +
      protected World world
      +
      +
    • +
    • +
      +

      propertyDelegate

      +
      protected PropertyDelegate propertyDelegate
      +
      +
    • +
    • +
      +

      rootPanel

      +
      protected WPanel rootPanel
      +
      +
    • +
    • +
      +

      titleColor

      +
      protected int titleColor
      +
      +
    • +
    • +
      +

      darkTitleColor

      +
      protected int darkTitleColor
      +
      +
    • +
    • +
      +

      fullscreen

      +
      protected boolean fullscreen
      +
      +
    • +
    • +
      +

      titleVisible

      +
      protected boolean titleVisible
      +
      +
    • +
    • +
      +

      titleAlignment

      +
      protected HorizontalAlignment titleAlignment
      +
      +
    • +
    • +
      +

      focus

      +
      protected WWidget focus
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SyncedGuiDescription

      +
      public SyncedGuiDescription(ScreenHandlerType<?> type, + int syncId, + PlayerInventory playerInventory)
      +
      Constructs a new synced GUI description without a block inventory or a property delegate.
      +
      +
      Parameters:
      +
      type - the ScreenHandlerType of this GUI description
      +
      syncId - the current sync ID
      +
      playerInventory - the player inventory of the player viewing this screen
      +
      +
      +
    • +
    • +
      +

      SyncedGuiDescription

      +
      public SyncedGuiDescription(ScreenHandlerType<?> type, + int syncId, + PlayerInventory playerInventory, + @Nullable + @Nullable Inventory blockInventory, + @Nullable + @Nullable PropertyDelegate propertyDelegate)
      +
      Constructs a new synced GUI description.
      +
      +
      Parameters:
      +
      type - the ScreenHandlerType of this GUI description
      +
      syncId - the current sync ID
      +
      playerInventory - the player inventory of the player viewing this screen
      +
      blockInventory - the block inventory of a corresponding container block, or null if not found or applicable
      +
      propertyDelegate - a property delegate whose properties, if any, will automatically be added
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRootPanel

      +
      public WPanel getRootPanel()
      +
      +
      Specified by:
      +
      getRootPanel in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      getTitleColor

      +
      public int getTitleColor()
      +
      +
      Specified by:
      +
      getTitleColor in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setRootPanel

      +
      public SyncedGuiDescription setRootPanel(WPanel panel)
      +
      +
      Specified by:
      +
      setRootPanel in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      public SyncedGuiDescription setTitleColor(int color)
      +
      Description copied from interface: GuiDescription
      +
      Sets the title color of this GUI. + +

      The dark-mode title color will also be set by this method. + If the specified color is WLabel.DEFAULT_TEXT_COLOR, + the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; + otherwise it will be the specified color.

      +
      +
      Specified by:
      +
      setTitleColor in interface GuiDescription
      +
      Parameters:
      +
      color - the new title color
      +
      Returns:
      +
      this GUI
      +
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      public SyncedGuiDescription setTitleColor(int lightColor, + int darkColor)
      +
      Description copied from interface: GuiDescription
      +
      Sets the light and dark title colors of this GUI.
      +
      +
      Specified by:
      +
      setTitleColor in interface GuiDescription
      +
      Parameters:
      +
      lightColor - the light-mode color
      +
      darkColor - the dark-mode color
      +
      Returns:
      +
      this GUI
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Description copied from interface: GuiDescription
      +
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      +
      +
      Specified by:
      +
      addPainters in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      addSlotPeer

      +
      public void addSlotPeer(ValidatedSlot slot)
      +
      Description copied from interface: GuiDescription
      +
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      +
      +
      Specified by:
      +
      addSlotPeer in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      quickMove

      +
      public ItemStack quickMove(PlayerEntity player, + int index)
      +
      +
      Specified by:
      +
      quickMove in class ScreenHandler
      +
      +
      +
    • +
    • +
      +

      getPropertyDelegate

      +
      @Nullable +public @Nullable PropertyDelegate getPropertyDelegate()
      +
      Description copied from interface: GuiDescription
      +
      Gets the object which manages the integer properties used by WBars and such.
      +
      +
      Specified by:
      +
      getPropertyDelegate in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setPropertyDelegate

      +
      public GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      +
      Description copied from interface: GuiDescription
      +
      Sets the object which manages the integer properties used by WBars
      +
      +
      Specified by:
      +
      setPropertyDelegate in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      createPlayerInventoryPanel

      +
      public WPlayerInvPanel createPlayerInventoryPanel()
      +
      Creates a player inventory widget from this panel's player inventory.
      +
      +
      Returns:
      +
      the created inventory widget
      +
      +
      +
    • +
    • +
      +

      createPlayerInventoryPanel

      +
      public WPlayerInvPanel createPlayerInventoryPanel(boolean hasLabel)
      +
      Creates a player inventory widget from this panel's player inventory.
      +
      +
      Parameters:
      +
      hasLabel - whether the "Inventory" label should be displayed
      +
      Returns:
      +
      the created inventory widget
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      createPlayerInventoryPanel

      +
      public WPlayerInvPanel createPlayerInventoryPanel(WWidget label)
      +
      Creates a player inventory widget from this panel's player inventory.
      +
      +
      Parameters:
      +
      label - the inventory label widget
      +
      Returns:
      +
      the created inventory widget
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      getBlockInventory

      +
      public static Inventory getBlockInventory(ScreenHandlerContext ctx)
      +
      Gets the block inventory at the context. + +

      If no inventory is found, returns EmptyInventory.INSTANCE. + +

      Searches for these implementations in the following order: +

        +
      1. Blocks implementing InventoryProvider
      2. +
      3. Block entities implementing InventoryProvider
      4. +
      5. Block entities implementing Inventory
      6. +
      +
      +
      Parameters:
      +
      ctx - the context
      +
      Returns:
      +
      the found inventory
      +
      +
      +
    • +
    • +
      +

      getBlockInventory

      +
      public static Inventory getBlockInventory(ScreenHandlerContext ctx, + int size)
      +
      Gets the block inventory at the context. + +

      If no inventory is found, returns a simple mutable inventory + with the specified number of slots. + +

      Searches for these implementations in the following order: +

        +
      1. Blocks implementing InventoryProvider
      2. +
      3. Block entities implementing InventoryProvider
      4. +
      5. Block entities implementing Inventory
      6. +
      +
      +
      Parameters:
      +
      ctx - the context
      +
      size - the fallback inventory size
      +
      Returns:
      +
      the found inventory
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      getBlockPropertyDelegate

      +
      public static PropertyDelegate getBlockPropertyDelegate(ScreenHandlerContext ctx)
      +
      Gets the property delegate at the context. + +

      If no property delegate is found, returns an empty property delegate with no properties. + +

      Searches for block entities implementing PropertyDelegateHolder.

      +
      +
      Parameters:
      +
      ctx - the context
      +
      Returns:
      +
      the found property delegate
      +
      +
      +
    • +
    • +
      +

      getBlockPropertyDelegate

      +
      public static PropertyDelegate getBlockPropertyDelegate(ScreenHandlerContext ctx, + int size)
      +
      Gets the property delegate at the context. + +

      If no property delegate is found, returns an array property delegate + with the specified number of properties. + +

      Searches for block entities implementing PropertyDelegateHolder.

      +
      +
      Parameters:
      +
      ctx - the context
      +
      size - the number of properties
      +
      Returns:
      +
      the found property delegate
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      canUse

      +
      public boolean canUse(PlayerEntity entity)
      +
      +
      Specified by:
      +
      canUse in class ScreenHandler
      +
      +
      +
    • +
    • +
      +

      onClosed

      +
      public void onClosed(PlayerEntity player)
      +
      +
      Overrides:
      +
      onClosed in class ScreenHandler
      +
      +
      +
    • +
    • +
      +

      isFocused

      +
      public boolean isFocused(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Tests whether the widget is the currently-focused one.
      +
      +
      Specified by:
      +
      isFocused in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      getFocus

      +
      public WWidget getFocus()
      +
      Description copied from interface: GuiDescription
      +
      Gets the currently-focused WWidget. May be null.
      +
      +
      Specified by:
      +
      getFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      requestFocus

      +
      public void requestFocus(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Notifies this gui that the widget wants to acquire focus.
      +
      +
      Specified by:
      +
      requestFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      releaseFocus

      +
      public void releaseFocus(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Notifies this gui that the widget wants to give up its hold over focus.
      +
      +
      Specified by:
      +
      releaseFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      isFullscreen

      +
      public boolean isFullscreen()
      +
      Description copied from interface: GuiDescription
      +
      Gets whether this GUI is fullscreen. + +

      Fullscreen GUIs have no default background painter and + have the root panel stretched to fit the entire screen on the client.

      +
      +
      Specified by:
      +
      isFullscreen in interface GuiDescription
      +
      Returns:
      +
      true if this GUI is fullscreen, false otherwise
      +
      +
      +
    • +
    • +
      +

      setFullscreen

      +
      public void setFullscreen(boolean fullscreen)
      +
      Description copied from interface: GuiDescription
      +
      Sets whether this GUI is fullscreen.
      +
      +
      Specified by:
      +
      setFullscreen in interface GuiDescription
      +
      Parameters:
      +
      fullscreen - true if this GUI is fullscreen, false otherwise
      +
      +
      +
    • +
    • +
      +

      isTitleVisible

      +
      public boolean isTitleVisible()
      +
      Description copied from interface: GuiDescription
      +
      Gets whether the title of this GUI should be rendered by the screen. + +

      Modders can disable this to render the title themselves with a widget.

      +
      +
      Specified by:
      +
      isTitleVisible in interface GuiDescription
      +
      Returns:
      +
      true if the title is visible, false otherwise
      +
      +
      +
    • +
    • +
      +

      setTitleVisible

      +
      public void setTitleVisible(boolean titleVisible)
      +
      Description copied from interface: GuiDescription
      +
      Sets whether the title of this GUI should be rendered by the screen.
      +
      +
      Specified by:
      +
      setTitleVisible in interface GuiDescription
      +
      Parameters:
      +
      titleVisible - true if the title is visible, false otherwise
      +
      +
      +
    • +
    • +
      +

      getTitleAlignment

      +
      public HorizontalAlignment getTitleAlignment()
      +
      Description copied from interface: GuiDescription
      +
      Gets the horizontal alignment of the GUI title.
      +
      +
      Specified by:
      +
      getTitleAlignment in interface GuiDescription
      +
      Returns:
      +
      the alignment
      +
      +
      +
    • +
    • +
      +

      setTitleAlignment

      +
      public void setTitleAlignment(HorizontalAlignment titleAlignment)
      +
      Description copied from interface: GuiDescription
      +
      Sets the horizontal alignment of the GUI title.
      +
      +
      Specified by:
      +
      setTitleAlignment in interface GuiDescription
      +
      Parameters:
      +
      titleAlignment - the new alignment
      +
      +
      +
    • +
    • +
      +

      getTitlePos

      +
      public Vec2i getTitlePos()
      +
      Description copied from interface: GuiDescription
      +
      Gets the position of the screen title.
      +
      +
      Specified by:
      +
      getTitlePos in interface GuiDescription
      +
      Returns:
      +
      the title position
      +
      +
      +
    • +
    • +
      +

      setTitlePos

      +
      public void setTitlePos(Vec2i titlePos)
      +
      Description copied from interface: GuiDescription
      +
      Sets the position of the screen title.
      +
      +
      Specified by:
      +
      setTitlePos in interface GuiDescription
      +
      Parameters:
      +
      titlePos - the new title position
      +
      +
      +
    • +
    • +
      +

      getNetworkSide

      +
      public final NetworkSide getNetworkSide()
      +
      Gets the network side this GUI description runs on.
      +
      +
      Returns:
      +
      this GUI's network side
      +
      Since:
      +
      3.3.0
      +
      +
      +
    • +
    • +
      +

      getPacketSender

      +
      public final net.fabricmc.fabric.api.networking.v1.PacketSender getPacketSender()
      +
      Gets the packet sender corresponding to this GUI's network side.
      +
      +
      Returns:
      +
      the packet sender
      +
      Since:
      +
      3.3.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/ValidatedSlot.html b/libgui/io/github/cottonmc/cotton/gui/ValidatedSlot.html index a7aef83..565ebf7 100644 --- a/libgui/io/github/cottonmc/cotton/gui/ValidatedSlot.html +++ b/libgui/io/github/cottonmc/cotton/gui/ValidatedSlot.html @@ -1,456 +1,541 @@ - - - - -ValidatedSlot (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ValidatedSlot

-
-
java.lang.Object -
net.minecraft.screen.slot.Slot -
io.github.cottonmc.cotton.gui.ValidatedSlot
-
-
-
-
-
public class ValidatedSlot -extends Slot
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      ValidatedSlot

      -
      public ValidatedSlot(Inventory inventory, - int index, - int x, - int y)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      canInsert

      -
      public boolean canInsert(ItemStack stack)
      -
      -
      Overrides:
      -
      canInsert in class Slot
      -
      -
      -
    • -
    • -
      -

      canTakeItems

      -
      public boolean canTakeItems(PlayerEntity player)
      -
      -
      Overrides:
      -
      canTakeItems in class Slot
      -
      -
      -
    • -
    • -
      -

      getStack

      -
      public ItemStack getStack()
      -
      -
      Overrides:
      -
      getStack in class Slot
      -
      -
      -
    • -
    • -
      -

      markDirty

      -
      public void markDirty()
      -
      -
      Overrides:
      -
      markDirty in class Slot
      -
      -
      -
    • -
    • -
      -

      getInventoryIndex

      -
      public int getInventoryIndex()
      -
      Gets the index of this slot in its inventory.
      -
      -
      Returns:
      -
      the inventory index
      -
      -
      -
    • -
    • -
      -

      isInsertingAllowed

      -
      public boolean isInsertingAllowed()
      -
      Returns whether items can be inserted into this slot.
      -
      -
      Returns:
      -
      true if items can be inserted, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      setInsertingAllowed

      -
      public void setInsertingAllowed(boolean insertingAllowed)
      -
      Sets whether inserting items into this slot is allowed.
      -
      -
      Parameters:
      -
      insertingAllowed - true if items can be inserted, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      isTakingAllowed

      -
      public boolean isTakingAllowed()
      -
      Returns whether items can be taken from this slot.
      -
      -
      Returns:
      -
      true if items can be taken, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      setTakingAllowed

      -
      public void setTakingAllowed(boolean takingAllowed)
      -
      Sets whether taking items from this slot is allowed.
      -
      -
      Parameters:
      -
      takingAllowed - true if items can be taken, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      getFilter

      -
      public Predicate<ItemStack> getFilter()
      -
      Gets the item stack filter of this slot.
      -
      -
      Returns:
      -
      the item filter
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setFilter

      -
      public void setFilter(Predicate<ItemStack> filter)
      -
      Sets the item stack filter of this slot.
      -
      -
      Parameters:
      -
      filter - the new item filter
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      addChangeListener

      -
      public void addChangeListener(WItemSlot owner, - WItemSlot.ChangeListener listener)
      -
      Adds a change listener to this slot. - Does nothing if the listener is already registered.
      -
      -
      Parameters:
      -
      owner - the owner of this slot
      -
      listener - the listener
      -
      Throws:
      -
      NullPointerException - if either parameter is null
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      isEnabled

      -
      public boolean isEnabled()
      -
      -
      Overrides:
      -
      isEnabled in class Slot
      -
      -
      -
    • -
    • -
      -

      isVisible

      -
      public boolean isVisible()
      -
      Tests whether this slot is visible.
      -
      -
      Returns:
      -
      true if this slot is visible, false otherwise
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      setVisible

      -
      public void setVisible(boolean visible)
      -
      Sets whether this slot is visible.
      -
      -
      Parameters:
      -
      visible - true if this slot if visible, false otherwise
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ValidatedSlot (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ValidatedSlot

+
+
java.lang.Object +
net.minecraft.screen.slot.Slot +
io.github.cottonmc.cotton.gui.ValidatedSlot
+
+
+
+
+
public class ValidatedSlot +extends Slot
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ValidatedSlot

      +
      public ValidatedSlot(Inventory inventory, + int index, + int x, + int y)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      canInsert

      +
      public boolean canInsert(ItemStack stack)
      +
      +
      Overrides:
      +
      canInsert in class Slot
      +
      +
      +
    • +
    • +
      +

      canTakeItems

      +
      public boolean canTakeItems(PlayerEntity player)
      +
      +
      Overrides:
      +
      canTakeItems in class Slot
      +
      +
      +
    • +
    • +
      +

      getStack

      +
      public ItemStack getStack()
      +
      +
      Overrides:
      +
      getStack in class Slot
      +
      +
      +
    • +
    • +
      +

      markDirty

      +
      public void markDirty()
      +
      +
      Overrides:
      +
      markDirty in class Slot
      +
      +
      +
    • +
    • +
      +

      getInventoryIndex

      +
      public int getInventoryIndex()
      +
      Gets the index of this slot in its inventory.
      +
      +
      Returns:
      +
      the inventory index
      +
      +
      +
    • +
    • +
      +

      isInsertingAllowed

      +
      public boolean isInsertingAllowed()
      +
      Returns whether items can be inserted into this slot.
      +
      +
      Returns:
      +
      true if items can be inserted, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      setInsertingAllowed

      +
      public void setInsertingAllowed(boolean insertingAllowed)
      +
      Sets whether inserting items into this slot is allowed.
      +
      +
      Parameters:
      +
      insertingAllowed - true if items can be inserted, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      isTakingAllowed

      +
      public boolean isTakingAllowed()
      +
      Returns whether items can be taken from this slot.
      +
      +
      Returns:
      +
      true if items can be taken, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      setTakingAllowed

      +
      public void setTakingAllowed(boolean takingAllowed)
      +
      Sets whether taking items from this slot is allowed.
      +
      +
      Parameters:
      +
      takingAllowed - true if items can be taken, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      getInputFilter

      +
      public Predicate<ItemStack> getInputFilter()
      +
      Gets the item stack input filter of this slot.
      +
      +
      Returns:
      +
      the item input filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      setInputFilter

      +
      public void setInputFilter(Predicate<ItemStack> inputFilter)
      +
      Sets the item stack input filter of this slot.
      +
      +
      Parameters:
      +
      inputFilter - the new item input filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      getOutputFilter

      +
      public Predicate<ItemStack> getOutputFilter()
      +
      Gets the item stack output filter of this slot.
      +
      +
      Returns:
      +
      the item output filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      setOutputFilter

      +
      public void setOutputFilter(Predicate<ItemStack> outputFilter)
      +
      Sets the item stack output filter of this slot.
      +
      +
      Parameters:
      +
      outputFilter - the new item output filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      getFilter

      +
      @Deprecated(forRemoval=true) +public Predicate<ItemStack> getFilter()
      +
      Deprecated, for removal: This API element is subject to removal in a future version. +
      Replaced by getInputFilter()
      +
      +
      Gets the item stack filter of this slot.
      +
      +
      Returns:
      +
      the item filter
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setFilter

      +
      @Deprecated(forRemoval=true) +public void setFilter(Predicate<ItemStack> filter)
      +
      Deprecated, for removal: This API element is subject to removal in a future version. + +
      +
      Sets the item stack filter of this slot.
      +
      +
      Parameters:
      +
      filter - the new item filter
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      addChangeListener

      +
      public void addChangeListener(WItemSlot owner, + WItemSlot.ChangeListener listener)
      +
      Adds a change listener to this slot. + Does nothing if the listener is already registered.
      +
      +
      Parameters:
      +
      owner - the owner of this slot
      +
      listener - the listener
      +
      Throws:
      +
      NullPointerException - if either parameter is null
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      isEnabled

      +
      public boolean isEnabled()
      +
      +
      Overrides:
      +
      isEnabled in class Slot
      +
      +
      +
    • +
    • +
      +

      isVisible

      +
      public boolean isVisible()
      +
      Tests whether this slot is visible.
      +
      +
      Returns:
      +
      true if this slot is visible, false otherwise
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      setVisible

      +
      public void setVisible(boolean visible)
      +
      Sets whether this slot is visible.
      +
      +
      Parameters:
      +
      visible - true if this slot if visible, false otherwise
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/BackgroundPainter.html b/libgui/io/github/cottonmc/cotton/gui/client/BackgroundPainter.html index a84cd82..576fe25 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/BackgroundPainter.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/BackgroundPainter.html @@ -1,335 +1,336 @@ - - - - -BackgroundPainter (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface BackgroundPainter

-
-
-
-
All Known Implementing Classes:
-
NinePatchBackgroundPainter
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public interface BackgroundPainter
-
Background painters are used to paint the background of a widget. - The background painter instance of a widget can be changed to customize the look of a widget.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      VANILLA

      -
      static final BackgroundPainter VANILLA
      -
      The VANILLA background painter draws a vanilla-like GUI panel using nine-patch textures. - -

      This background painter uses libgui:textures/widget/panel_light.png as the light texture and - libgui:textures/widget/panel_dark.png as the dark texture. - -

      This background painter is the default painter for root panels. - * You can override GuiDescription.addPainters() to customize the painter yourself.

      -
      -
      Since:
      -
      1.5.0
      -
      -
      -
    • -
    • -
      -

      SLOT

      -
      static final BackgroundPainter SLOT
      -
      The SLOT background painter draws item slots or slot-like widgets. - -

      For item slots, this painter uses libgui:textures/widget/item_slot.png.

      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paintBackground

      -
      void paintBackground(DrawContext context, - int left, - int top, - WWidget panel)
      -
      Paint the specified panel to the screen.
      -
      -
      Parameters:
      -
      context - The draw context
      -
      left - The absolute position of the left of the panel, in gui-screen coordinates
      -
      top - The absolute position of the top of the panel, in gui-screen coordinates
      -
      panel - The panel being painted
      -
      -
      -
    • -
    • -
      -

      createColorful

      -
      static BackgroundPainter createColorful(int panelColor)
      -
      Creates a colorful gui panel painter. This painter paints the panel using the specified color.
      -
      -
      Parameters:
      -
      panelColor - the panel background color
      -
      Returns:
      -
      a colorful gui panel painter
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      createColorful

      -
      static BackgroundPainter createColorful(int panelColor, - float contrast)
      -
      Creates a colorful gui panel painter that has a custom contrast between the shadows and highlights.
      -
      -
      Parameters:
      -
      panelColor - the panel background color
      -
      contrast - the contrast between the shadows and highlights
      -
      Returns:
      -
      a colorful gui panel painter
      -
      -
      -
    • -
    • -
      -

      createNinePatch

      -
      static NinePatchBackgroundPainter createNinePatch(Identifier texture)
      -
      Creates a new nine-patch background painter. - -

      The resulting painter has a corner size of 4 px and a corner UV of 0.25.

      -
      -
      Parameters:
      -
      texture - the background painter texture
      -
      Returns:
      -
      a new nine-patch background painter
      -
      Since:
      -
      1.5.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      createNinePatch

      -
      static NinePatchBackgroundPainter createNinePatch(Texture texture, - Consumer<juuxel.libninepatch.NinePatch.Builder<Identifier>> configurator)
      -
      Creates a new nine-patch background painter with a custom configuration.
      -
      -
      Parameters:
      -
      texture - the background painter texture
      -
      configurator - a consumer that configures the NinePatch.Builder
      -
      Returns:
      -
      the created nine-patch background painter
      -
      Since:
      -
      4.0.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      createLightDarkVariants

      -
      static BackgroundPainter createLightDarkVariants(BackgroundPainter light, - BackgroundPainter dark)
      -
      Creates a background painter that uses either the light or the dark background painter - depending on the current setting.
      -
      -
      Parameters:
      -
      light - the light mode background painter
      -
      dark - the dark mode background painter
      -
      Returns:
      -
      a new background painter that chooses between the two inputs
      -
      Since:
      -
      1.5.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +BackgroundPainter (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface BackgroundPainter

+
+
+
+
All Known Implementing Classes:
+
NinePatchBackgroundPainter
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public interface BackgroundPainter
+
Background painters are used to paint the background of a widget. + The background painter instance of a widget can be changed to customize the look of a widget.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      VANILLA

      +
      static final BackgroundPainter VANILLA
      +
      The VANILLA background painter draws a vanilla-like GUI panel using nine-patch textures. + +

      This background painter uses libgui:textures/widget/panel_light.png as the light texture and + libgui:textures/widget/panel_dark.png as the dark texture. + +

      This background painter is the default painter for root panels. + * You can override GuiDescription.addPainters() to customize the painter yourself.

      +
      +
      Since:
      +
      1.5.0
      +
      +
      +
    • +
    • +
      +

      SLOT

      +
      static final BackgroundPainter SLOT
      +
      The SLOT background painter draws item slots or slot-like widgets. + +

      For item slots, this painter uses libgui:textures/widget/item_slot.png.

      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paintBackground

      +
      void paintBackground(DrawContext context, + int left, + int top, + WWidget panel)
      +
      Paint the specified panel to the screen.
      +
      +
      Parameters:
      +
      context - The draw context
      +
      left - The absolute position of the left of the panel, in gui-screen coordinates
      +
      top - The absolute position of the top of the panel, in gui-screen coordinates
      +
      panel - The panel being painted
      +
      +
      +
    • +
    • +
      +

      createColorful

      +
      static BackgroundPainter createColorful(int panelColor)
      +
      Creates a colorful gui panel painter. This painter paints the panel using the specified color.
      +
      +
      Parameters:
      +
      panelColor - the panel background color
      +
      Returns:
      +
      a colorful gui panel painter
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      createColorful

      +
      static BackgroundPainter createColorful(int panelColor, + float contrast)
      +
      Creates a colorful gui panel painter that has a custom contrast between the shadows and highlights.
      +
      +
      Parameters:
      +
      panelColor - the panel background color
      +
      contrast - the contrast between the shadows and highlights
      +
      Returns:
      +
      a colorful gui panel painter
      +
      +
      +
    • +
    • +
      +

      createNinePatch

      +
      static NinePatchBackgroundPainter createNinePatch(Identifier texture)
      +
      Creates a new nine-patch background painter. + +

      The resulting painter has a corner size of 4 px and a corner UV of 0.25.

      +
      +
      Parameters:
      +
      texture - the background painter texture
      +
      Returns:
      +
      a new nine-patch background painter
      +
      Since:
      +
      1.5.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      createNinePatch

      +
      static NinePatchBackgroundPainter createNinePatch(Texture texture, + Consumer<juuxel.libninepatch.NinePatch.Builder<Identifier>> configurator)
      +
      Creates a new nine-patch background painter with a custom configuration.
      +
      +
      Parameters:
      +
      texture - the background painter texture
      +
      configurator - a consumer that configures the NinePatch.Builder
      +
      Returns:
      +
      the created nine-patch background painter
      +
      Since:
      +
      4.0.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      createLightDarkVariants

      +
      static BackgroundPainter createLightDarkVariants(BackgroundPainter light, + BackgroundPainter dark)
      +
      Creates a background painter that uses either the light or the dark background painter + depending on the current setting.
      +
      +
      Parameters:
      +
      light - the light mode background painter
      +
      dark - the dark mode background painter
      +
      Returns:
      +
      a new background painter that chooses between the two inputs
      +
      Since:
      +
      1.5.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/CottonClientScreen.html b/libgui/io/github/cottonmc/cotton/gui/client/CottonClientScreen.html index 89fe83d..bc536bf 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/CottonClientScreen.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/CottonClientScreen.html @@ -1,570 +1,571 @@ - - - - -CottonClientScreen (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class CottonClientScreen

-
-
java.lang.Object -
net.minecraft.client.gui.AbstractParentElement -
net.minecraft.client.gui.screen.Screen -
io.github.cottonmc.cotton.gui.client.CottonClientScreen
-
-
-
-
-
-
All Implemented Interfaces:
-
io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl, Drawable, Element, Navigable, ParentElement
-
-
-
public class CottonClientScreen -extends Screen -implements io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      description

      -
      protected GuiDescription description
      -
      -
    • -
    • -
      -

      left

      -
      protected int left
      -
      -
    • -
    • -
      -

      top

      -
      protected int top
      -
      -
    • -
    • -
      -

      titleX

      -
      protected int titleX
      -
      The X coordinate of the screen title. - This is relative to the root panel's top-left corner.
      -
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      titleY

      -
      protected int titleY
      -
      The Y coordinate of the screen title. - This is relative to the root panel's top-left corner.
      -
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      lastResponder

      -
      @Nullable -protected @Nullable WWidget lastResponder
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      CottonClientScreen

      -
      public CottonClientScreen(GuiDescription description)
      -
      -
    • -
    • -
      -

      CottonClientScreen

      -
      public CottonClientScreen(Text title, - GuiDescription description)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getDescription

      -
      public GuiDescription getDescription()
      -
      -
      Specified by:
      -
      getDescription in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      -
      -
      -
    • -
    • -
      -

      init

      -
      public void init()
      -
      -
      Overrides:
      -
      init in class Screen
      -
      -
      -
    • -
    • -
      -

      removed

      -
      public void removed()
      -
      -
      Overrides:
      -
      removed in class Screen
      -
      -
      -
    • -
    • -
      -

      getLastResponder

      -
      @Nullable -public @Nullable WWidget getLastResponder()
      -
      -
      Specified by:
      -
      getLastResponder in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      -
      -
      -
    • -
    • -
      -

      setLastResponder

      -
      public void setLastResponder(@Nullable - @Nullable WWidget lastResponder)
      -
      -
      Specified by:
      -
      setLastResponder in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      -
      -
      -
    • -
    • -
      -

      reposition

      -
      protected void reposition(int screenWidth, - int screenHeight)
      -
      Repositions the root panel.
      -
      -
      Parameters:
      -
      screenWidth - the width of the screen
      -
      screenHeight - the height of the screen
      -
      -
      -
    • -
    • -
      -

      render

      -
      public void render(DrawContext context, - int mouseX, - int mouseY, - float partialTicks)
      -
      -
      Specified by:
      -
      render in interface Drawable
      -
      Overrides:
      -
      render in class Screen
      -
      -
      -
    • -
    • -
      -

      tick

      -
      public void tick()
      -
      -
      Overrides:
      -
      tick in class Screen
      -
      -
      -
    • -
    • -
      -

      mouseClicked

      -
      public boolean mouseClicked(double mouseX, - double mouseY, - int mouseButton)
      -
      -
      Specified by:
      -
      mouseClicked in interface Element
      -
      Specified by:
      -
      mouseClicked in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      mouseReleased

      -
      public boolean mouseReleased(double mouseX, - double mouseY, - int mouseButton)
      -
      -
      Specified by:
      -
      mouseReleased in interface Element
      -
      Specified by:
      -
      mouseReleased in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      mouseDragged

      -
      public boolean mouseDragged(double mouseX, - double mouseY, - int mouseButton, - double deltaX, - double deltaY)
      -
      -
      Specified by:
      -
      mouseDragged in interface Element
      -
      Specified by:
      -
      mouseDragged in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      mouseScrolled

      -
      public boolean mouseScrolled(double mouseX, - double mouseY, - double amount)
      -
      -
      Specified by:
      -
      mouseScrolled in interface Element
      -
      Specified by:
      -
      mouseScrolled in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      mouseMoved

      -
      public void mouseMoved(double mouseX, - double mouseY)
      -
      -
      Specified by:
      -
      mouseMoved in interface Element
      -
      -
      -
    • -
    • -
      -

      charTyped

      -
      public boolean charTyped(char ch, - int keyCode)
      -
      -
      Specified by:
      -
      charTyped in interface Element
      -
      Specified by:
      -
      charTyped in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      keyPressed

      -
      public boolean keyPressed(int ch, - int keyCode, - int modifiers)
      -
      -
      Specified by:
      -
      keyPressed in interface Element
      -
      Specified by:
      -
      keyPressed in interface ParentElement
      -
      Overrides:
      -
      keyPressed in class Screen
      -
      -
      -
    • -
    • -
      -

      keyReleased

      -
      public boolean keyReleased(int ch, - int keyCode, - int modifiers)
      -
      -
      Specified by:
      -
      keyReleased in interface Element
      -
      Specified by:
      -
      keyReleased in interface ParentElement
      -
      -
      -
    • -
    • -
      -

      addElementNarrations

      -
      protected void addElementNarrations(NarrationMessageBuilder builder)
      -
      -
      Overrides:
      -
      addElementNarrations in class Screen
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +CottonClientScreen (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CottonClientScreen

+
+
java.lang.Object +
net.minecraft.client.gui.AbstractParentElement +
net.minecraft.client.gui.screen.Screen +
io.github.cottonmc.cotton.gui.client.CottonClientScreen
+
+
+
+
+
+
All Implemented Interfaces:
+
io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl, Drawable, Element, Navigable, ParentElement
+
+
+
public class CottonClientScreen +extends Screen +implements io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      description

      +
      protected GuiDescription description
      +
      +
    • +
    • +
      +

      left

      +
      protected int left
      +
      +
    • +
    • +
      +

      top

      +
      protected int top
      +
      +
    • +
    • +
      +

      titleX

      +
      protected int titleX
      +
      The X coordinate of the screen title. + This is relative to the root panel's top-left corner.
      +
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      titleY

      +
      protected int titleY
      +
      The Y coordinate of the screen title. + This is relative to the root panel's top-left corner.
      +
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      lastResponder

      +
      @Nullable +protected @Nullable WWidget lastResponder
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CottonClientScreen

      +
      public CottonClientScreen(GuiDescription description)
      +
      +
    • +
    • +
      +

      CottonClientScreen

      +
      public CottonClientScreen(Text title, + GuiDescription description)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDescription

      +
      public GuiDescription getDescription()
      +
      +
      Specified by:
      +
      getDescription in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      +
      +
      +
    • +
    • +
      +

      init

      +
      public void init()
      +
      +
      Overrides:
      +
      init in class Screen
      +
      +
      +
    • +
    • +
      +

      removed

      +
      public void removed()
      +
      +
      Overrides:
      +
      removed in class Screen
      +
      +
      +
    • +
    • +
      +

      getLastResponder

      +
      @Nullable +public @Nullable WWidget getLastResponder()
      +
      +
      Specified by:
      +
      getLastResponder in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      +
      +
      +
    • +
    • +
      +

      setLastResponder

      +
      public void setLastResponder(@Nullable + @Nullable WWidget lastResponder)
      +
      +
      Specified by:
      +
      setLastResponder in interface io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
      +
      +
      +
    • +
    • +
      +

      reposition

      +
      protected void reposition(int screenWidth, + int screenHeight)
      +
      Repositions the root panel.
      +
      +
      Parameters:
      +
      screenWidth - the width of the screen
      +
      screenHeight - the height of the screen
      +
      +
      +
    • +
    • +
      +

      render

      +
      public void render(DrawContext context, + int mouseX, + int mouseY, + float partialTicks)
      +
      +
      Specified by:
      +
      render in interface Drawable
      +
      Overrides:
      +
      render in class Screen
      +
      +
      +
    • +
    • +
      +

      tick

      +
      public void tick()
      +
      +
      Overrides:
      +
      tick in class Screen
      +
      +
      +
    • +
    • +
      +

      mouseClicked

      +
      public boolean mouseClicked(double mouseX, + double mouseY, + int mouseButton)
      +
      +
      Specified by:
      +
      mouseClicked in interface Element
      +
      Specified by:
      +
      mouseClicked in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      mouseReleased

      +
      public boolean mouseReleased(double mouseX, + double mouseY, + int mouseButton)
      +
      +
      Specified by:
      +
      mouseReleased in interface Element
      +
      Specified by:
      +
      mouseReleased in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      mouseDragged

      +
      public boolean mouseDragged(double mouseX, + double mouseY, + int mouseButton, + double deltaX, + double deltaY)
      +
      +
      Specified by:
      +
      mouseDragged in interface Element
      +
      Specified by:
      +
      mouseDragged in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      mouseScrolled

      +
      public boolean mouseScrolled(double mouseX, + double mouseY, + double amount)
      +
      +
      Specified by:
      +
      mouseScrolled in interface Element
      +
      Specified by:
      +
      mouseScrolled in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      mouseMoved

      +
      public void mouseMoved(double mouseX, + double mouseY)
      +
      +
      Specified by:
      +
      mouseMoved in interface Element
      +
      +
      +
    • +
    • +
      +

      charTyped

      +
      public boolean charTyped(char ch, + int keyCode)
      +
      +
      Specified by:
      +
      charTyped in interface Element
      +
      Specified by:
      +
      charTyped in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      keyPressed

      +
      public boolean keyPressed(int ch, + int keyCode, + int modifiers)
      +
      +
      Specified by:
      +
      keyPressed in interface Element
      +
      Specified by:
      +
      keyPressed in interface ParentElement
      +
      Overrides:
      +
      keyPressed in class Screen
      +
      +
      +
    • +
    • +
      +

      keyReleased

      +
      public boolean keyReleased(int ch, + int keyCode, + int modifiers)
      +
      +
      Specified by:
      +
      keyReleased in interface Element
      +
      Specified by:
      +
      keyReleased in interface ParentElement
      +
      +
      +
    • +
    • +
      +

      addElementNarrations

      +
      protected void addElementNarrations(NarrationMessageBuilder builder)
      +
      +
      Overrides:
      +
      addElementNarrations in class Screen
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.Positioner.html b/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.Positioner.html index f1de912..e07dd29 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.Positioner.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.Positioner.html @@ -1,189 +1,190 @@ - - - - -CottonHud.Positioner (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface CottonHud.Positioner

-
-
-
-
Enclosing class:
-
CottonHud
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public static interface CottonHud.Positioner
-
Positioners can be used to change the position of a widget based on the window dimensions.
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis.
    -
    - -
    of(int x, - int y)
    -
    -
    Creates a new positioner that offsets widgets.
    -
    -
    void
    -
    reposition(WWidget widget, - int hudWidth, - int hudHeight)
    -
    -
    Repositions the widget according to the HUD dimensions.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      reposition

      -
      void reposition(WWidget widget, - int hudWidth, - int hudHeight)
      -
      Repositions the widget according to the HUD dimensions.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      hudWidth - the width of the HUD
      -
      hudHeight - the height of the HUD
      -
      -
      -
    • -
    • -
      -

      of

      -
      static CottonHud.Positioner of(int x, - int y)
      -
      Creates a new positioner that offsets widgets. - -

      If an offset is negative, the offset is subtracted from the HUD dimension on that axis.

      -
      -
      Parameters:
      -
      x - the x offset
      -
      y - the y offset
      -
      Returns:
      -
      an offsetting positioner
      -
      -
      -
    • -
    • -
      -

      horizontallyCentered

      -
      static CottonHud.Positioner horizontallyCentered(int y)
      -
      Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis. - -

      If the Y offset is negative, the offset is subtracted from the HUD height.

      -
      -
      Parameters:
      -
      y - the y offset
      -
      Returns:
      -
      a centering positioner
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +CottonHud.Positioner (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface CottonHud.Positioner

+
+
+
+
Enclosing class:
+
CottonHud
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface CottonHud.Positioner
+
Positioners can be used to change the position of a widget based on the window dimensions.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis.
    +
    + +
    of(int x, + int y)
    +
    +
    Creates a new positioner that offsets widgets.
    +
    +
    void
    +
    reposition(WWidget widget, + int hudWidth, + int hudHeight)
    +
    +
    Repositions the widget according to the HUD dimensions.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      reposition

      +
      void reposition(WWidget widget, + int hudWidth, + int hudHeight)
      +
      Repositions the widget according to the HUD dimensions.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      hudWidth - the width of the HUD
      +
      hudHeight - the height of the HUD
      +
      +
      +
    • +
    • +
      +

      of

      +
      static CottonHud.Positioner of(int x, + int y)
      +
      Creates a new positioner that offsets widgets. + +

      If an offset is negative, the offset is subtracted from the HUD dimension on that axis.

      +
      +
      Parameters:
      +
      x - the x offset
      +
      y - the y offset
      +
      Returns:
      +
      an offsetting positioner
      +
      +
      +
    • +
    • +
      +

      horizontallyCentered

      +
      static CottonHud.Positioner horizontallyCentered(int y)
      +
      Creates a new positioner that centers widgets on the X axis and offsets them on the Y axis. + +

      If the Y offset is negative, the offset is subtracted from the HUD height.

      +
      +
      Parameters:
      +
      y - the y offset
      +
      Returns:
      +
      a centering positioner
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.html b/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.html index 0e798f4..9c79456 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/CottonHud.html @@ -1,324 +1,325 @@ - - - - -CottonHud (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class CottonHud

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.CottonHud
-
-
-
-
@Environment(CLIENT) -public final class CottonHud -extends Object
-
Manages widgets that are painted on the in-game HUD.
-
-
-
    - -
  • -
    -

    Nested Class Summary

    -
    Nested Classes
    -
    -
    Modifier and Type
    -
    Class
    -
    Description
    -
    static interface 
    - -
    -
    Positioners can be used to change the position of a widget based on the window dimensions.
    -
    -
    -
    -
  • - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    - -
     
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    static void
    -
    add(WWidget widget)
    -
    -
    Adds a new widget to the HUD.
    -
    -
    static void
    -
    add(WWidget widget, - int x, - int y)
    -
    -
    Adds a new widget to the HUD at the specified offsets.
    -
    -
    static void
    -
    add(WWidget widget, - int x, - int y, - int width, - int height)
    -
    -
    Adds a new widget to the HUD at the specified offsets and resizes it.
    -
    -
    static void
    -
    add(WWidget widget, - CottonHud.Positioner positioner)
    -
    -
    Adds a new widget to the HUD with a custom positioner.
    -
    -
    static void
    -
    add(WWidget widget, - CottonHud.Positioner positioner, - int width, - int height)
    -
    -
    Adds a new widget to the HUD with a custom positioner and resizes it.
    -
    -
    static void
    -
    remove(WWidget widget)
    -
    -
    Removes the widget from the HUD.
    -
    -
    static void
    - -
    -
    Sets the positioner of the widget.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      CottonHud

      -
      public CottonHud()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public static void add(WWidget widget)
      -
      Adds a new widget to the HUD.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      -
      -
    • -
    • -
      -

      add

      -
      public static void add(WWidget widget, - int x, - int y)
      -
      Adds a new widget to the HUD at the specified offsets.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      x - the x offset
      -
      y - the y offset
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      add

      -
      public static void add(WWidget widget, - int x, - int y, - int width, - int height)
      -
      Adds a new widget to the HUD at the specified offsets and resizes it.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      x - the x offset
      -
      y - the y offset
      -
      width - the width of the widget
      -
      height - the height of the widget
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      add

      -
      public static void add(WWidget widget, - CottonHud.Positioner positioner)
      -
      Adds a new widget to the HUD with a custom positioner.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      positioner - the positioner
      -
      -
      -
    • -
    • -
      -

      add

      -
      public static void add(WWidget widget, - CottonHud.Positioner positioner, - int width, - int height)
      -
      Adds a new widget to the HUD with a custom positioner and resizes it.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      positioner - the positioner
      -
      width - the width of the widget
      -
      height - the height of the widget
      -
      -
      -
    • -
    • -
      -

      setPositioner

      -
      public static void setPositioner(WWidget widget, - CottonHud.Positioner positioner)
      -
      Sets the positioner of the widget.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      positioner - the positioner
      -
      -
      -
    • -
    • -
      -

      remove

      -
      public static void remove(WWidget widget)
      -
      Removes the widget from the HUD.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +CottonHud (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CottonHud

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.CottonHud
+
+
+
+
@Environment(CLIENT) +public final class CottonHud +extends Object
+
Manages widgets that are painted on the in-game HUD.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static interface 
    + +
    +
    Positioners can be used to change the position of a widget based on the window dimensions.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static void
    +
    add(WWidget widget)
    +
    +
    Adds a new widget to the HUD.
    +
    +
    static void
    +
    add(WWidget widget, + int x, + int y)
    +
    +
    Adds a new widget to the HUD at the specified offsets.
    +
    +
    static void
    +
    add(WWidget widget, + int x, + int y, + int width, + int height)
    +
    +
    Adds a new widget to the HUD at the specified offsets and resizes it.
    +
    +
    static void
    +
    add(WWidget widget, + CottonHud.Positioner positioner)
    +
    +
    Adds a new widget to the HUD with a custom positioner.
    +
    +
    static void
    +
    add(WWidget widget, + CottonHud.Positioner positioner, + int width, + int height)
    +
    +
    Adds a new widget to the HUD with a custom positioner and resizes it.
    +
    +
    static void
    +
    remove(WWidget widget)
    +
    +
    Removes the widget from the HUD.
    +
    +
    static void
    + +
    +
    Sets the positioner of the widget.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CottonHud

      +
      public CottonHud()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public static void add(WWidget widget)
      +
      Adds a new widget to the HUD.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      +
      +
    • +
    • +
      +

      add

      +
      public static void add(WWidget widget, + int x, + int y)
      +
      Adds a new widget to the HUD at the specified offsets.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      x - the x offset
      +
      y - the y offset
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      add

      +
      public static void add(WWidget widget, + int x, + int y, + int width, + int height)
      +
      Adds a new widget to the HUD at the specified offsets and resizes it.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      x - the x offset
      +
      y - the y offset
      +
      width - the width of the widget
      +
      height - the height of the widget
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      add

      +
      public static void add(WWidget widget, + CottonHud.Positioner positioner)
      +
      Adds a new widget to the HUD with a custom positioner.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      positioner - the positioner
      +
      +
      +
    • +
    • +
      +

      add

      +
      public static void add(WWidget widget, + CottonHud.Positioner positioner, + int width, + int height)
      +
      Adds a new widget to the HUD with a custom positioner and resizes it.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      positioner - the positioner
      +
      width - the width of the widget
      +
      height - the height of the widget
      +
      +
      +
    • +
    • +
      +

      setPositioner

      +
      public static void setPositioner(WWidget widget, + CottonHud.Positioner positioner)
      +
      Sets the positioner of the widget.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      positioner - the positioner
      +
      +
      +
    • +
    • +
      +

      remove

      +
      public static void remove(WWidget widget)
      +
      Removes the widget from the HUD.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.html b/libgui/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.html index 823d50c..37483cf 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.html @@ -1,651 +1,652 @@ - - - - -CottonInventoryScreen (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class CottonInventoryScreen<T extends SyncedGuiDescription>

-
- -
-
-
Type Parameters:
-
T - the description type
-
-
-
All Implemented Interfaces:
-
io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl, Drawable, Element, Navigable, ParentElement, ScreenHandlerProvider<T>
-
-
-
public class CottonInventoryScreen<T extends SyncedGuiDescription> -extends HandledScreen<T> -implements io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
-
A screen for a SyncedGuiDescription.
-
-
- -
-
- -
- -
-
-
- - + + + + +CottonInventoryScreen (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CottonInventoryScreen<T extends SyncedGuiDescription>

+
+ +
+
+
Type Parameters:
+
T - the description type
+
+
+
All Implemented Interfaces:
+
io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl, Drawable, Element, Navigable, ParentElement, ScreenHandlerProvider<T>
+
+
+
public class CottonInventoryScreen<T extends SyncedGuiDescription> +extends HandledScreen<T> +implements io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl
+
A screen for a SyncedGuiDescription.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/LibGui.html b/libgui/io/github/cottonmc/cotton/gui/client/LibGui.html index 3d43703..08b3d37 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/LibGui.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/LibGui.html @@ -1,142 +1,143 @@ - - - - -LibGui (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class LibGui

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.LibGui
-
-
-
-
public final class LibGui -extends Object
-
This class provides access to LibGui configuration and other global data.
-
-
Since:
-
4.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      isDarkMode

      -
      public static boolean isDarkMode()
      -
      Returns whether LibGui is running in dark mode and widgets should use dark theming.
      -
      -
      Returns:
      -
      true if widgets should use dark theming, false otherwise
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +LibGui (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LibGui

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.LibGui
+
+
+
+
public final class LibGui +extends Object
+
This class provides access to LibGui configuration and other global data.
+
+
Since:
+
4.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isDarkMode

      +
      public static boolean isDarkMode()
      +
      Returns whether LibGui is running in dark mode and widgets should use dark theming.
      +
      +
      Returns:
      +
      true if widgets should use dark theming, false otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.html b/libgui/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.html index 4e81f8e..90d984d 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/LightweightGuiDescription.html @@ -1,632 +1,633 @@ - - - - -LightweightGuiDescription (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class LightweightGuiDescription

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-
-
-
-
All Implemented Interfaces:
-
GuiDescription
-
-
-
public class LightweightGuiDescription -extends Object -implements GuiDescription
-
A GuiDescription without any associated Minecraft classes
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      rootPanel

      -
      protected WPanel rootPanel
      -
      -
    • -
    • -
      -

      propertyDelegate

      -
      protected PropertyDelegate propertyDelegate
      -
      -
    • -
    • -
      -

      focus

      -
      protected WWidget focus
      -
      -
    • -
    • -
      -

      titleColor

      -
      protected int titleColor
      -
      -
    • -
    • -
      -

      darkmodeTitleColor

      -
      protected int darkmodeTitleColor
      -
      -
    • -
    • -
      -

      fullscreen

      -
      protected boolean fullscreen
      -
      -
    • -
    • -
      -

      titleVisible

      -
      protected boolean titleVisible
      -
      -
    • -
    • -
      -

      titleAlignment

      -
      protected HorizontalAlignment titleAlignment
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      LightweightGuiDescription

      -
      public LightweightGuiDescription()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getRootPanel

      -
      public WPanel getRootPanel()
      -
      -
      Specified by:
      -
      getRootPanel in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      getTitleColor

      -
      public int getTitleColor()
      -
      -
      Specified by:
      -
      getTitleColor in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setRootPanel

      -
      public GuiDescription setRootPanel(WPanel panel)
      -
      -
      Specified by:
      -
      setRootPanel in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      public GuiDescription setTitleColor(int color)
      -
      Description copied from interface: GuiDescription
      -
      Sets the title color of this GUI. - -

      The dark-mode title color will also be set by this method. - If the specified color is WLabel.DEFAULT_TEXT_COLOR, - the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; - otherwise it will be the specified color.

      -
      -
      Specified by:
      -
      setTitleColor in interface GuiDescription
      -
      Parameters:
      -
      color - the new title color
      -
      Returns:
      -
      this GUI
      -
      -
      -
    • -
    • -
      -

      setTitleColor

      -
      public GuiDescription setTitleColor(int lightColor, - int darkColor)
      -
      Description copied from interface: GuiDescription
      -
      Sets the light and dark title colors of this GUI.
      -
      -
      Specified by:
      -
      setTitleColor in interface GuiDescription
      -
      Parameters:
      -
      lightColor - the light-mode color
      -
      darkColor - the dark-mode color
      -
      Returns:
      -
      this GUI
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      public void addPainters()
      -
      Description copied from interface: GuiDescription
      -
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      -
      -
      Specified by:
      -
      addPainters in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      addSlotPeer

      -
      public void addSlotPeer(ValidatedSlot slot)
      -
      Description copied from interface: GuiDescription
      -
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      -
      -
      Specified by:
      -
      addSlotPeer in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      getPropertyDelegate

      -
      @Nullable -public @Nullable PropertyDelegate getPropertyDelegate()
      -
      Description copied from interface: GuiDescription
      -
      Gets the object which manages the integer properties used by WBars and such.
      -
      -
      Specified by:
      -
      getPropertyDelegate in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      setPropertyDelegate

      -
      public GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      -
      Description copied from interface: GuiDescription
      -
      Sets the object which manages the integer properties used by WBars
      -
      -
      Specified by:
      -
      setPropertyDelegate in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      isFocused

      -
      public boolean isFocused(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Tests whether the widget is the currently-focused one.
      -
      -
      Specified by:
      -
      isFocused in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      getFocus

      -
      public WWidget getFocus()
      -
      Description copied from interface: GuiDescription
      -
      Gets the currently-focused WWidget. May be null.
      -
      -
      Specified by:
      -
      getFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      requestFocus

      -
      public void requestFocus(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Notifies this gui that the widget wants to acquire focus.
      -
      -
      Specified by:
      -
      requestFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      releaseFocus

      -
      public void releaseFocus(WWidget widget)
      -
      Description copied from interface: GuiDescription
      -
      Notifies this gui that the widget wants to give up its hold over focus.
      -
      -
      Specified by:
      -
      releaseFocus in interface GuiDescription
      -
      -
      -
    • -
    • -
      -

      isFullscreen

      -
      public boolean isFullscreen()
      -
      Description copied from interface: GuiDescription
      -
      Gets whether this GUI is fullscreen. - -

      Fullscreen GUIs have no default background painter and - have the root panel stretched to fit the entire screen on the client.

      -
      -
      Specified by:
      -
      isFullscreen in interface GuiDescription
      -
      Returns:
      -
      true if this GUI is fullscreen, false otherwise
      -
      -
      -
    • -
    • -
      -

      setFullscreen

      -
      public void setFullscreen(boolean fullscreen)
      -
      Description copied from interface: GuiDescription
      -
      Sets whether this GUI is fullscreen.
      -
      -
      Specified by:
      -
      setFullscreen in interface GuiDescription
      -
      Parameters:
      -
      fullscreen - true if this GUI is fullscreen, false otherwise
      -
      -
      -
    • -
    • -
      -

      isTitleVisible

      -
      public boolean isTitleVisible()
      -
      Description copied from interface: GuiDescription
      -
      Gets whether the title of this GUI should be rendered by the screen. - -

      Modders can disable this to render the title themselves with a widget.

      -
      -
      Specified by:
      -
      isTitleVisible in interface GuiDescription
      -
      Returns:
      -
      true if the title is visible, false otherwise
      -
      -
      -
    • -
    • -
      -

      setTitleVisible

      -
      public void setTitleVisible(boolean titleVisible)
      -
      Description copied from interface: GuiDescription
      -
      Sets whether the title of this GUI should be rendered by the screen.
      -
      -
      Specified by:
      -
      setTitleVisible in interface GuiDescription
      -
      Parameters:
      -
      titleVisible - true if the title is visible, false otherwise
      -
      -
      -
    • -
    • -
      -

      getTitleAlignment

      -
      public HorizontalAlignment getTitleAlignment()
      -
      Description copied from interface: GuiDescription
      -
      Gets the horizontal alignment of the GUI title.
      -
      -
      Specified by:
      -
      getTitleAlignment in interface GuiDescription
      -
      Returns:
      -
      the alignment
      -
      -
      -
    • -
    • -
      -

      setTitleAlignment

      -
      public void setTitleAlignment(HorizontalAlignment titleAlignment)
      -
      Description copied from interface: GuiDescription
      -
      Sets the horizontal alignment of the GUI title.
      -
      -
      Specified by:
      -
      setTitleAlignment in interface GuiDescription
      -
      Parameters:
      -
      titleAlignment - the new alignment
      -
      -
      -
    • -
    • -
      -

      getTitlePos

      -
      public Vec2i getTitlePos()
      -
      Description copied from interface: GuiDescription
      -
      Gets the position of the screen title.
      -
      -
      Specified by:
      -
      getTitlePos in interface GuiDescription
      -
      Returns:
      -
      the title position
      -
      -
      -
    • -
    • -
      -

      setTitlePos

      -
      public void setTitlePos(Vec2i titlePos)
      -
      Description copied from interface: GuiDescription
      -
      Sets the position of the screen title.
      -
      -
      Specified by:
      -
      setTitlePos in interface GuiDescription
      -
      Parameters:
      -
      titlePos - the new title position
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +LightweightGuiDescription (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LightweightGuiDescription

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
+
+
+
+
All Implemented Interfaces:
+
GuiDescription
+
+
+
public class LightweightGuiDescription +extends Object +implements GuiDescription
+
A GuiDescription without any associated Minecraft classes
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      rootPanel

      +
      protected WPanel rootPanel
      +
      +
    • +
    • +
      +

      propertyDelegate

      +
      protected PropertyDelegate propertyDelegate
      +
      +
    • +
    • +
      +

      focus

      +
      protected WWidget focus
      +
      +
    • +
    • +
      +

      titleColor

      +
      protected int titleColor
      +
      +
    • +
    • +
      +

      darkmodeTitleColor

      +
      protected int darkmodeTitleColor
      +
      +
    • +
    • +
      +

      fullscreen

      +
      protected boolean fullscreen
      +
      +
    • +
    • +
      +

      titleVisible

      +
      protected boolean titleVisible
      +
      +
    • +
    • +
      +

      titleAlignment

      +
      protected HorizontalAlignment titleAlignment
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LightweightGuiDescription

      +
      public LightweightGuiDescription()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRootPanel

      +
      public WPanel getRootPanel()
      +
      +
      Specified by:
      +
      getRootPanel in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      getTitleColor

      +
      public int getTitleColor()
      +
      +
      Specified by:
      +
      getTitleColor in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setRootPanel

      +
      public GuiDescription setRootPanel(WPanel panel)
      +
      +
      Specified by:
      +
      setRootPanel in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      public GuiDescription setTitleColor(int color)
      +
      Description copied from interface: GuiDescription
      +
      Sets the title color of this GUI. + +

      The dark-mode title color will also be set by this method. + If the specified color is WLabel.DEFAULT_TEXT_COLOR, + the dark-mode color will be WLabel.DEFAULT_DARKMODE_TEXT_COLOR; + otherwise it will be the specified color.

      +
      +
      Specified by:
      +
      setTitleColor in interface GuiDescription
      +
      Parameters:
      +
      color - the new title color
      +
      Returns:
      +
      this GUI
      +
      +
      +
    • +
    • +
      +

      setTitleColor

      +
      public GuiDescription setTitleColor(int lightColor, + int darkColor)
      +
      Description copied from interface: GuiDescription
      +
      Sets the light and dark title colors of this GUI.
      +
      +
      Specified by:
      +
      setTitleColor in interface GuiDescription
      +
      Parameters:
      +
      lightColor - the light-mode color
      +
      darkColor - the dark-mode color
      +
      Returns:
      +
      this GUI
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      public void addPainters()
      +
      Description copied from interface: GuiDescription
      +
      Guis should use this method to add clientside styles and BackgroundPainters to their controls
      +
      +
      Specified by:
      +
      addPainters in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      addSlotPeer

      +
      public void addSlotPeer(ValidatedSlot slot)
      +
      Description copied from interface: GuiDescription
      +
      Typical users won't call this. This adds a Slot to Container/Controller-based guis, and does nothing on lightweight guis.
      +
      +
      Specified by:
      +
      addSlotPeer in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      getPropertyDelegate

      +
      @Nullable +public @Nullable PropertyDelegate getPropertyDelegate()
      +
      Description copied from interface: GuiDescription
      +
      Gets the object which manages the integer properties used by WBars and such.
      +
      +
      Specified by:
      +
      getPropertyDelegate in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      setPropertyDelegate

      +
      public GuiDescription setPropertyDelegate(PropertyDelegate delegate)
      +
      Description copied from interface: GuiDescription
      +
      Sets the object which manages the integer properties used by WBars
      +
      +
      Specified by:
      +
      setPropertyDelegate in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      isFocused

      +
      public boolean isFocused(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Tests whether the widget is the currently-focused one.
      +
      +
      Specified by:
      +
      isFocused in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      getFocus

      +
      public WWidget getFocus()
      +
      Description copied from interface: GuiDescription
      +
      Gets the currently-focused WWidget. May be null.
      +
      +
      Specified by:
      +
      getFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      requestFocus

      +
      public void requestFocus(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Notifies this gui that the widget wants to acquire focus.
      +
      +
      Specified by:
      +
      requestFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      releaseFocus

      +
      public void releaseFocus(WWidget widget)
      +
      Description copied from interface: GuiDescription
      +
      Notifies this gui that the widget wants to give up its hold over focus.
      +
      +
      Specified by:
      +
      releaseFocus in interface GuiDescription
      +
      +
      +
    • +
    • +
      +

      isFullscreen

      +
      public boolean isFullscreen()
      +
      Description copied from interface: GuiDescription
      +
      Gets whether this GUI is fullscreen. + +

      Fullscreen GUIs have no default background painter and + have the root panel stretched to fit the entire screen on the client.

      +
      +
      Specified by:
      +
      isFullscreen in interface GuiDescription
      +
      Returns:
      +
      true if this GUI is fullscreen, false otherwise
      +
      +
      +
    • +
    • +
      +

      setFullscreen

      +
      public void setFullscreen(boolean fullscreen)
      +
      Description copied from interface: GuiDescription
      +
      Sets whether this GUI is fullscreen.
      +
      +
      Specified by:
      +
      setFullscreen in interface GuiDescription
      +
      Parameters:
      +
      fullscreen - true if this GUI is fullscreen, false otherwise
      +
      +
      +
    • +
    • +
      +

      isTitleVisible

      +
      public boolean isTitleVisible()
      +
      Description copied from interface: GuiDescription
      +
      Gets whether the title of this GUI should be rendered by the screen. + +

      Modders can disable this to render the title themselves with a widget.

      +
      +
      Specified by:
      +
      isTitleVisible in interface GuiDescription
      +
      Returns:
      +
      true if the title is visible, false otherwise
      +
      +
      +
    • +
    • +
      +

      setTitleVisible

      +
      public void setTitleVisible(boolean titleVisible)
      +
      Description copied from interface: GuiDescription
      +
      Sets whether the title of this GUI should be rendered by the screen.
      +
      +
      Specified by:
      +
      setTitleVisible in interface GuiDescription
      +
      Parameters:
      +
      titleVisible - true if the title is visible, false otherwise
      +
      +
      +
    • +
    • +
      +

      getTitleAlignment

      +
      public HorizontalAlignment getTitleAlignment()
      +
      Description copied from interface: GuiDescription
      +
      Gets the horizontal alignment of the GUI title.
      +
      +
      Specified by:
      +
      getTitleAlignment in interface GuiDescription
      +
      Returns:
      +
      the alignment
      +
      +
      +
    • +
    • +
      +

      setTitleAlignment

      +
      public void setTitleAlignment(HorizontalAlignment titleAlignment)
      +
      Description copied from interface: GuiDescription
      +
      Sets the horizontal alignment of the GUI title.
      +
      +
      Specified by:
      +
      setTitleAlignment in interface GuiDescription
      +
      Parameters:
      +
      titleAlignment - the new alignment
      +
      +
      +
    • +
    • +
      +

      getTitlePos

      +
      public Vec2i getTitlePos()
      +
      Description copied from interface: GuiDescription
      +
      Gets the position of the screen title.
      +
      +
      Specified by:
      +
      getTitlePos in interface GuiDescription
      +
      Returns:
      +
      the title position
      +
      +
      +
    • +
    • +
      +

      setTitlePos

      +
      public void setTitlePos(Vec2i titlePos)
      +
      Description copied from interface: GuiDescription
      +
      Sets the position of the screen title.
      +
      +
      Specified by:
      +
      setTitlePos in interface GuiDescription
      +
      Parameters:
      +
      titlePos - the new title position
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/NinePatchBackgroundPainter.html b/libgui/io/github/cottonmc/cotton/gui/client/NinePatchBackgroundPainter.html index eb725a3..1e6d326 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/NinePatchBackgroundPainter.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/NinePatchBackgroundPainter.html @@ -1,313 +1,314 @@ - - - - -NinePatchBackgroundPainter (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class NinePatchBackgroundPainter

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
-
-
-
-
All Implemented Interfaces:
-
BackgroundPainter
-
-
-
@Environment(CLIENT) -public final class NinePatchBackgroundPainter -extends Object -implements BackgroundPainter
-
Nine-patch background painters paint rectangles using a special nine-patch texture. - The texture is divided into nine sections: four corners, four edges and a center part. - The edges and the center are either tiled or stretched, depending on the mode of the painter, - to fill the area between the corners. By default, the texture is tiled. - -

Nine-patch background painters can be created using BackgroundPainter.createNinePatch(Identifier), - BackgroundPainter.createNinePatch(Texture, Consumer), or with the constructor directly. The latter two let you customise - the look of the background more finely. - -

NinePatchBackgroundPainter has a customizable padding that can be applied. - By default there is no padding, but you can set it using setPadding(int).

-
-
Since:
-
4.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      NinePatchBackgroundPainter

      -
      public NinePatchBackgroundPainter(juuxel.libninepatch.NinePatch<Identifier> ninePatch)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getTopPadding

      -
      public int getTopPadding()
      -
      -
    • -
    • -
      -

      setTopPadding

      -
      public NinePatchBackgroundPainter setTopPadding(int topPadding)
      -
      -
    • -
    • -
      -

      getLeftPadding

      -
      public int getLeftPadding()
      -
      -
    • -
    • -
      -

      setLeftPadding

      -
      public NinePatchBackgroundPainter setLeftPadding(int leftPadding)
      -
      -
    • -
    • -
      -

      getBottomPadding

      -
      public int getBottomPadding()
      -
      -
    • -
    • -
      -

      setBottomPadding

      -
      public NinePatchBackgroundPainter setBottomPadding(int bottomPadding)
      -
      -
    • -
    • -
      -

      getRightPadding

      -
      public int getRightPadding()
      -
      -
    • -
    • -
      -

      setRightPadding

      -
      public NinePatchBackgroundPainter setRightPadding(int rightPadding)
      -
      -
    • -
    • -
      -

      setPadding

      -
      public NinePatchBackgroundPainter setPadding(int padding)
      -
      -
    • -
    • -
      -

      setPadding

      -
      public NinePatchBackgroundPainter setPadding(int vertical, - int horizontal)
      -
      -
    • -
    • -
      -

      setPadding

      -
      public NinePatchBackgroundPainter setPadding(int topPadding, - int leftPadding, - int bottomPadding, - int rightPadding)
      -
      -
    • -
    • -
      -

      paintBackground

      -
      public void paintBackground(DrawContext context, - int left, - int top, - WWidget panel)
      -
      Description copied from interface: BackgroundPainter
      -
      Paint the specified panel to the screen.
      -
      -
      Specified by:
      -
      paintBackground in interface BackgroundPainter
      -
      Parameters:
      -
      context - The draw context
      -
      left - The absolute position of the left of the panel, in gui-screen coordinates
      -
      top - The absolute position of the top of the panel, in gui-screen coordinates
      -
      panel - The panel being painted
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +NinePatchBackgroundPainter (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NinePatchBackgroundPainter

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.NinePatchBackgroundPainter
+
+
+
+
All Implemented Interfaces:
+
BackgroundPainter
+
+
+
@Environment(CLIENT) +public final class NinePatchBackgroundPainter +extends Object +implements BackgroundPainter
+
Nine-patch background painters paint rectangles using a special nine-patch texture. + The texture is divided into nine sections: four corners, four edges and a center part. + The edges and the center are either tiled or stretched, depending on the mode of the painter, + to fill the area between the corners. By default, the texture is tiled. + +

Nine-patch background painters can be created using BackgroundPainter.createNinePatch(Identifier), + BackgroundPainter.createNinePatch(Texture, Consumer), or with the constructor directly. The latter two let you customise + the look of the background more finely. + +

NinePatchBackgroundPainter has a customizable padding that can be applied. + By default there is no padding, but you can set it using setPadding(int).

+
+
Since:
+
4.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NinePatchBackgroundPainter

      +
      public NinePatchBackgroundPainter(juuxel.libninepatch.NinePatch<Identifier> ninePatch)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getTopPadding

      +
      public int getTopPadding()
      +
      +
    • +
    • +
      +

      setTopPadding

      +
      public NinePatchBackgroundPainter setTopPadding(int topPadding)
      +
      +
    • +
    • +
      +

      getLeftPadding

      +
      public int getLeftPadding()
      +
      +
    • +
    • +
      +

      setLeftPadding

      +
      public NinePatchBackgroundPainter setLeftPadding(int leftPadding)
      +
      +
    • +
    • +
      +

      getBottomPadding

      +
      public int getBottomPadding()
      +
      +
    • +
    • +
      +

      setBottomPadding

      +
      public NinePatchBackgroundPainter setBottomPadding(int bottomPadding)
      +
      +
    • +
    • +
      +

      getRightPadding

      +
      public int getRightPadding()
      +
      +
    • +
    • +
      +

      setRightPadding

      +
      public NinePatchBackgroundPainter setRightPadding(int rightPadding)
      +
      +
    • +
    • +
      +

      setPadding

      +
      public NinePatchBackgroundPainter setPadding(int padding)
      +
      +
    • +
    • +
      +

      setPadding

      +
      public NinePatchBackgroundPainter setPadding(int vertical, + int horizontal)
      +
      +
    • +
    • +
      +

      setPadding

      +
      public NinePatchBackgroundPainter setPadding(int topPadding, + int leftPadding, + int bottomPadding, + int rightPadding)
      +
      +
    • +
    • +
      +

      paintBackground

      +
      public void paintBackground(DrawContext context, + int left, + int top, + WWidget panel)
      +
      Description copied from interface: BackgroundPainter
      +
      Paint the specified panel to the screen.
      +
      +
      Specified by:
      +
      paintBackground in interface BackgroundPainter
      +
      Parameters:
      +
      context - The draw context
      +
      left - The absolute position of the left of the panel, in gui-screen coordinates
      +
      top - The absolute position of the top of the panel, in gui-screen coordinates
      +
      panel - The panel being painted
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/Scissors.Frame.html b/libgui/io/github/cottonmc/cotton/gui/client/Scissors.Frame.html index 2aae61f..d5c3ae0 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/Scissors.Frame.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/Scissors.Frame.html @@ -1,171 +1,172 @@ - - - - -Scissors.Frame (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Scissors.Frame

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.Scissors.Frame
-
-
-
-
All Implemented Interfaces:
-
AutoCloseable
-
-
-
Enclosing class:
-
Scissors
-
-
-
public static final class Scissors.Frame -extends Object -implements AutoCloseable
-
A single scissor frame in the stack.
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      close

      -
      public void close()
      -
      Pops this frame from the stack.
      -
      -
      Specified by:
      -
      close in interface AutoCloseable
      -
      Throws:
      -
      IllegalStateException - if:
        -
      • this frame is not on the stack, or
      • -
      • this frame is not the topmost element on the stack
      • -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public String toString()
      -
      -
      Overrides:
      -
      toString in class Object
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Scissors.Frame (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Scissors.Frame

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.Scissors.Frame
+
+
+
+
All Implemented Interfaces:
+
AutoCloseable
+
+
+
Enclosing class:
+
Scissors
+
+
+
public static final class Scissors.Frame +extends Object +implements AutoCloseable
+
A single scissor frame in the stack.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      close

      +
      public void close()
      +
      Pops this frame from the stack.
      +
      +
      Specified by:
      +
      close in interface AutoCloseable
      +
      Throws:
      +
      IllegalStateException - if:
        +
      • this frame is not on the stack, or
      • +
      • this frame is not the topmost element on the stack
      • +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/Scissors.html b/libgui/io/github/cottonmc/cotton/gui/client/Scissors.html index 362e6f7..1c77692 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/Scissors.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/Scissors.html @@ -1,187 +1,188 @@ - - - - -Scissors (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Scissors

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.Scissors
-
-
-
-
@Environment(CLIENT) -public final class Scissors -extends Object
-
Contains a stack for GL scissors for restricting the drawn area of a widget.
-
-
Since:
-
2.0.0
-
-
-
-
    - -
  • -
    -

    Nested Class Summary

    -
    Nested Classes
    -
    -
    Modifier and Type
    -
    Class
    -
    Description
    -
    static final class 
    - -
    -
    A single scissor frame in the stack.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    static void
    -
    pop()
    -
    -
    Pops the topmost scissor frame and refreshes the scissored area.
    -
    - -
    push(int x, - int y, - int width, - int height)
    -
    -
    Pushes a new scissor frame onto the stack and refreshes the scissored area.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      push

      -
      public static Scissors.Frame push(int x, - int y, - int width, - int height)
      -
      Pushes a new scissor frame onto the stack and refreshes the scissored area.
      -
      -
      Parameters:
      -
      x - the frame's X coordinate
      -
      y - the frame's Y coordinate
      -
      width - the frame's width in pixels
      -
      height - the frame's height in pixels
      -
      Returns:
      -
      the pushed frame
      -
      -
      -
    • -
    • -
      -

      pop

      -
      public static void pop()
      -
      Pops the topmost scissor frame and refreshes the scissored area.
      -
      -
      Throws:
      -
      IllegalStateException - if there are no scissor frames on the stack
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Scissors (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Scissors

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.Scissors
+
+
+
+
@Environment(CLIENT) +public final class Scissors +extends Object
+
Contains a stack for GL scissors for restricting the drawn area of a widget.
+
+
Since:
+
2.0.0
+
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static final class 
    + +
    +
    A single scissor frame in the stack.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static void
    +
    pop()
    +
    +
    Pops the topmost scissor frame and refreshes the scissored area.
    +
    + +
    push(int x, + int y, + int width, + int height)
    +
    +
    Pushes a new scissor frame onto the stack and refreshes the scissored area.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      push

      +
      public static Scissors.Frame push(int x, + int y, + int width, + int height)
      +
      Pushes a new scissor frame onto the stack and refreshes the scissored area.
      +
      +
      Parameters:
      +
      x - the frame's X coordinate
      +
      y - the frame's Y coordinate
      +
      width - the frame's width in pixels
      +
      height - the frame's height in pixels
      +
      Returns:
      +
      the pushed frame
      +
      +
      +
    • +
    • +
      +

      pop

      +
      public static void pop()
      +
      Pops the topmost scissor frame and refreshes the scissored area.
      +
      +
      Throws:
      +
      IllegalStateException - if there are no scissor frames on the stack
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/ScreenDrawing.html b/libgui/io/github/cottonmc/cotton/gui/client/ScreenDrawing.html index 6364ef3..b93d69a 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/ScreenDrawing.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/ScreenDrawing.html @@ -1,886 +1,887 @@ - - - - -ScreenDrawing (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ScreenDrawing

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.client.ScreenDrawing
-
-
-
-
public class ScreenDrawing -extends Object
-
ScreenDrawing contains utility methods for drawing contents on a screen.
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    static int
    -
    colorAtOpacity(int opaque, - float opacity)
    -
     
    -
    static void
    -
    coloredRect(DrawContext context, - int left, - int top, - int width, - int height, - int color)
    -
    -
    Draws an untextured rectangle of the specified RGB color.
    -
    -
    static void
    -
    drawBeveledPanel(DrawContext context, - int x, - int y)
    -
    -
    Draws a default-sized recessed itemslot panel
    -
    -
    static void
    -
    drawBeveledPanel(DrawContext context, - int x, - int y, - int width, - int height)
    -
    -
    Draws a default-color recessed itemslot panel of variable size
    -
    -
    static void
    -
    drawBeveledPanel(DrawContext context, - int x, - int y, - int width, - int height, - int topleft, - int panel, - int bottomright)
    -
    -
    Draws a generalized-case beveled panel.
    -
    -
    static void
    -
    drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height)
    -
    -
    Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
    -
    -
    static void
    -
    drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height, - int panelColor)
    -
    -
    Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
    -
    -
    static void
    -
    drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height, - int shadow, - int panel, - int hilight, - int outline)
    -
    -
    Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
    -
    -
    static void
    -
    drawString(DrawContext context, - String s, - int x, - int y, - int color)
    -
    -
    Draws a left-aligned string.
    -
    -
    static void
    -
    drawString(DrawContext context, - String s, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
    -
    -
    Draws a string with a custom alignment.
    -
    -
    static void
    -
    drawString(DrawContext context, - OrderedText text, - int x, - int y, - int color)
    -
    -
    Draws a left-aligned text component.
    -
    -
    static void
    -
    drawString(DrawContext context, - OrderedText text, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
    -
    -
    Draws a text component with a custom alignment.
    -
    -
    static void
    -
    drawStringWithShadow(DrawContext context, - String s, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
    -
    -
    Draws a shadowed string.
    -
    -
    static void
    -
    drawStringWithShadow(DrawContext context, - OrderedText text, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
    -
    -
    Draws a shadowed text component.
    -
    -
    static void
    -
    drawTextHover(DrawContext context, - @Nullable Style textStyle, - int x, - int y)
    -
    -
    Draws the text hover effects for a text style.
    -
    -
    static int
    -
    multiplyColor(int color, - float amount)
    -
     
    -
    static void
    -
    texturedGuiRect(DrawContext context, - int left, - int top, - int width, - int height, - Identifier texture, - int color)
    -
    -
    Draws a textured rectangle with UV values based on the width and height.
    -
    -
    static void
    -
    texturedGuiRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int textureX, - int textureY, - int color)
    -
    -
    Draws a textured rectangle with UV values based on the width and height.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Texture texture, - int color)
    -
    -
    Draws a textured rectangle.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Texture texture, - int color, - float opacity)
    -
    -
    Draws a textured rectangle.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - float u1, - float v1, - float u2, - float v2, - int color)
    -
    -
    Draws a textured rectangle.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - float u1, - float v1, - float u2, - float v2, - int color, - float opacity)
    -
    -
    Draws a textured rectangle.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int color)
    -
    -
    Draws a textured rectangle.
    -
    -
    static void
    -
    texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int color, - float opacity)
    -
    -
    Draws a textured rectangle.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int color)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      -
      -
    • -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int color, - float opacity)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - float u1, - float v1, - float u2, - float v2, - int color)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      u1 - the left edge of the texture
      -
      v1 - the top edge of the texture
      -
      u2 - the right edge of the texture
      -
      v2 - the bottom edge of the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      -
      -
    • -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Texture texture, - int color)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Texture texture, - int color, - float opacity)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      texturedRect

      -
      public static void texturedRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - float u1, - float v1, - float u2, - float v2, - int color, - float opacity)
      -
      Draws a textured rectangle.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      u1 - the left edge of the texture
      -
      v1 - the top edge of the texture
      -
      u2 - the right edge of the texture
      -
      v2 - the bottom edge of the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      texturedGuiRect

      -
      public static void texturedGuiRect(DrawContext context, - int x, - int y, - int width, - int height, - Identifier texture, - int textureX, - int textureY, - int color)
      -
      Draws a textured rectangle with UV values based on the width and height. - -

      If the texture is 256x256, this draws the texture at one pixel per texel.

      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the x coordinate of the box on-screen
      -
      y - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      textureX - the x offset into the texture
      -
      textureY - the y offset into the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      -
      -
    • -
    • -
      -

      texturedGuiRect

      -
      public static void texturedGuiRect(DrawContext context, - int left, - int top, - int width, - int height, - Identifier texture, - int color)
      -
      Draws a textured rectangle with UV values based on the width and height. - -

      If the texture is 256x256, this draws the texture at one pixel per texel.

      -
      -
      Parameters:
      -
      context - the draw context
      -
      left - the x coordinate of the box on-screen
      -
      top - the y coordinate of the box on-screen
      -
      width - the width of the box on-screen
      -
      height - the height of the box on-screen
      -
      texture - the Identifier for the texture
      -
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      -
      -
      -
    • -
    • -
      -

      coloredRect

      -
      public static void coloredRect(DrawContext context, - int left, - int top, - int width, - int height, - int color)
      -
      Draws an untextured rectangle of the specified RGB color.
      -
      -
    • -
    • -
      -

      drawGuiPanel

      -
      public static void drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height)
      -
      Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X position of the panel
      -
      y - the Y position of the panel
      -
      width - the width of the panel
      -
      height - the height of the panel
      -
      -
      -
    • -
    • -
      -

      drawGuiPanel

      -
      public static void drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height, - int panelColor)
      -
      Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X position of the panel
      -
      y - the Y position of the panel
      -
      width - the width of the panel
      -
      height - the height of the panel
      -
      panelColor - the panel ARGB color
      -
      -
      -
    • -
    • -
      -

      drawGuiPanel

      -
      public static void drawGuiPanel(DrawContext context, - int x, - int y, - int width, - int height, - int shadow, - int panel, - int hilight, - int outline)
      -
      Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X position of the panel
      -
      y - the Y position of the panel
      -
      width - the width of the panel
      -
      height - the height of the panel
      -
      shadow - the bottom/right shadow ARGB color
      -
      panel - the center ARGB color
      -
      hilight - the top/left hilight ARGB color
      -
      outline - the outline ARGB color
      -
      -
      -
    • -
    • -
      -

      drawBeveledPanel

      -
      public static void drawBeveledPanel(DrawContext context, - int x, - int y)
      -
      Draws a default-sized recessed itemslot panel
      -
      -
    • -
    • -
      -

      drawBeveledPanel

      -
      public static void drawBeveledPanel(DrawContext context, - int x, - int y, - int width, - int height)
      -
      Draws a default-color recessed itemslot panel of variable size
      -
      -
    • -
    • -
      -

      drawBeveledPanel

      -
      public static void drawBeveledPanel(DrawContext context, - int x, - int y, - int width, - int height, - int topleft, - int panel, - int bottomright)
      -
      Draws a generalized-case beveled panel. Can be inset or outset depending on arguments.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - x coordinate of the topleft corner
      -
      y - y coordinate of the topleft corner
      -
      width - width of the panel
      -
      height - height of the panel
      -
      topleft - color of the top/left bevel
      -
      panel - color of the panel area
      -
      bottomright - color of the bottom/right bevel
      -
      -
      -
    • -
    • -
      -

      drawString

      -
      public static void drawString(DrawContext context, - String s, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
      -
      Draws a string with a custom alignment.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      s - the string
      -
      align - the alignment of the string
      -
      x - the X position
      -
      y - the Y position
      -
      width - the width of the string, used for aligning
      -
      color - the text color
      -
      -
      -
    • -
    • -
      -

      drawString

      -
      public static void drawString(DrawContext context, - OrderedText text, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
      -
      Draws a text component with a custom alignment.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      text - the text
      -
      align - the alignment of the string
      -
      x - the X position
      -
      y - the Y position
      -
      width - the width of the string, used for aligning
      -
      color - the text color
      -
      Since:
      -
      1.9.0
      -
      -
      -
    • -
    • -
      -

      drawStringWithShadow

      -
      public static void drawStringWithShadow(DrawContext context, - String s, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
      -
      Draws a shadowed string.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      s - the string
      -
      align - the alignment of the string
      -
      x - the X position
      -
      y - the Y position
      -
      width - the width of the string, used for aligning
      -
      color - the text color
      -
      -
      -
    • -
    • -
      -

      drawStringWithShadow

      -
      public static void drawStringWithShadow(DrawContext context, - OrderedText text, - HorizontalAlignment align, - int x, - int y, - int width, - int color)
      -
      Draws a shadowed text component.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      text - the text component
      -
      align - the alignment of the string
      -
      x - the X position
      -
      y - the Y position
      -
      width - the width of the string, used for aligning
      -
      color - the text color
      -
      -
      -
    • -
    • -
      -

      drawString

      -
      public static void drawString(DrawContext context, - String s, - int x, - int y, - int color)
      -
      Draws a left-aligned string.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      s - the string
      -
      x - the X position
      -
      y - the Y position
      -
      color - the text color
      -
      -
      -
    • -
    • -
      -

      drawString

      -
      public static void drawString(DrawContext context, - OrderedText text, - int x, - int y, - int color)
      -
      Draws a left-aligned text component.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      text - the text component
      -
      x - the X position
      -
      y - the Y position
      -
      color - the text color
      -
      -
      -
    • -
    • -
      -

      drawTextHover

      -
      public static void drawTextHover(DrawContext context, - @Nullable - @Nullable Style textStyle, - int x, - int y)
      -
      Draws the text hover effects for a text style. - -

      This method has no effect when the caller is not in a LibGui screen. - For example, there will be nothing drawn in HUDs.

      -
      -
      Parameters:
      -
      context - the draw context
      -
      textStyle - the text style
      -
      x - the X position
      -
      y - the Y position
      -
      Since:
      -
      4.0.0
      -
      -
      -
    • -
    • -
      -

      colorAtOpacity

      -
      public static int colorAtOpacity(int opaque, - float opacity)
      -
      -
    • -
    • -
      -

      multiplyColor

      -
      public static int multiplyColor(int color, - float amount)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ScreenDrawing (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScreenDrawing

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.client.ScreenDrawing
+
+
+
+
public class ScreenDrawing +extends Object
+
ScreenDrawing contains utility methods for drawing contents on a screen.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static int
    +
    colorAtOpacity(int opaque, + float opacity)
    +
     
    +
    static void
    +
    coloredRect(DrawContext context, + int left, + int top, + int width, + int height, + int color)
    +
    +
    Draws an untextured rectangle of the specified RGB color.
    +
    +
    static void
    +
    drawBeveledPanel(DrawContext context, + int x, + int y)
    +
    +
    Draws a default-sized recessed itemslot panel
    +
    +
    static void
    +
    drawBeveledPanel(DrawContext context, + int x, + int y, + int width, + int height)
    +
    +
    Draws a default-color recessed itemslot panel of variable size
    +
    +
    static void
    +
    drawBeveledPanel(DrawContext context, + int x, + int y, + int width, + int height, + int topleft, + int panel, + int bottomright)
    +
    +
    Draws a generalized-case beveled panel.
    +
    +
    static void
    +
    drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height)
    +
    +
    Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
    +
    +
    static void
    +
    drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height, + int panelColor)
    +
    +
    Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
    +
    +
    static void
    +
    drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height, + int shadow, + int panel, + int hilight, + int outline)
    +
    +
    Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
    +
    +
    static void
    +
    drawString(DrawContext context, + String s, + int x, + int y, + int color)
    +
    +
    Draws a left-aligned string.
    +
    +
    static void
    +
    drawString(DrawContext context, + String s, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
    +
    +
    Draws a string with a custom alignment.
    +
    +
    static void
    +
    drawString(DrawContext context, + OrderedText text, + int x, + int y, + int color)
    +
    +
    Draws a left-aligned text component.
    +
    +
    static void
    +
    drawString(DrawContext context, + OrderedText text, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
    +
    +
    Draws a text component with a custom alignment.
    +
    +
    static void
    +
    drawStringWithShadow(DrawContext context, + String s, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
    +
    +
    Draws a shadowed string.
    +
    +
    static void
    +
    drawStringWithShadow(DrawContext context, + OrderedText text, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
    +
    +
    Draws a shadowed text component.
    +
    +
    static void
    +
    drawTextHover(DrawContext context, + @Nullable Style textStyle, + int x, + int y)
    +
    +
    Draws the text hover effects for a text style.
    +
    +
    static int
    +
    multiplyColor(int color, + float amount)
    +
     
    +
    static void
    +
    texturedGuiRect(DrawContext context, + int left, + int top, + int width, + int height, + Identifier texture, + int color)
    +
    +
    Draws a textured rectangle with UV values based on the width and height.
    +
    +
    static void
    +
    texturedGuiRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int textureX, + int textureY, + int color)
    +
    +
    Draws a textured rectangle with UV values based on the width and height.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Texture texture, + int color)
    +
    +
    Draws a textured rectangle.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Texture texture, + int color, + float opacity)
    +
    +
    Draws a textured rectangle.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + float u1, + float v1, + float u2, + float v2, + int color)
    +
    +
    Draws a textured rectangle.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + float u1, + float v1, + float u2, + float v2, + int color, + float opacity)
    +
    +
    Draws a textured rectangle.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int color)
    +
    +
    Draws a textured rectangle.
    +
    +
    static void
    +
    texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int color, + float opacity)
    +
    +
    Draws a textured rectangle.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int color)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      +
      +
    • +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int color, + float opacity)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + float u1, + float v1, + float u2, + float v2, + int color)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      u1 - the left edge of the texture
      +
      v1 - the top edge of the texture
      +
      u2 - the right edge of the texture
      +
      v2 - the bottom edge of the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      +
      +
    • +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Texture texture, + int color)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Texture texture, + int color, + float opacity)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      texturedRect

      +
      public static void texturedRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + float u1, + float v1, + float u2, + float v2, + int color, + float opacity)
      +
      Draws a textured rectangle.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      u1 - the left edge of the texture
      +
      v1 - the top edge of the texture
      +
      u2 - the right edge of the texture
      +
      v2 - the bottom edge of the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      opacity - opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      texturedGuiRect

      +
      public static void texturedGuiRect(DrawContext context, + int x, + int y, + int width, + int height, + Identifier texture, + int textureX, + int textureY, + int color)
      +
      Draws a textured rectangle with UV values based on the width and height. + +

      If the texture is 256x256, this draws the texture at one pixel per texel.

      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the x coordinate of the box on-screen
      +
      y - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      textureX - the x offset into the texture
      +
      textureY - the y offset into the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      +
      +
    • +
    • +
      +

      texturedGuiRect

      +
      public static void texturedGuiRect(DrawContext context, + int left, + int top, + int width, + int height, + Identifier texture, + int color)
      +
      Draws a textured rectangle with UV values based on the width and height. + +

      If the texture is 256x256, this draws the texture at one pixel per texel.

      +
      +
      Parameters:
      +
      context - the draw context
      +
      left - the x coordinate of the box on-screen
      +
      top - the y coordinate of the box on-screen
      +
      width - the width of the box on-screen
      +
      height - the height of the box on-screen
      +
      texture - the Identifier for the texture
      +
      color - a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
      +
      +
      +
    • +
    • +
      +

      coloredRect

      +
      public static void coloredRect(DrawContext context, + int left, + int top, + int width, + int height, + int color)
      +
      Draws an untextured rectangle of the specified RGB color.
      +
      +
    • +
    • +
      +

      drawGuiPanel

      +
      public static void drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height)
      +
      Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X position of the panel
      +
      y - the Y position of the panel
      +
      width - the width of the panel
      +
      height - the height of the panel
      +
      +
      +
    • +
    • +
      +

      drawGuiPanel

      +
      public static void drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height, + int panelColor)
      +
      Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X position of the panel
      +
      y - the Y position of the panel
      +
      width - the width of the panel
      +
      height - the height of the panel
      +
      panelColor - the panel ARGB color
      +
      +
      +
    • +
    • +
      +

      drawGuiPanel

      +
      public static void drawGuiPanel(DrawContext context, + int x, + int y, + int width, + int height, + int shadow, + int panel, + int hilight, + int outline)
      +
      Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X position of the panel
      +
      y - the Y position of the panel
      +
      width - the width of the panel
      +
      height - the height of the panel
      +
      shadow - the bottom/right shadow ARGB color
      +
      panel - the center ARGB color
      +
      hilight - the top/left hilight ARGB color
      +
      outline - the outline ARGB color
      +
      +
      +
    • +
    • +
      +

      drawBeveledPanel

      +
      public static void drawBeveledPanel(DrawContext context, + int x, + int y)
      +
      Draws a default-sized recessed itemslot panel
      +
      +
    • +
    • +
      +

      drawBeveledPanel

      +
      public static void drawBeveledPanel(DrawContext context, + int x, + int y, + int width, + int height)
      +
      Draws a default-color recessed itemslot panel of variable size
      +
      +
    • +
    • +
      +

      drawBeveledPanel

      +
      public static void drawBeveledPanel(DrawContext context, + int x, + int y, + int width, + int height, + int topleft, + int panel, + int bottomright)
      +
      Draws a generalized-case beveled panel. Can be inset or outset depending on arguments.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - x coordinate of the topleft corner
      +
      y - y coordinate of the topleft corner
      +
      width - width of the panel
      +
      height - height of the panel
      +
      topleft - color of the top/left bevel
      +
      panel - color of the panel area
      +
      bottomright - color of the bottom/right bevel
      +
      +
      +
    • +
    • +
      +

      drawString

      +
      public static void drawString(DrawContext context, + String s, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
      +
      Draws a string with a custom alignment.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      s - the string
      +
      align - the alignment of the string
      +
      x - the X position
      +
      y - the Y position
      +
      width - the width of the string, used for aligning
      +
      color - the text color
      +
      +
      +
    • +
    • +
      +

      drawString

      +
      public static void drawString(DrawContext context, + OrderedText text, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
      +
      Draws a text component with a custom alignment.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      text - the text
      +
      align - the alignment of the string
      +
      x - the X position
      +
      y - the Y position
      +
      width - the width of the string, used for aligning
      +
      color - the text color
      +
      Since:
      +
      1.9.0
      +
      +
      +
    • +
    • +
      +

      drawStringWithShadow

      +
      public static void drawStringWithShadow(DrawContext context, + String s, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
      +
      Draws a shadowed string.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      s - the string
      +
      align - the alignment of the string
      +
      x - the X position
      +
      y - the Y position
      +
      width - the width of the string, used for aligning
      +
      color - the text color
      +
      +
      +
    • +
    • +
      +

      drawStringWithShadow

      +
      public static void drawStringWithShadow(DrawContext context, + OrderedText text, + HorizontalAlignment align, + int x, + int y, + int width, + int color)
      +
      Draws a shadowed text component.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      text - the text component
      +
      align - the alignment of the string
      +
      x - the X position
      +
      y - the Y position
      +
      width - the width of the string, used for aligning
      +
      color - the text color
      +
      +
      +
    • +
    • +
      +

      drawString

      +
      public static void drawString(DrawContext context, + String s, + int x, + int y, + int color)
      +
      Draws a left-aligned string.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      s - the string
      +
      x - the X position
      +
      y - the Y position
      +
      color - the text color
      +
      +
      +
    • +
    • +
      +

      drawString

      +
      public static void drawString(DrawContext context, + OrderedText text, + int x, + int y, + int color)
      +
      Draws a left-aligned text component.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      text - the text component
      +
      x - the X position
      +
      y - the Y position
      +
      color - the text color
      +
      +
      +
    • +
    • +
      +

      drawTextHover

      +
      public static void drawTextHover(DrawContext context, + @Nullable + @Nullable Style textStyle, + int x, + int y)
      +
      Draws the text hover effects for a text style. + +

      This method has no effect when the caller is not in a LibGui screen. + For example, there will be nothing drawn in HUDs.

      +
      +
      Parameters:
      +
      context - the draw context
      +
      textStyle - the text style
      +
      x - the X position
      +
      y - the Y position
      +
      Since:
      +
      4.0.0
      +
      +
      +
    • +
    • +
      +

      colorAtOpacity

      +
      public static int colorAtOpacity(int opaque, + float opacity)
      +
      +
    • +
    • +
      +

      multiplyColor

      +
      public static int multiplyColor(int color, + float amount)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/client/package-summary.html index 5f4b933..484168a 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/package-summary.html @@ -1,151 +1,152 @@ - - - - -io.github.cottonmc.cotton.gui.client (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.client

-
-
-
package io.github.cottonmc.cotton.gui.client
-
-
Client-side APIs for rendering GUIs and configuring LibGui.
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.client (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.client

+
+
+
package io.github.cottonmc.cotton.gui.client
+
+
Client-side APIs for rendering GUIs and configuring LibGui.
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/client/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/client/package-tree.html index 3e1dab6..e773641 100644 --- a/libgui/io/github/cottonmc/cotton/gui/client/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/client/package-tree.html @@ -1,97 +1,98 @@ - - - - -io.github.cottonmc.cotton.gui.client Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.client

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-

Interface Hierarchy

- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.client Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.client

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/networking/NetworkSide.html b/libgui/io/github/cottonmc/cotton/gui/networking/NetworkSide.html index 1ff59b2..93ed7dc 100644 --- a/libgui/io/github/cottonmc/cotton/gui/networking/NetworkSide.html +++ b/libgui/io/github/cottonmc/cotton/gui/networking/NetworkSide.html @@ -1,227 +1,228 @@ - - - - -NetworkSide (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class NetworkSide

-
-
java.lang.Object -
java.lang.Enum<NetworkSide> -
io.github.cottonmc.cotton.gui.networking.NetworkSide
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<NetworkSide>, Constable
-
-
-
public enum NetworkSide -extends Enum<NetworkSide>
-
The sides of a network connection.
-
-
Since:
-
3.3.0
-
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    -
      -
    • -
      -

      CLIENT

      -
      public static final NetworkSide CLIENT
      -
      The logical client.
      -
      -
    • -
    • -
      -

      SERVER

      -
      public static final NetworkSide SERVER
      -
      The logical server.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static NetworkSide[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static NetworkSide valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +NetworkSide (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class NetworkSide

+
+
java.lang.Object +
java.lang.Enum<NetworkSide> +
io.github.cottonmc.cotton.gui.networking.NetworkSide
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<NetworkSide>, Constable
+
+
+
public enum NetworkSide +extends Enum<NetworkSide>
+
The sides of a network connection.
+
+
Since:
+
3.3.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      CLIENT

      +
      public static final NetworkSide CLIENT
      +
      The logical client.
      +
      +
    • +
    • +
      +

      SERVER

      +
      public static final NetworkSide SERVER
      +
      The logical server.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static NetworkSide[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static NetworkSide valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.MessageReceiver.html b/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.MessageReceiver.html index d543545..d4967ea 100644 --- a/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.MessageReceiver.html +++ b/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.MessageReceiver.html @@ -1,142 +1,143 @@ - - - - -ScreenNetworking.MessageReceiver (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface ScreenNetworking.MessageReceiver

-
-
-
-
Enclosing interface:
-
ScreenNetworking
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public static interface ScreenNetworking.MessageReceiver
-
A handler for received screen messages.
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    - -
    -
    Handles a received screen message.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      onMessage

      -
      void onMessage(PacketByteBuf buf)
      -
      Handles a received screen message. - -

      This method should only read from the buffer, not write to it.

      -
      -
      Parameters:
      -
      buf - the message packet buffer
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ScreenNetworking.MessageReceiver (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ScreenNetworking.MessageReceiver

+
+
+
+
Enclosing interface:
+
ScreenNetworking
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface ScreenNetworking.MessageReceiver
+
A handler for received screen messages.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Handles a received screen message.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onMessage

      +
      void onMessage(PacketByteBuf buf)
      +
      Handles a received screen message. + +

      This method should only read from the buffer, not write to it.

      +
      +
      Parameters:
      +
      buf - the message packet buffer
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.html b/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.html index 9f15223..fc0b9be 100644 --- a/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.html +++ b/libgui/io/github/cottonmc/cotton/gui/networking/ScreenNetworking.html @@ -1,236 +1,237 @@ - - - - -ScreenNetworking (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface ScreenNetworking

-
-
-
-
public interface ScreenNetworking
-
ScreenNetworking handles screen-related network messages sent between the server and the client. - -

Registering a message receiver

- Message receivers can be registered by calling receive(Identifier, MessageReceiver) - on a ScreenNetworking for the receiving side. The message ID is a unique ID that matches between - the sender and the receiver. - -

Message receivers should be registered in the constructor of a SyncedGuiDescription. - -

Sending messages

- Messages can be sent by calling send(Identifier, Consumer) on a ScreenNetworking - for the sending side. The message ID should match up with a receiver registered on the opposite - side. - -

Example

-
- 
- private static final Identifier MESSAGE_ID = new Identifier("my_mod", "some_message");
-
- // Receiver
- ScreenNetworking.of(this, NetworkSide.SERVER).receive(MESSAGE_ID, buf -> {
- 	   // Example data: a lucky number as an int
-     System.out.println("Your lucky number is " + buf.readInt() + "!");
- });
-
- // Sending
-
- // We're sending from a button. The packet data is our lucky number, 123.
- WButton button = ...;
- button.setOnClick(() -> {
-     ScreenNetworking.of(this, NetworkSide.CLIENT).send(MESSAGE_ID, buf -> buf.writeInt(123));
- });
- 
- 
-
-
Since:
-
3.3.0
-
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      of

      -
      static ScreenNetworking of(SyncedGuiDescription description, - NetworkSide networkSide)
      -
      Gets a networking handler for the GUI description that is active on the specified side.
      -
      -
      Parameters:
      -
      description - the GUI description
      -
      networkSide - the network side
      -
      Returns:
      -
      the network handler
      -
      Throws:
      -
      NullPointerException - if either parameter is null
      -
      -
      -
    • -
    • -
      -

      receive

      -
      void receive(Identifier message, - ScreenNetworking.MessageReceiver receiver)
      -
      Registers a message receiver for the message.
      -
      -
      Parameters:
      -
      message - the screen message ID
      -
      receiver - the message receiver
      -
      Throws:
      -
      IllegalStateException - if the message has already been registered
      -
      NullPointerException - if either parameter is null
      -
      -
      -
    • -
    • -
      -

      send

      -
      void send(Identifier message, - Consumer<PacketByteBuf> writer)
      -
      Sends a screen message to the other side of the connection.
      -
      -
      Parameters:
      -
      message - the screen message ID
      -
      writer - a writer that writes the message contents to a packet buffer; - should not read the buffer
      -
      Throws:
      -
      NullPointerException - if either parameter is null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ScreenNetworking (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ScreenNetworking

+
+
+
+
public interface ScreenNetworking
+
ScreenNetworking handles screen-related network messages sent between the server and the client. + +

Registering a message receiver

+ Message receivers can be registered by calling receive(Identifier, MessageReceiver) + on a ScreenNetworking for the receiving side. The message ID is a unique ID that matches between + the sender and the receiver. + +

Message receivers should be registered in the constructor of a SyncedGuiDescription. + +

Sending messages

+ Messages can be sent by calling send(Identifier, Consumer) on a ScreenNetworking + for the sending side. The message ID should match up with a receiver registered on the opposite + side. + +

Example

+
+ 
+ private static final Identifier MESSAGE_ID = new Identifier("my_mod", "some_message");
+
+ // Receiver
+ ScreenNetworking.of(this, NetworkSide.SERVER).receive(MESSAGE_ID, buf -> {
+ 	   // Example data: a lucky number as an int
+     System.out.println("Your lucky number is " + buf.readInt() + "!");
+ });
+
+ // Sending
+
+ // We're sending from a button. The packet data is our lucky number, 123.
+ WButton button = ...;
+ button.setOnClick(() -> {
+     ScreenNetworking.of(this, NetworkSide.CLIENT).send(MESSAGE_ID, buf -> buf.writeInt(123));
+ });
+ 
+ 
+
+
Since:
+
3.3.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      static ScreenNetworking of(SyncedGuiDescription description, + NetworkSide networkSide)
      +
      Gets a networking handler for the GUI description that is active on the specified side.
      +
      +
      Parameters:
      +
      description - the GUI description
      +
      networkSide - the network side
      +
      Returns:
      +
      the network handler
      +
      Throws:
      +
      NullPointerException - if either parameter is null
      +
      +
      +
    • +
    • +
      +

      receive

      +
      void receive(Identifier message, + ScreenNetworking.MessageReceiver receiver)
      +
      Registers a message receiver for the message.
      +
      +
      Parameters:
      +
      message - the screen message ID
      +
      receiver - the message receiver
      +
      Throws:
      +
      IllegalStateException - if the message has already been registered
      +
      NullPointerException - if either parameter is null
      +
      +
      +
    • +
    • +
      +

      send

      +
      void send(Identifier message, + Consumer<PacketByteBuf> writer)
      +
      Sends a screen message to the other side of the connection.
      +
      +
      Parameters:
      +
      message - the screen message ID
      +
      writer - a writer that writes the message contents to a packet buffer; + should not read the buffer
      +
      Throws:
      +
      NullPointerException - if either parameter is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/networking/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/networking/package-summary.html index eb406e0..cf834a2 100644 --- a/libgui/io/github/cottonmc/cotton/gui/networking/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/networking/package-summary.html @@ -1,131 +1,132 @@ - - - - -io.github.cottonmc.cotton.gui.networking (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.networking

-
-
-
package io.github.cottonmc.cotton.gui.networking
-
-
Screen networking helpers.
-
-
Since:
-
3.3.0
-
See Also:
-
- -
-
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.networking (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.networking

+
+
+
package io.github.cottonmc.cotton.gui.networking
+
+
Screen networking helpers.
+
+
Since:
+
3.3.0
+
See Also:
+
+ +
+
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/networking/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/networking/package-tree.html index 2c9f9c4..c901678 100644 --- a/libgui/io/github/cottonmc/cotton/gui/networking/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/networking/package-tree.html @@ -1,81 +1,82 @@ - - - - -io.github.cottonmc.cotton.gui.networking Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.networking

-Package Hierarchies: - -
-
-

Interface Hierarchy

- -
-
-

Enum Class Hierarchy

- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.networking Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.networking

+Package Hierarchies: + +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/package-summary.html index f3dab21..79e02b0 100644 --- a/libgui/io/github/cottonmc/cotton/gui/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/package-summary.html @@ -1,133 +1,134 @@ - - - - -io.github.cottonmc.cotton.gui (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui

-
-
-
package io.github.cottonmc.cotton.gui
-
-
Basic GUI classes and server-side GUI descriptions.
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui

+
+
+
package io.github.cottonmc.cotton.gui
+
+
Basic GUI classes and server-side GUI descriptions.
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/package-tree.html index 92e9b71..b8d1a9a 100644 --- a/libgui/io/github/cottonmc/cotton/gui/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/package-tree.html @@ -1,91 +1,92 @@ - - - - -io.github.cottonmc.cotton.gui Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-

Interface Hierarchy

- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.html b/libgui/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.html index e9898c0..0e1e1b8 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.html @@ -1,190 +1,191 @@ - - - - -TooltipBuilder (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class TooltipBuilder

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.TooltipBuilder
-
-
-
-
@Environment(CLIENT) -public final class TooltipBuilder -extends Object
-
A builder for widget tooltips.
-
-
Since:
-
3.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      TooltipBuilder

      -
      public TooltipBuilder()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public TooltipBuilder add(Text... lines)
      -
      Adds the lines to this builder.
      -
      -
      Parameters:
      -
      lines - the lines
      -
      Returns:
      -
      this builder
      -
      -
      -
    • -
    • -
      -

      add

      -
      public TooltipBuilder add(OrderedText... lines)
      -
      Adds the lines to this builder.
      -
      -
      Parameters:
      -
      lines - the lines
      -
      Returns:
      -
      this builder
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +TooltipBuilder (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TooltipBuilder

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.TooltipBuilder
+
+
+
+
@Environment(CLIENT) +public final class TooltipBuilder +extends Object
+
A builder for widget tooltips.
+
+
Since:
+
3.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TooltipBuilder

      +
      public TooltipBuilder()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public TooltipBuilder add(Text... lines)
      +
      Adds the lines to this builder.
      +
      +
      Parameters:
      +
      lines - the lines
      +
      Returns:
      +
      this builder
      +
      +
      +
    • +
    • +
      +

      add

      +
      public TooltipBuilder add(OrderedText... lines)
      +
      Adds the lines to this builder.
      +
      +
      Parameters:
      +
      lines - the lines
      +
      Returns:
      +
      this builder
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.Direction.html b/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.Direction.html index 2b1cd16..420d7dd 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.Direction.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.Direction.html @@ -1,280 +1,281 @@ - - - - -WAbstractSlider.Direction (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class WAbstractSlider.Direction

-
-
java.lang.Object -
java.lang.Enum<WAbstractSlider.Direction> -
io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<WAbstractSlider.Direction>, Constable
-
-
-
Enclosing class:
-
WAbstractSlider
-
-
-
public static enum WAbstractSlider.Direction -extends Enum<WAbstractSlider.Direction>
-
The direction enum represents all four directions a slider can face. - -

For example, a slider whose value grows towards the right faces right. - -

The default direction for vertical sliders is UP and - the one for horizontal sliders is RIGHT.

-
-
Since:
-
2.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static WAbstractSlider.Direction[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static WAbstractSlider.Direction valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    • -
      -

      getAxis

      -
      public Axis getAxis()
      -
      Gets the direction's axis.
      -
      -
      Returns:
      -
      the axis
      -
      -
      -
    • -
    • -
      -

      isInverted

      -
      public boolean isInverted()
      -
      Returns whether this slider is inverted. - -

      An inverted slider will have reversed keyboard control.

      -
      -
      Returns:
      -
      whether this slider is inverted
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WAbstractSlider.Direction (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class WAbstractSlider.Direction

+
+
java.lang.Object +
java.lang.Enum<WAbstractSlider.Direction> +
io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<WAbstractSlider.Direction>, Constable
+
+
+
Enclosing class:
+
WAbstractSlider
+
+
+
public static enum WAbstractSlider.Direction +extends Enum<WAbstractSlider.Direction>
+
The direction enum represents all four directions a slider can face. + +

For example, a slider whose value grows towards the right faces right. + +

The default direction for vertical sliders is UP and + the one for horizontal sliders is RIGHT.

+
+
Since:
+
2.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static WAbstractSlider.Direction[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static WAbstractSlider.Direction valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getAxis

      +
      public Axis getAxis()
      +
      Gets the direction's axis.
      +
      +
      Returns:
      +
      the axis
      +
      +
      +
    • +
    • +
      +

      isInverted

      +
      public boolean isInverted()
      +
      Returns whether this slider is inverted. + +

      An inverted slider will have reversed keyboard control.

      +
      +
      Returns:
      +
      whether this slider is inverted
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.html b/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.html index 8698e88..820a7cf 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.html @@ -1,912 +1,913 @@ - - - - -WAbstractSlider (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WAbstractSlider

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WAbstractSlider
-
-
-
-
-
Direct Known Subclasses:
-
WLabeledSlider, WSlider
-
-
-
public abstract class WAbstractSlider -extends WWidget
-
A base class for slider widgets that can be used to select int values. - -

You can set two listeners on a slider: -

    -
  • - A value change listener that gets all value changes. -
  • -
  • - A dragging finished listener that gets called when the player stops dragging the slider - or modifies the value with the keyboard. - For example, this can be used for sending sync packets to the server - when the player has selected a value. -
  • -
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      min

      -
      protected int min
      -
      -
    • -
    • -
      -

      max

      -
      protected int max
      -
      -
    • -
    • -
      -

      axis

      -
      protected final Axis axis
      -
      -
    • -
    • -
      -

      direction

      -
      protected WAbstractSlider.Direction direction
      -
      -
    • -
    • -
      -

      value

      -
      protected int value
      -
      -
    • -
    • -
      -

      dragging

      -
      protected boolean dragging
      -
      True if the user is currently dragging the thumb. - Used for visuals.
      -
      -
    • -
    • -
      -

      valueToCoordRatio

      -
      protected float valueToCoordRatio
      -
      A value:coordinate ratio. Used for converting user input into values.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      coordToValueRatio

      -
      protected float coordToValueRatio
      -
      A coordinate:value ratio. Used for rendering the thumb.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WAbstractSlider

      -
      protected WAbstractSlider(int min, - int max, - Axis axis)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getThumbWidth

      -
      protected abstract int getThumbWidth()
      -
      Returns the thumb size along the slider axis.
      -
      -
      Returns:
      -
      the thumb size along the slider axis
      -
      -
      -
    • -
    • -
      -

      isMouseInsideBounds

      -
      protected abstract boolean isMouseInsideBounds(int x, - int y)
      -
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      -
      -
      Parameters:
      -
      x - the mouse x position
      -
      y - the mouse y position
      -
      Returns:
      -
      if the cursor is inside dragging bounds
      -
      -
      -
    • -
    • -
      -

      updateValueCoordRatios

      -
      protected void updateValueCoordRatios()
      -
      Updates coordToValueRatio and valueToCoordRatio. - This method should be called whenever this widget resizes or changes it min/max value boundaries.
      -
      -
      Since:
      -
      5.1.0
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      onMouseDown

      -
      @Environment(CLIENT) -public InputResult onMouseDown(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed while inside its bounds
      -
      -
      Overrides:
      -
      onMouseDown in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseDrag

      -
      @Environment(CLIENT) -public InputResult onMouseDrag(int x, - int y, - int button, - double deltaX, - double deltaY)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      -
      -
      Overrides:
      -
      onMouseDrag in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      deltaX - The amount of dragging on the X axis
      -
      deltaY - The amount of dragging on the Y axis
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseUp

      -
      @Environment(CLIENT) -public InputResult onMouseUp(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been released while inside its bounds
      -
      -
      Overrides:
      -
      onMouseUp in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseScroll

      -
      @Environment(CLIENT) -public InputResult onMouseScroll(int x, - int y, - double amount)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been scrolled inside its bounds.
      -
      -
      Overrides:
      -
      onMouseScroll in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      amount - The scrolled amount. Positive values are up and negative values are down.
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      tick

      -
      @Environment(CLIENT) -public void tick()
      -
      Description copied from class: WWidget
      -
      Executes a client-side tick for this widget.
      -
      -
      Overrides:
      -
      tick in class WWidget
      -
      -
      -
    • -
    • -
      -

      getValue

      -
      public int getValue()
      -
      -
    • -
    • -
      -

      setValue

      -
      public void setValue(int value)
      -
      Sets the slider value without calling listeners.
      -
      -
      Parameters:
      -
      value - the new value
      -
      -
      -
    • -
    • -
      -

      setValue

      -
      public void setValue(int value, - boolean callListeners)
      -
      Sets the slider value.
      -
      -
      Parameters:
      -
      value - the new value
      -
      callListeners - if true, call all slider listeners
      -
      -
      -
    • -
    • -
      -

      getValueChangeListener

      -
      @Nullable -public @Nullable IntConsumer getValueChangeListener()
      -
      -
    • -
    • -
      -

      setValueChangeListener

      -
      public void setValueChangeListener(@Nullable - @Nullable IntConsumer valueChangeListener)
      -
      -
    • -
    • -
      -

      getDraggingFinishedListener

      -
      @Nullable -public @Nullable IntConsumer getDraggingFinishedListener()
      -
      -
    • -
    • -
      -

      setDraggingFinishedListener

      -
      public void setDraggingFinishedListener(@Nullable - @Nullable IntConsumer draggingFinishedListener)
      -
      -
    • -
    • -
      -

      getMinValue

      -
      public int getMinValue()
      -
      -
    • -
    • -
      -

      getMaxValue

      -
      public int getMaxValue()
      -
      -
    • -
    • -
      -

      setMinValue

      -
      public void setMinValue(int min)
      -
      -
    • -
    • -
      -

      setMaxValue

      -
      public void setMaxValue(int max)
      -
      -
    • -
    • -
      -

      getAxis

      -
      public Axis getAxis()
      -
      -
    • -
    • -
      -

      getDirection

      -
      public WAbstractSlider.Direction getDirection()
      -
      Gets the direction of this slider.
      -
      -
      Returns:
      -
      the direction
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setDirection

      -
      public void setDirection(WAbstractSlider.Direction direction)
      -
      Sets the direction of this slider.
      -
      -
      Parameters:
      -
      direction - the new direction
      -
      Throws:
      -
      IllegalArgumentException - if the direction axis is not equal to axis.
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      onValueChanged

      -
      protected void onValueChanged(int value)
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      @Environment(CLIENT) -public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyReleased

      -
      @Environment(CLIENT) -public InputResult onKeyReleased(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been released
      -
      -
      Overrides:
      -
      onKeyReleased in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      isDragging

      -
      public boolean isDragging()
      -
      Tests whether the user is dragging this slider.
      -
      -
      Returns:
      -
      true if this slider is being dragged, false otherwise
      -
      Since:
      -
      4.0.0
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    • -
      -

      isDecreasingKey

      -
      public static boolean isDecreasingKey(int ch, - WAbstractSlider.Direction direction)
      -
      Tests if the key should decrease sliders with the specified direction.
      -
      -
      Parameters:
      -
      ch - the key code
      -
      direction - the direction
      -
      Returns:
      -
      true if the key should decrease sliders with the direction, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      isIncreasingKey

      -
      public static boolean isIncreasingKey(int ch, - WAbstractSlider.Direction direction)
      -
      Tests if the key should increase sliders with the specified direction.
      -
      -
      Parameters:
      -
      ch - the key code
      -
      direction - the direction
      -
      Returns:
      -
      true if the key should increase sliders with the direction, false otherwise
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WAbstractSlider (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WAbstractSlider

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WAbstractSlider
+
+
+
+
+
Direct Known Subclasses:
+
WLabeledSlider, WSlider
+
+
+
public abstract class WAbstractSlider +extends WWidget
+
A base class for slider widgets that can be used to select int values. + +

You can set two listeners on a slider: +

    +
  • + A value change listener that gets all value changes. +
  • +
  • + A dragging finished listener that gets called when the player stops dragging the slider + or modifies the value with the keyboard. + For example, this can be used for sending sync packets to the server + when the player has selected a value. +
  • +
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      min

      +
      protected int min
      +
      +
    • +
    • +
      +

      max

      +
      protected int max
      +
      +
    • +
    • +
      +

      axis

      +
      protected final Axis axis
      +
      +
    • +
    • +
      +

      direction

      +
      protected WAbstractSlider.Direction direction
      +
      +
    • +
    • +
      +

      value

      +
      protected int value
      +
      +
    • +
    • +
      +

      dragging

      +
      protected boolean dragging
      +
      True if the user is currently dragging the thumb. + Used for visuals.
      +
      +
    • +
    • +
      +

      valueToCoordRatio

      +
      protected float valueToCoordRatio
      +
      A value:coordinate ratio. Used for converting user input into values.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      coordToValueRatio

      +
      protected float coordToValueRatio
      +
      A coordinate:value ratio. Used for rendering the thumb.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WAbstractSlider

      +
      protected WAbstractSlider(int min, + int max, + Axis axis)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getThumbWidth

      +
      protected abstract int getThumbWidth()
      +
      Returns the thumb size along the slider axis.
      +
      +
      Returns:
      +
      the thumb size along the slider axis
      +
      +
      +
    • +
    • +
      +

      isMouseInsideBounds

      +
      protected abstract boolean isMouseInsideBounds(int x, + int y)
      +
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      +
      +
      Parameters:
      +
      x - the mouse x position
      +
      y - the mouse y position
      +
      Returns:
      +
      if the cursor is inside dragging bounds
      +
      +
      +
    • +
    • +
      +

      updateValueCoordRatios

      +
      protected void updateValueCoordRatios()
      +
      Updates coordToValueRatio and valueToCoordRatio. + This method should be called whenever this widget resizes or changes it min/max value boundaries.
      +
      +
      Since:
      +
      5.1.0
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      onMouseDown

      +
      @Environment(CLIENT) +public InputResult onMouseDown(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed while inside its bounds
      +
      +
      Overrides:
      +
      onMouseDown in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseDrag

      +
      @Environment(CLIENT) +public InputResult onMouseDrag(int x, + int y, + int button, + double deltaX, + double deltaY)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      +
      +
      Overrides:
      +
      onMouseDrag in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      deltaX - The amount of dragging on the X axis
      +
      deltaY - The amount of dragging on the Y axis
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseUp

      +
      @Environment(CLIENT) +public InputResult onMouseUp(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been released while inside its bounds
      +
      +
      Overrides:
      +
      onMouseUp in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseScroll

      +
      @Environment(CLIENT) +public InputResult onMouseScroll(int x, + int y, + double amount)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been scrolled inside its bounds.
      +
      +
      Overrides:
      +
      onMouseScroll in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      amount - The scrolled amount. Positive values are up and negative values are down.
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      tick

      +
      @Environment(CLIENT) +public void tick()
      +
      Description copied from class: WWidget
      +
      Executes a client-side tick for this widget.
      +
      +
      Overrides:
      +
      tick in class WWidget
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(int value)
      +
      Sets the slider value without calling listeners.
      +
      +
      Parameters:
      +
      value - the new value
      +
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(int value, + boolean callListeners)
      +
      Sets the slider value.
      +
      +
      Parameters:
      +
      value - the new value
      +
      callListeners - if true, call all slider listeners
      +
      +
      +
    • +
    • +
      +

      getValueChangeListener

      +
      @Nullable +public @Nullable IntConsumer getValueChangeListener()
      +
      +
    • +
    • +
      +

      setValueChangeListener

      +
      public void setValueChangeListener(@Nullable + @Nullable IntConsumer valueChangeListener)
      +
      +
    • +
    • +
      +

      getDraggingFinishedListener

      +
      @Nullable +public @Nullable IntConsumer getDraggingFinishedListener()
      +
      +
    • +
    • +
      +

      setDraggingFinishedListener

      +
      public void setDraggingFinishedListener(@Nullable + @Nullable IntConsumer draggingFinishedListener)
      +
      +
    • +
    • +
      +

      getMinValue

      +
      public int getMinValue()
      +
      +
    • +
    • +
      +

      getMaxValue

      +
      public int getMaxValue()
      +
      +
    • +
    • +
      +

      setMinValue

      +
      public void setMinValue(int min)
      +
      +
    • +
    • +
      +

      setMaxValue

      +
      public void setMaxValue(int max)
      +
      +
    • +
    • +
      +

      getAxis

      +
      public Axis getAxis()
      +
      +
    • +
    • +
      +

      getDirection

      +
      public WAbstractSlider.Direction getDirection()
      +
      Gets the direction of this slider.
      +
      +
      Returns:
      +
      the direction
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setDirection

      +
      public void setDirection(WAbstractSlider.Direction direction)
      +
      Sets the direction of this slider.
      +
      +
      Parameters:
      +
      direction - the new direction
      +
      Throws:
      +
      IllegalArgumentException - if the direction axis is not equal to axis.
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      onValueChanged

      +
      protected void onValueChanged(int value)
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      @Environment(CLIENT) +public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyReleased

      +
      @Environment(CLIENT) +public InputResult onKeyReleased(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been released
      +
      +
      Overrides:
      +
      onKeyReleased in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      isDragging

      +
      public boolean isDragging()
      +
      Tests whether the user is dragging this slider.
      +
      +
      Returns:
      +
      true if this slider is being dragged, false otherwise
      +
      Since:
      +
      4.0.0
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    • +
      +

      isDecreasingKey

      +
      public static boolean isDecreasingKey(int ch, + WAbstractSlider.Direction direction)
      +
      Tests if the key should decrease sliders with the specified direction.
      +
      +
      Parameters:
      +
      ch - the key code
      +
      direction - the direction
      +
      Returns:
      +
      true if the key should decrease sliders with the direction, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      isIncreasingKey

      +
      public static boolean isIncreasingKey(int ch, + WAbstractSlider.Direction direction)
      +
      Tests if the key should increase sliders with the specified direction.
      +
      +
      Parameters:
      +
      ch - the key code
      +
      direction - the direction
      +
      Returns:
      +
      true if the key should increase sliders with the direction, false otherwise
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WBar.Direction.html b/libgui/io/github/cottonmc/cotton/gui/widget/WBar.Direction.html index 658df6d..d345a0c 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WBar.Direction.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WBar.Direction.html @@ -1,238 +1,239 @@ - - - - -WBar.Direction (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class WBar.Direction

-
-
java.lang.Object -
java.lang.Enum<WBar.Direction> -
io.github.cottonmc.cotton.gui.widget.WBar.Direction
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<WBar.Direction>, Constable
-
-
-
Enclosing class:
-
WBar
-
-
-
public static enum WBar.Direction -extends Enum<WBar.Direction>
-
The direction of a WBar, representing where the bar will - grown when its field increases.
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static WBar.Direction[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static WBar.Direction valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WBar.Direction (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class WBar.Direction

+
+
java.lang.Object +
java.lang.Enum<WBar.Direction> +
io.github.cottonmc.cotton.gui.widget.WBar.Direction
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<WBar.Direction>, Constable
+
+
+
Enclosing class:
+
WBar
+
+
+
public static enum WBar.Direction +extends Enum<WBar.Direction>
+
The direction of a WBar, representing where the bar will + grown when its field increases.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static WBar.Direction[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static WBar.Direction valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WBar.html b/libgui/io/github/cottonmc/cotton/gui/widget/WBar.html index b44a22e..8d97bb7 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WBar.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WBar.html @@ -1,626 +1,627 @@ - - - - -WBar (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WBar

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WBar
-
-
-
-
-
public class WBar -extends WWidget
-
A bar that displays int values from a PropertyDelegate. - -

Bars can be used for all kinds of bars including - progress bars (and progress arrows) and energy bars.

-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      bg

      -
      @Nullable -protected final @Nullable Texture bg
      -
      The background texture. If not null, it will be - drawn behind the bar contents.
      -
      -
    • -
    • -
      -

      bar

      -
      @Nullable -protected final @Nullable Texture bar
      -
      The bar texture. If not null, it will be - drawn to represent the current field.
      -
      -
    • -
    • -
      -

      field

      -
      protected final int field
      -
      The ID of the displayed property in the properties.
      -
      -
    • -
    • -
      -

      max

      -
      protected final int max
      -
      The ID of the property representing the maximum value of the field. - -

      If max is negative, the maxValue constant will be used instead.

      -
      -
    • -
    • -
      -

      maxValue

      -
      protected int maxValue
      -
      The constant maximum value of the field. - -

      This constant will only be used if max is negative.

      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      properties

      -
      protected PropertyDelegate properties
      -
      The properties used for painting this bar. - -

      The current value is read from the property with ID field, - and the maximum value is usually read from the property with ID max.

      -
      -
    • -
    • -
      -

      direction

      -
      protected final WBar.Direction direction
      -
      The direction of this bar, representing where the bar will grow - when the field increases.
      -
      -
    • -
    • -
      -

      tooltipLabel

      -
      protected String tooltipLabel
      -
      The translation key of the tooltip.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      tooltipTextComponent

      -
      protected Text tooltipTextComponent
      -
      A tooltip text component. This can be used instead of tooltipLabel, - or together with it. In that case, this component will be drawn after the other label.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      withTooltip

      -
      public WBar withTooltip(String label)
      -
      Adds a tooltip to the WBar. - -

      Formatting Guide: The tooltip label is passed into String.format and can receive two integers - (%d) - the first is the current value of the bar's focused field, and the second is the - bar's focused maximum.

      -
      -
      Parameters:
      -
      label - the translation key of the string to render on the tooltip
      -
      Returns:
      -
      this bar with tooltip enabled and set
      -
      -
      -
    • -
    • -
      -

      withTooltip

      -
      public WBar withTooltip(Text label)
      -
      Adds a tooltip Text to the WBar.
      -
      -
      Parameters:
      -
      label - the added tooltip label
      -
      Returns:
      -
      this bar
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      addTooltip

      -
      @Environment(CLIENT) -public void addTooltip(TooltipBuilder information)
      -
      Description copied from class: WWidget
      -
      Adds lines to this widget's tooltip. If the lines remain empty after this call, no tooltip will be drawn.
      -
      -
      Overrides:
      -
      addTooltip in class WWidget
      -
      Parameters:
      -
      information - the builder to add tooltip lines to
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription host)
      -
      Description copied from class: WWidget
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized.

      -
      -
      Overrides:
      -
      validate in class WWidget
      -
      Parameters:
      -
      host - the host GUI description
      -
      -
      -
    • -
    • -
      -

      getProperties

      -
      @Nullable -public @Nullable PropertyDelegate getProperties()
      -
      Gets the current properties of this bar.
      -
      -
      Returns:
      -
      the current property delegate, or null if not initialized yet
      -
      -
      -
    • -
    • -
      -

      setProperties

      -
      public WBar setProperties(PropertyDelegate properties)
      -
      Sets the current properties of this bar. - -

      This method is meant for situations when a GUI description is unavailable (such as HUDs). - GuiDescription.getPropertyDelegate() should be preferred over this if available.

      -
      -
      Parameters:
      -
      properties - the properties
      -
      Returns:
      -
      this bar
      -
      -
      -
    • -
    • -
      -

      withConstantMaximum

      -
      public static WBar withConstantMaximum(Identifier bg, - Identifier bar, - int field, - int maxValue, - WBar.Direction dir)
      -
      Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
      -
      -
      Parameters:
      -
      bg - the background image to use for the bar
      -
      bar - the foreground image that represents the filled bar
      -
      field - the field index for bar values
      -
      maxValue - the constant maximum value for the bar
      -
      dir - the direction the bar should grow towards
      -
      Returns:
      -
      a new WBar with a constant maximum value
      -
      -
      -
    • -
    • -
      -

      withConstantMaximum

      -
      public static WBar withConstantMaximum(Texture bg, - Texture bar, - int field, - int maxValue, - WBar.Direction dir)
      -
      Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
      -
      -
      Parameters:
      -
      bg - the background image to use for the bar
      -
      bar - the foreground image that represents the filled bar
      -
      field - the field index for bar values
      -
      maxValue - the constant maximum value for the bar
      -
      dir - the direction the bar should grow towards
      -
      Returns:
      -
      a new WBar with a constant maximum value
      -
      Since:
      -
      4.1.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WBar (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WBar

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WBar
+
+
+
+
+
public class WBar +extends WWidget
+
A bar that displays int values from a PropertyDelegate. + +

Bars can be used for all kinds of bars including + progress bars (and progress arrows) and energy bars.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      bg

      +
      @Nullable +protected final @Nullable Texture bg
      +
      The background texture. If not null, it will be + drawn behind the bar contents.
      +
      +
    • +
    • +
      +

      bar

      +
      @Nullable +protected final @Nullable Texture bar
      +
      The bar texture. If not null, it will be + drawn to represent the current field.
      +
      +
    • +
    • +
      +

      field

      +
      protected final int field
      +
      The ID of the displayed property in the properties.
      +
      +
    • +
    • +
      +

      max

      +
      protected final int max
      +
      The ID of the property representing the maximum value of the field. + +

      If max is negative, the maxValue constant will be used instead.

      +
      +
    • +
    • +
      +

      maxValue

      +
      protected int maxValue
      +
      The constant maximum value of the field. + +

      This constant will only be used if max is negative.

      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      properties

      +
      protected PropertyDelegate properties
      +
      The properties used for painting this bar. + +

      The current value is read from the property with ID field, + and the maximum value is usually read from the property with ID max.

      +
      +
    • +
    • +
      +

      direction

      +
      protected final WBar.Direction direction
      +
      The direction of this bar, representing where the bar will grow + when the field increases.
      +
      +
    • +
    • +
      +

      tooltipLabel

      +
      protected String tooltipLabel
      +
      The translation key of the tooltip.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      tooltipTextComponent

      +
      protected Text tooltipTextComponent
      +
      A tooltip text component. This can be used instead of tooltipLabel, + or together with it. In that case, this component will be drawn after the other label.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      withTooltip

      +
      public WBar withTooltip(String label)
      +
      Adds a tooltip to the WBar. + +

      Formatting Guide: The tooltip label is passed into String.format and can receive two integers + (%d) - the first is the current value of the bar's focused field, and the second is the + bar's focused maximum.

      +
      +
      Parameters:
      +
      label - the translation key of the string to render on the tooltip
      +
      Returns:
      +
      this bar with tooltip enabled and set
      +
      +
      +
    • +
    • +
      +

      withTooltip

      +
      public WBar withTooltip(Text label)
      +
      Adds a tooltip Text to the WBar.
      +
      +
      Parameters:
      +
      label - the added tooltip label
      +
      Returns:
      +
      this bar
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      addTooltip

      +
      @Environment(CLIENT) +public void addTooltip(TooltipBuilder information)
      +
      Description copied from class: WWidget
      +
      Adds lines to this widget's tooltip. If the lines remain empty after this call, no tooltip will be drawn.
      +
      +
      Overrides:
      +
      addTooltip in class WWidget
      +
      Parameters:
      +
      information - the builder to add tooltip lines to
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription host)
      +
      Description copied from class: WWidget
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized.

      +
      +
      Overrides:
      +
      validate in class WWidget
      +
      Parameters:
      +
      host - the host GUI description
      +
      +
      +
    • +
    • +
      +

      getProperties

      +
      @Nullable +public @Nullable PropertyDelegate getProperties()
      +
      Gets the current properties of this bar.
      +
      +
      Returns:
      +
      the current property delegate, or null if not initialized yet
      +
      +
      +
    • +
    • +
      +

      setProperties

      +
      public WBar setProperties(PropertyDelegate properties)
      +
      Sets the current properties of this bar. + +

      This method is meant for situations when a GUI description is unavailable (such as HUDs). + GuiDescription.getPropertyDelegate() should be preferred over this if available.

      +
      +
      Parameters:
      +
      properties - the properties
      +
      Returns:
      +
      this bar
      +
      +
      +
    • +
    • +
      +

      withConstantMaximum

      +
      public static WBar withConstantMaximum(Identifier bg, + Identifier bar, + int field, + int maxValue, + WBar.Direction dir)
      +
      Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
      +
      +
      Parameters:
      +
      bg - the background image to use for the bar
      +
      bar - the foreground image that represents the filled bar
      +
      field - the field index for bar values
      +
      maxValue - the constant maximum value for the bar
      +
      dir - the direction the bar should grow towards
      +
      Returns:
      +
      a new WBar with a constant maximum value
      +
      +
      +
    • +
    • +
      +

      withConstantMaximum

      +
      public static WBar withConstantMaximum(Texture bg, + Texture bar, + int field, + int maxValue, + WBar.Direction dir)
      +
      Creates a WBar that has a constant maximum-value instead of getting the maximum from a field.
      +
      +
      Parameters:
      +
      bg - the background image to use for the bar
      +
      bar - the foreground image that represents the filled bar
      +
      field - the field index for bar values
      +
      maxValue - the constant maximum value for the bar
      +
      dir - the direction the bar should grow towards
      +
      Returns:
      +
      a new WBar with a constant maximum value
      +
      Since:
      +
      4.1.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WBox.html b/libgui/io/github/cottonmc/cotton/gui/widget/WBox.html index 2b99ce9..233eb97 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WBox.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WBox.html @@ -1,495 +1,496 @@ - - - - -WBox (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WBox

-
- -
-
-
public class WBox -extends WPanelWithInsets
-
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
-
-
Since:
-
2.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      spacing

      -
      protected int spacing
      -
      The spacing between widgets.
      -
      -
    • -
    • -
      -

      axis

      -
      protected Axis axis
      -
      The axis that the widgets are laid out on.
      -
      -
    • -
    • -
      -

      horizontalAlignment

      -
      protected HorizontalAlignment horizontalAlignment
      -
      The horizontal alignment for this box's children.
      -
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      verticalAlignment

      -
      protected VerticalAlignment verticalAlignment
      -
      The vertical alignment for this box's children.
      -
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WBox

      -
      public WBox(Axis axis)
      -
      Constructs a box.
      -
      -
      Parameters:
      -
      axis - the box axis
      -
      Throws:
      -
      NullPointerException - if the axis is null
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public void add(WWidget widget, - int width, - int height)
      -
      Adds a widget to this box. - If the widget is resizeable, resizes it to the provided dimensions.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      width - the new width of the widget
      -
      height - the new height of the widget
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget widget)
      -
      Adds a widget to this box. - If the widget is resizeable, resizes it to 18x18.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      -
      -
    • -
    • -
      -

      layout

      -
      public void layout()
      -
      Description copied from class: WPanel
      -
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      -
      -
      Overrides:
      -
      layout in class WPanel
      -
      -
      -
    • -
    • -
      -

      getSpacing

      -
      public int getSpacing()
      -
      Gets the spacing between widgets.
      -
      -
      Returns:
      -
      the spacing
      -
      -
      -
    • -
    • -
      -

      setSpacing

      -
      public WBox setSpacing(int spacing)
      -
      Sets the spacing between widgets in this box.
      -
      -
      Parameters:
      -
      spacing - the new spacing
      -
      Returns:
      -
      this box
      -
      -
      -
    • -
    • -
      -

      getAxis

      -
      public Axis getAxis()
      -
      Gets the axis of this box.
      -
      -
      Returns:
      -
      the axis
      -
      -
      -
    • -
    • -
      -

      setAxis

      -
      public WBox setAxis(Axis axis)
      -
      Sets the axis of this box.
      -
      -
      Parameters:
      -
      axis - the new axis
      -
      Returns:
      -
      this box
      -
      Throws:
      -
      NullPointerException - if the axis is null
      -
      -
      -
    • -
    • -
      -

      getHorizontalAlignment

      -
      public HorizontalAlignment getHorizontalAlignment()
      -
      Gets the horizontal alignment of this box.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      setHorizontalAlignment

      -
      public WBox setHorizontalAlignment(HorizontalAlignment alignment)
      -
      Sets the horizontal alignment of this box.
      -
      -
      Parameters:
      -
      alignment - the new alignment
      -
      Returns:
      -
      this box
      -
      Throws:
      -
      NullPointerException - if the alignment is null
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      getVerticalAlignment

      -
      public VerticalAlignment getVerticalAlignment()
      -
      Gets the vertical alignment of this box.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      setVerticalAlignment

      -
      public WBox setVerticalAlignment(VerticalAlignment alignment)
      -
      Sets the vertical alignment of this box.
      -
      -
      Parameters:
      -
      alignment - the new alignment
      -
      Returns:
      -
      this box
      -
      Throws:
      -
      NullPointerException - if the alignment is null
      -
      Since:
      -
      2.1.0
      -
      -
      -
    • -
    • -
      -

      setInsets

      -
      public WBox setInsets(Insets insets)
      -
      Description copied from class: WPanelWithInsets
      -
      Sets the layout insets of this panel. - Subclasses are encouraged to override this method to return their more specific type - (such as WGridPanel). - -

      If there are already widgets in this panel when the insets are modified, - the panel is resized and the widgets are moved according to the insets.

      -
      -
      Overrides:
      -
      setInsets in class WPanelWithInsets
      -
      Parameters:
      -
      insets - the insets, should not be null
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WBox (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WBox

+
+ +
+
+
public class WBox +extends WPanelWithInsets
+
Similar to the BoxLayout in Swing, this widget represents a list of widgets along an axis.
+
+
Since:
+
2.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      spacing

      +
      protected int spacing
      +
      The spacing between widgets.
      +
      +
    • +
    • +
      +

      axis

      +
      protected Axis axis
      +
      The axis that the widgets are laid out on.
      +
      +
    • +
    • +
      +

      horizontalAlignment

      +
      protected HorizontalAlignment horizontalAlignment
      +
      The horizontal alignment for this box's children.
      +
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      verticalAlignment

      +
      protected VerticalAlignment verticalAlignment
      +
      The vertical alignment for this box's children.
      +
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WBox

      +
      public WBox(Axis axis)
      +
      Constructs a box.
      +
      +
      Parameters:
      +
      axis - the box axis
      +
      Throws:
      +
      NullPointerException - if the axis is null
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(WWidget widget, + int width, + int height)
      +
      Adds a widget to this box. + If the widget is resizeable, resizes it to the provided dimensions.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      width - the new width of the widget
      +
      height - the new height of the widget
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget widget)
      +
      Adds a widget to this box. + If the widget is resizeable, resizes it to 18x18.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      +
      +
    • +
    • +
      +

      layout

      +
      public void layout()
      +
      Description copied from class: WPanel
      +
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      +
      +
      Overrides:
      +
      layout in class WPanel
      +
      +
      +
    • +
    • +
      +

      getSpacing

      +
      public int getSpacing()
      +
      Gets the spacing between widgets.
      +
      +
      Returns:
      +
      the spacing
      +
      +
      +
    • +
    • +
      +

      setSpacing

      +
      public WBox setSpacing(int spacing)
      +
      Sets the spacing between widgets in this box.
      +
      +
      Parameters:
      +
      spacing - the new spacing
      +
      Returns:
      +
      this box
      +
      +
      +
    • +
    • +
      +

      getAxis

      +
      public Axis getAxis()
      +
      Gets the axis of this box.
      +
      +
      Returns:
      +
      the axis
      +
      +
      +
    • +
    • +
      +

      setAxis

      +
      public WBox setAxis(Axis axis)
      +
      Sets the axis of this box.
      +
      +
      Parameters:
      +
      axis - the new axis
      +
      Returns:
      +
      this box
      +
      Throws:
      +
      NullPointerException - if the axis is null
      +
      +
      +
    • +
    • +
      +

      getHorizontalAlignment

      +
      public HorizontalAlignment getHorizontalAlignment()
      +
      Gets the horizontal alignment of this box.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      setHorizontalAlignment

      +
      public WBox setHorizontalAlignment(HorizontalAlignment alignment)
      +
      Sets the horizontal alignment of this box.
      +
      +
      Parameters:
      +
      alignment - the new alignment
      +
      Returns:
      +
      this box
      +
      Throws:
      +
      NullPointerException - if the alignment is null
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      getVerticalAlignment

      +
      public VerticalAlignment getVerticalAlignment()
      +
      Gets the vertical alignment of this box.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      setVerticalAlignment

      +
      public WBox setVerticalAlignment(VerticalAlignment alignment)
      +
      Sets the vertical alignment of this box.
      +
      +
      Parameters:
      +
      alignment - the new alignment
      +
      Returns:
      +
      this box
      +
      Throws:
      +
      NullPointerException - if the alignment is null
      +
      Since:
      +
      2.1.0
      +
      +
      +
    • +
    • +
      +

      setInsets

      +
      public WBox setInsets(Insets insets)
      +
      Description copied from class: WPanelWithInsets
      +
      Sets the layout insets of this panel. + Subclasses are encouraged to override this method to return their more specific type + (such as WGridPanel). + +

      If there are already widgets in this panel when the insets are modified, + the panel is resized and the widgets are moved according to the insets.

      +
      +
      Overrides:
      +
      setInsets in class WPanelWithInsets
      +
      Parameters:
      +
      insets - the insets, should not be null
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WButton.html b/libgui/io/github/cottonmc/cotton/gui/widget/WButton.html index aa77f44..6878af9 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WButton.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WButton.html @@ -1,621 +1,622 @@ - - - - -WButton (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WButton

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WButton
-
-
-
-
-
public class WButton -extends WWidget
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      color

      -
      protected int color
      -
      -
    • -
    • -
      -

      darkmodeColor

      -
      protected int darkmodeColor
      -
      -
    • -
    • -
      -

      iconSize

      -
      protected int iconSize
      -
      The size (width/height) of this button's icon in pixels.
      -
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    • -
      -

      alignment

      -
      protected HorizontalAlignment alignment
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WButton

      -
      public WButton()
      -
      Constructs a button with no label and no icon.
      -
      -
    • -
    • -
      -

      WButton

      -
      public WButton(@Nullable - @Nullable Icon icon)
      -
      Constructs a button with an icon.
      -
      -
      Parameters:
      -
      icon - the icon
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      WButton

      -
      public WButton(@Nullable - @Nullable Text label)
      -
      Constructs a button with a label.
      -
      -
      Parameters:
      -
      label - the label
      -
      -
      -
    • -
    • -
      -

      WButton

      -
      public WButton(@Nullable - @Nullable Icon icon, - @Nullable - @Nullable Text label)
      -
      Constructs a button with an icon and a label.
      -
      -
      Parameters:
      -
      icon - the icon
      -
      label - the label
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      @Environment(CLIENT) -public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getOnClick

      -
      @Nullable -public @Nullable Runnable getOnClick()
      -
      Gets the click handler of this button.
      -
      -
      Returns:
      -
      the click handler
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      setOnClick

      -
      public WButton setOnClick(@Nullable - @Nullable Runnable onClick)
      -
      Sets the click handler of this button.
      -
      -
      Parameters:
      -
      onClick - the new click handler
      -
      Returns:
      -
      this button
      -
      -
      -
    • -
    • -
      -

      isEnabled

      -
      public boolean isEnabled()
      -
      -
    • -
    • -
      -

      setEnabled

      -
      public WButton setEnabled(boolean enabled)
      -
      -
    • -
    • -
      -

      getLabel

      -
      @Nullable -public @Nullable Text getLabel()
      -
      -
    • -
    • -
      -

      setLabel

      -
      public WButton setLabel(Text label)
      -
      -
    • -
    • -
      -

      getAlignment

      -
      public HorizontalAlignment getAlignment()
      -
      -
    • -
    • -
      -

      setAlignment

      -
      public WButton setAlignment(HorizontalAlignment alignment)
      -
      -
    • -
    • -
      -

      getIconSize

      -
      public int getIconSize()
      -
      Gets the current height / width of the icon.
      -
      -
      Returns:
      -
      the current height / width of the icon
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    • -
      -

      setIconSize

      -
      public WButton setIconSize(int iconSize)
      -
      Sets the new size of the icon.
      -
      -
      Parameters:
      -
      iconSize - the new height and width of the icon
      -
      Returns:
      -
      this button
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    • -
      -

      getIcon

      -
      @Nullable -public @Nullable Icon getIcon()
      -
      Gets the icon of this button.
      -
      -
      Returns:
      -
      the icon
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      setIcon

      -
      public WButton setIcon(@Nullable - @Nullable Icon icon)
      -
      Sets the icon of this button.
      -
      -
      Parameters:
      -
      icon - the new icon
      -
      Returns:
      -
      this button
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WButton (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WButton

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WButton
+
+
+
+
+
public class WButton +extends WWidget
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      color

      +
      protected int color
      +
      +
    • +
    • +
      +

      darkmodeColor

      +
      protected int darkmodeColor
      +
      +
    • +
    • +
      +

      iconSize

      +
      protected int iconSize
      +
      The size (width/height) of this button's icon in pixels.
      +
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    • +
      +

      alignment

      +
      protected HorizontalAlignment alignment
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WButton

      +
      public WButton()
      +
      Constructs a button with no label and no icon.
      +
      +
    • +
    • +
      +

      WButton

      +
      public WButton(@Nullable + @Nullable Icon icon)
      +
      Constructs a button with an icon.
      +
      +
      Parameters:
      +
      icon - the icon
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      WButton

      +
      public WButton(@Nullable + @Nullable Text label)
      +
      Constructs a button with a label.
      +
      +
      Parameters:
      +
      label - the label
      +
      +
      +
    • +
    • +
      +

      WButton

      +
      public WButton(@Nullable + @Nullable Icon icon, + @Nullable + @Nullable Text label)
      +
      Constructs a button with an icon and a label.
      +
      +
      Parameters:
      +
      icon - the icon
      +
      label - the label
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      @Environment(CLIENT) +public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getOnClick

      +
      @Nullable +public @Nullable Runnable getOnClick()
      +
      Gets the click handler of this button.
      +
      +
      Returns:
      +
      the click handler
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      setOnClick

      +
      public WButton setOnClick(@Nullable + @Nullable Runnable onClick)
      +
      Sets the click handler of this button.
      +
      +
      Parameters:
      +
      onClick - the new click handler
      +
      Returns:
      +
      this button
      +
      +
      +
    • +
    • +
      +

      isEnabled

      +
      public boolean isEnabled()
      +
      +
    • +
    • +
      +

      setEnabled

      +
      public WButton setEnabled(boolean enabled)
      +
      +
    • +
    • +
      +

      getLabel

      +
      @Nullable +public @Nullable Text getLabel()
      +
      +
    • +
    • +
      +

      setLabel

      +
      public WButton setLabel(Text label)
      +
      +
    • +
    • +
      +

      getAlignment

      +
      public HorizontalAlignment getAlignment()
      +
      +
    • +
    • +
      +

      setAlignment

      +
      public WButton setAlignment(HorizontalAlignment alignment)
      +
      +
    • +
    • +
      +

      getIconSize

      +
      public int getIconSize()
      +
      Gets the current height / width of the icon.
      +
      +
      Returns:
      +
      the current height / width of the icon
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    • +
      +

      setIconSize

      +
      public WButton setIconSize(int iconSize)
      +
      Sets the new size of the icon.
      +
      +
      Parameters:
      +
      iconSize - the new height and width of the icon
      +
      Returns:
      +
      this button
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    • +
      +

      getIcon

      +
      @Nullable +public @Nullable Icon getIcon()
      +
      Gets the icon of this button.
      +
      +
      Returns:
      +
      the icon
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      setIcon

      +
      public WButton setIcon(@Nullable + @Nullable Icon icon)
      +
      Sets the icon of this button.
      +
      +
      Parameters:
      +
      icon - the new icon
      +
      Returns:
      +
      this button
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WCardPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WCardPanel.html index e1342e6..d9b726e 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WCardPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WCardPanel.html @@ -1,437 +1,438 @@ - - - - -WCardPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WCardPanel

-
- -
-
-
public class WCardPanel -extends WPanel
-
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
-
-
Since:
-
3.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WCardPanel

      -
      public WCardPanel()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public void add(WWidget card)
      -
      Adds a card to this panel without resizing it.
      -
      -
      Parameters:
      -
      card - the added card
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(int index, - WWidget card)
      -
      Adds a card to this panel without resizing it.
      -
      -
      Parameters:
      -
      index - the index of the card
      -
      card - the added card
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget card, - int width, - int height)
      -
      Adds a card to this panel and resizes it.
      -
      -
      Parameters:
      -
      card - the added card
      -
      width - the new width
      -
      height - the new height
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(int index, - WWidget card, - int width, - int height)
      -
      Adds a card to this panel and resizes it.
      -
      -
      Parameters:
      -
      index - the index of the card
      -
      card - the added card
      -
      width - the new width
      -
      height - the new height
      -
      -
      -
    • -
    • -
      -

      getSelectedIndex

      -
      public int getSelectedIndex()
      -
      Gets the index of the selected card in this panel.
      -
      -
      Returns:
      -
      the selected card's index
      -
      -
      -
    • -
    • -
      -

      setSelectedIndex

      -
      public WCardPanel setSelectedIndex(int selectedIndex)
      -
      Sets the selected index of this panel.
      -
      -
      Parameters:
      -
      selectedIndex - the new selected index
      -
      Returns:
      -
      this panel
      -
      Throws:
      -
      IndexOutOfBoundsException - if this panel does not contain the card index
      -
      -
      -
    • -
    • -
      -

      getSelectedCard

      -
      public WWidget getSelectedCard()
      -
      Gets the selected card of this panel.
      -
      -
      Returns:
      -
      the selected card
      -
      -
      -
    • -
    • -
      -

      setSelectedCard

      -
      public WCardPanel setSelectedCard(WWidget selectedCard)
      -
      Sets the selected card of this panel.
      -
      -
      Parameters:
      -
      selectedCard - the new selected card
      -
      Returns:
      -
      this panel
      -
      Throws:
      -
      NoSuchElementException - if this panel does not contain the card
      -
      -
      -
    • -
    • -
      -

      getCardCount

      -
      public int getCardCount()
      -
      Gets the number of cards in this panel.
      -
      -
      Returns:
      -
      the card count
      -
      Since:
      -
      3.1.0
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      layout

      -
      public void layout()
      -
      Description copied from class: WPanel
      -
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      -
      -
      Overrides:
      -
      layout in class WPanel
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription c)
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized. - -

      Subclasses should call super.validate(c) to ensure that children are validated.

      -
      -
      Overrides:
      -
      validate in class WPanel
      -
      Parameters:
      -
      c - the host GUI description
      -
      Throws:
      -
      IllegalStateException - if this panel has no cards
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Description copied from class: WPanel
      -
      Adds the default background painters to this widget and all children. - -

      Always called before GuiDescription.addPainters() to allow users to modify painters. - -

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      -
      -
      Overrides:
      -
      addPainters in class WPanel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WCardPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WCardPanel

+
+ +
+
+
public class WCardPanel +extends WPanel
+
Similar to the CardLayout in AWT, this panel displays one widget at a time from a list of widgets.
+
+
Since:
+
3.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WCardPanel

      +
      public WCardPanel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(WWidget card)
      +
      Adds a card to this panel without resizing it.
      +
      +
      Parameters:
      +
      card - the added card
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(int index, + WWidget card)
      +
      Adds a card to this panel without resizing it.
      +
      +
      Parameters:
      +
      index - the index of the card
      +
      card - the added card
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget card, + int width, + int height)
      +
      Adds a card to this panel and resizes it.
      +
      +
      Parameters:
      +
      card - the added card
      +
      width - the new width
      +
      height - the new height
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(int index, + WWidget card, + int width, + int height)
      +
      Adds a card to this panel and resizes it.
      +
      +
      Parameters:
      +
      index - the index of the card
      +
      card - the added card
      +
      width - the new width
      +
      height - the new height
      +
      +
      +
    • +
    • +
      +

      getSelectedIndex

      +
      public int getSelectedIndex()
      +
      Gets the index of the selected card in this panel.
      +
      +
      Returns:
      +
      the selected card's index
      +
      +
      +
    • +
    • +
      +

      setSelectedIndex

      +
      public WCardPanel setSelectedIndex(int selectedIndex)
      +
      Sets the selected index of this panel.
      +
      +
      Parameters:
      +
      selectedIndex - the new selected index
      +
      Returns:
      +
      this panel
      +
      Throws:
      +
      IndexOutOfBoundsException - if this panel does not contain the card index
      +
      +
      +
    • +
    • +
      +

      getSelectedCard

      +
      public WWidget getSelectedCard()
      +
      Gets the selected card of this panel.
      +
      +
      Returns:
      +
      the selected card
      +
      +
      +
    • +
    • +
      +

      setSelectedCard

      +
      public WCardPanel setSelectedCard(WWidget selectedCard)
      +
      Sets the selected card of this panel.
      +
      +
      Parameters:
      +
      selectedCard - the new selected card
      +
      Returns:
      +
      this panel
      +
      Throws:
      +
      NoSuchElementException - if this panel does not contain the card
      +
      +
      +
    • +
    • +
      +

      getCardCount

      +
      public int getCardCount()
      +
      Gets the number of cards in this panel.
      +
      +
      Returns:
      +
      the card count
      +
      Since:
      +
      3.1.0
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      layout

      +
      public void layout()
      +
      Description copied from class: WPanel
      +
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      +
      +
      Overrides:
      +
      layout in class WPanel
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription c)
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized. + +

      Subclasses should call super.validate(c) to ensure that children are validated.

      +
      +
      Overrides:
      +
      validate in class WPanel
      +
      Parameters:
      +
      c - the host GUI description
      +
      Throws:
      +
      IllegalStateException - if this panel has no cards
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Description copied from class: WPanel
      +
      Adds the default background painters to this widget and all children. + +

      Always called before GuiDescription.addPainters() to allow users to modify painters. + +

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      +
      +
      Overrides:
      +
      addPainters in class WPanel
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WClippedPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WClippedPanel.html index 83a37c6..4a763a0 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WClippedPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WClippedPanel.html @@ -1,207 +1,208 @@ - - - - -WClippedPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WClippedPanel

-
- -
-
-
Direct Known Subclasses:
-
WListPanel, WScrollPanel
-
-
-
public class WClippedPanel -extends WPanel
-
A panel that is clipped to only render widgets inside its bounds.
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WClippedPanel

      -
      public WClippedPanel()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WPanel
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WClippedPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WClippedPanel

+
+ +
+
+
Direct Known Subclasses:
+
WListPanel, WScrollPanel
+
+
+
public class WClippedPanel +extends WPanel
+
A panel that is clipped to only render widgets inside its bounds.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WClippedPanel

      +
      public WClippedPanel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WPanel
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.html index f8f453a..88eec84 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WDynamicLabel.html @@ -1,384 +1,385 @@ - - - - -WDynamicLabel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WDynamicLabel

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-
-
-
-
-
public class WDynamicLabel -extends WWidget
-
Dynamic labels are labels that pull their text from a Supplier<String>. - They can be used for automatically getting data from a block entity or another data source. - -

Translating strings in dynamic labels should be done using - I18n.translate(String, Object...).

-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      text

      -
      protected Supplier<String> text
      -
      -
    • -
    • -
      -

      alignment

      -
      protected HorizontalAlignment alignment
      -
      -
    • -
    • -
      -

      color

      -
      protected int color
      -
      -
    • -
    • -
      -

      darkmodeColor

      -
      protected int darkmodeColor
      -
      -
    • -
    • -
      -

      DEFAULT_TEXT_COLOR

      -
      public static final int DEFAULT_TEXT_COLOR
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      DEFAULT_DARKMODE_TEXT_COLOR

      -
      public static final int DEFAULT_DARKMODE_TEXT_COLOR
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WDynamicLabel

      -
      public WDynamicLabel(Supplier<String> text, - int color)
      -
      -
    • -
    • -
      -

      WDynamicLabel

      -
      public WDynamicLabel(Supplier<String> text)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      setDarkmodeColor

      -
      public WDynamicLabel setDarkmodeColor(int color)
      -
      -
    • -
    • -
      -

      disableDarkmode

      -
      public WDynamicLabel disableDarkmode()
      -
      -
    • -
    • -
      -

      setColor

      -
      public WDynamicLabel setColor(int color, - int darkmodeColor)
      -
      -
    • -
    • -
      -

      setText

      -
      public WDynamicLabel setText(Supplier<String> text)
      -
      -
    • -
    • -
      -

      setAlignment

      -
      public WDynamicLabel setAlignment(HorizontalAlignment align)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WDynamicLabel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WDynamicLabel

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WDynamicLabel
+
+
+
+
+
public class WDynamicLabel +extends WWidget
+
Dynamic labels are labels that pull their text from a Supplier<String>. + They can be used for automatically getting data from a block entity or another data source. + +

Translating strings in dynamic labels should be done using + I18n.translate(String, Object...).

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      text

      +
      protected Supplier<String> text
      +
      +
    • +
    • +
      +

      alignment

      +
      protected HorizontalAlignment alignment
      +
      +
    • +
    • +
      +

      color

      +
      protected int color
      +
      +
    • +
    • +
      +

      darkmodeColor

      +
      protected int darkmodeColor
      +
      +
    • +
    • +
      +

      DEFAULT_TEXT_COLOR

      +
      public static final int DEFAULT_TEXT_COLOR
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_DARKMODE_TEXT_COLOR

      +
      public static final int DEFAULT_DARKMODE_TEXT_COLOR
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WDynamicLabel

      +
      public WDynamicLabel(Supplier<String> text, + int color)
      +
      +
    • +
    • +
      +

      WDynamicLabel

      +
      public WDynamicLabel(Supplier<String> text)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      setDarkmodeColor

      +
      public WDynamicLabel setDarkmodeColor(int color)
      +
      +
    • +
    • +
      +

      disableDarkmode

      +
      public WDynamicLabel disableDarkmode()
      +
      +
    • +
    • +
      +

      setColor

      +
      public WDynamicLabel setColor(int color, + int darkmodeColor)
      +
      +
    • +
    • +
      +

      setText

      +
      public WDynamicLabel setText(Supplier<String> text)
      +
      +
    • +
    • +
      +

      setAlignment

      +
      public WDynamicLabel setAlignment(HorizontalAlignment align)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WGridPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WGridPanel.html index 387a825..cc5ead5 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WGridPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WGridPanel.html @@ -1,358 +1,359 @@ - - - - -WGridPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WGridPanel

-
- -
-
-
public class WGridPanel -extends WPanelWithInsets
-
A panel that positions children in a grid.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      grid

      -
      protected int grid
      -
      The grid size in pixels. - Defaults to 18, which is the size of one item slot.
      -
      -
    • -
    • -
      -

      horizontalGap

      -
      protected int horizontalGap
      -
      The horizontal gap between two grid cells.
      -
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    • -
      -

      verticalGap

      -
      protected int verticalGap
      -
      The vertical gap between two grid cells.
      -
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WGridPanel

      -
      public WGridPanel()
      -
      Constructs a grid panel with the default grid size.
      -
      -
    • -
    • -
      -

      WGridPanel

      -
      public WGridPanel(int gridSize)
      -
      Constructs a grid panel with a custom grid size.
      -
      -
      Parameters:
      -
      gridSize - the grid size in pixels
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setGaps

      -
      public WGridPanel setGaps(int horizontalGap, - int verticalGap)
      -
      Set the gaps between grid cells. - -

      This method can only be called before any elements get added to this layout.

      -
      -
      Parameters:
      -
      horizontalGap - the horizontal gap between grid cells
      -
      verticalGap - the vertical gap between grid cells
      -
      Since:
      -
      6.4.0
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget w, - int x, - int y)
      -
      Adds a widget to this panel. - -

      If the widget can be resized, - it will be resized to (grid, grid).

      -
      -
      Parameters:
      -
      w - the widget
      -
      x - the X position in grid cells
      -
      y - the Y position in grid cells
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget w, - int x, - int y, - int width, - int height)
      -
      Adds a widget to this panel and resizes it to a custom size.
      -
      -
      Parameters:
      -
      w - the widget
      -
      x - the X position in grid cells
      -
      y - the Y position in grid cells
      -
      width - the new width in grid cells
      -
      height - the new height in grid cells
      -
      -
      -
    • -
    • -
      -

      setInsets

      -
      public WGridPanel setInsets(Insets insets)
      -
      Description copied from class: WPanelWithInsets
      -
      Sets the layout insets of this panel. - Subclasses are encouraged to override this method to return their more specific type - (such as WGridPanel). - -

      If there are already widgets in this panel when the insets are modified, - the panel is resized and the widgets are moved according to the insets.

      -
      -
      Overrides:
      -
      setInsets in class WPanelWithInsets
      -
      Parameters:
      -
      insets - the insets, should not be null
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WGridPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WGridPanel

+
+ +
+
+
public class WGridPanel +extends WPanelWithInsets
+
A panel that positions children in a grid.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      grid

      +
      protected int grid
      +
      The grid size in pixels. + Defaults to 18, which is the size of one item slot.
      +
      +
    • +
    • +
      +

      horizontalGap

      +
      protected int horizontalGap
      +
      The horizontal gap between two grid cells.
      +
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    • +
      +

      verticalGap

      +
      protected int verticalGap
      +
      The vertical gap between two grid cells.
      +
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WGridPanel

      +
      public WGridPanel()
      +
      Constructs a grid panel with the default grid size.
      +
      +
    • +
    • +
      +

      WGridPanel

      +
      public WGridPanel(int gridSize)
      +
      Constructs a grid panel with a custom grid size.
      +
      +
      Parameters:
      +
      gridSize - the grid size in pixels
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setGaps

      +
      public WGridPanel setGaps(int horizontalGap, + int verticalGap)
      +
      Set the gaps between grid cells. + +

      This method can only be called before any elements get added to this layout.

      +
      +
      Parameters:
      +
      horizontalGap - the horizontal gap between grid cells
      +
      verticalGap - the vertical gap between grid cells
      +
      Since:
      +
      6.4.0
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget w, + int x, + int y)
      +
      Adds a widget to this panel. + +

      If the widget can be resized, + it will be resized to (grid, grid).

      +
      +
      Parameters:
      +
      w - the widget
      +
      x - the X position in grid cells
      +
      y - the Y position in grid cells
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget w, + int x, + int y, + int width, + int height)
      +
      Adds a widget to this panel and resizes it to a custom size.
      +
      +
      Parameters:
      +
      w - the widget
      +
      x - the X position in grid cells
      +
      y - the Y position in grid cells
      +
      width - the new width in grid cells
      +
      height - the new height in grid cells
      +
      +
      +
    • +
    • +
      +

      setInsets

      +
      public WGridPanel setInsets(Insets insets)
      +
      Description copied from class: WPanelWithInsets
      +
      Sets the layout insets of this panel. + Subclasses are encouraged to override this method to return their more specific type + (such as WGridPanel). + +

      If there are already widgets in this panel when the insets are modified, + the panel is resized and the widgets are moved according to the insets.

      +
      +
      Overrides:
      +
      setInsets in class WPanelWithInsets
      +
      Parameters:
      +
      insets - the insets, should not be null
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WItem.html b/libgui/io/github/cottonmc/cotton/gui/widget/WItem.html index 0da54da..0ebfd17 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WItem.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WItem.html @@ -1,302 +1,303 @@ - - - - -WItem (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WItem

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WItem
-
-
-
-
-
public class WItem -extends WWidget
-
A widget that displays an item or a list of items.
-
-
Since:
-
1.8.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      tick

      -
      @Environment(CLIENT) -public void tick()
      -
      Description copied from class: WWidget
      -
      Executes a client-side tick for this widget.
      -
      -
      Overrides:
      -
      tick in class WWidget
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      getDuration

      -
      public int getDuration()
      -
      Returns the animation duration of this WItem. - -

      Defaults to 25 screen ticks.

      -
      -
    • -
    • -
      -

      setDuration

      -
      public WItem setDuration(int duration)
      -
      -
    • -
    • -
      -

      getItems

      -
      public List<ItemStack> getItems()
      -
      -
    • -
    • -
      -

      setItems

      -
      public WItem setItems(List<ItemStack> items)
      -
      Sets the item list of this WItem and resets the animation state.
      -
      -
      Parameters:
      -
      items - the new item list
      -
      Returns:
      -
      this instance
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WItem (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WItem

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WItem
+
+
+
+
+
public class WItem +extends WWidget
+
A widget that displays an item or a list of items.
+
+
Since:
+
1.8.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      tick

      +
      @Environment(CLIENT) +public void tick()
      +
      Description copied from class: WWidget
      +
      Executes a client-side tick for this widget.
      +
      +
      Overrides:
      +
      tick in class WWidget
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      getDuration

      +
      public int getDuration()
      +
      Returns the animation duration of this WItem. + +

      Defaults to 25 screen ticks.

      +
      +
    • +
    • +
      +

      setDuration

      +
      public WItem setDuration(int duration)
      +
      +
    • +
    • +
      +

      getItems

      +
      public List<ItemStack> getItems()
      +
      +
    • +
    • +
      +

      setItems

      +
      public WItem setItems(List<ItemStack> items)
      +
      Sets the item list of this WItem and resets the animation state.
      +
      +
      Parameters:
      +
      items - the new item list
      +
      Returns:
      +
      this instance
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.ChangeListener.html b/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.ChangeListener.html index 5841e3f..c358f4b 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.ChangeListener.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.ChangeListener.html @@ -1,153 +1,154 @@ - - - - -WItemSlot.ChangeListener (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface WItemSlot.ChangeListener

-
-
-
-
Enclosing class:
-
WItemSlot
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public static interface WItemSlot.ChangeListener
-
A listener for changes in an item slot.
-
-
Since:
-
3.0.0
-
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    -
    onStackChanged(WItemSlot slot, - Inventory inventory, - int index, - ItemStack stack)
    -
    -
    Handles a changed item stack in an item slot.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      onStackChanged

      -
      void onStackChanged(WItemSlot slot, - Inventory inventory, - int index, - ItemStack stack)
      -
      Handles a changed item stack in an item slot.
      -
      -
      Parameters:
      -
      slot - the item slot widget
      -
      inventory - the item inventory of the slot
      -
      index - the index of the slot in the inventory
      -
      stack - the changed item stack
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WItemSlot.ChangeListener (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WItemSlot.ChangeListener

+
+
+
+
Enclosing class:
+
WItemSlot
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface WItemSlot.ChangeListener
+
A listener for changes in an item slot.
+
+
Since:
+
3.0.0
+
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onStackChanged(WItemSlot slot, + Inventory inventory, + int index, + ItemStack stack)
    +
    +
    Handles a changed item stack in an item slot.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onStackChanged

      +
      void onStackChanged(WItemSlot slot, + Inventory inventory, + int index, + ItemStack stack)
      +
      Handles a changed item stack in an item slot.
      +
      +
      Parameters:
      +
      slot - the item slot widget
      +
      inventory - the item inventory of the slot
      +
      index - the index of the slot in the inventory
      +
      stack - the changed item stack
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.html b/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.html index d57bb28..282b662 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WItemSlot.html @@ -1,905 +1,997 @@ - - - - -WItemSlot (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WItemSlot

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WItemSlot
-
-
-
-
-
public class WItemSlot -extends WWidget
-
A widget that displays an item that can be interacted with. - -

Item slot widgets can contain multiple visual slots themselves. - For example, a slot widget might be 5x3 with 15 visual slots in total. - -

Item slots are handled with so-called peers in the background. - They are instances of ValidatedSlot that handle the interactions - between the player and the widget. - -

Filters

- Item slots can have filters that check whether a player is allowed to insert an item or not. - The filter can be set with setFilter(Predicate). For example: - -
- 
- // Only sand in this slot!
- slot.setFilter(stack -> stack.getItem() == Items.SAND);
- 
- 
- -

Listeners

- Slot change listeners are instances of WItemSlot.ChangeListener that can handle changes - to item stacks in slots. For example: - -
- 
- slot.addChangeListener((slot, inventory, index, stack) -> {
-     if (stack.isEmpty() || stack.getCount() < stack.getMaxCount()) {
-         System.out.println("I'm not full yet!");
-     }
- });
- 
- 
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    - -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WItemSlot

      -
      public WItemSlot(Inventory inventory, - int startIndex, - int slotsWide, - int slotsHigh, - boolean big)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      of

      -
      public static WItemSlot of(Inventory inventory, - int index)
      -
      -
    • -
    • -
      -

      of

      -
      public static WItemSlot of(Inventory inventory, - int startIndex, - int slotsWide, - int slotsHigh)
      -
      -
    • -
    • -
      -

      outputOf

      -
      public static WItemSlot outputOf(Inventory inventory, - int index)
      -
      -
    • -
    • -
      -

      ofPlayerStorage

      -
      public static WItemSlot ofPlayerStorage(Inventory inventory)
      -
      Creates a 9x3 slot widget from the "main" part of a player inventory.
      -
      -
      Parameters:
      -
      inventory - the player inventory
      -
      Returns:
      -
      the created slot widget
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      getWidth

      -
      public int getWidth()
      -
      -
      Overrides:
      -
      getWidth in class WWidget
      -
      -
      -
    • -
    • -
      -

      getHeight

      -
      public int getHeight()
      -
      -
      Overrides:
      -
      getHeight in class WWidget
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      isBigSlot

      -
      public boolean isBigSlot()
      -
      -
    • -
    • -
      -

      getIcon

      -
      @Nullable -public @Nullable Icon getIcon()
      -
      Returns the icon if set, otherwise null.
      -
      -
      Returns:
      -
      the icon if set, otherwise null
      -
      Since:
      -
      4.1.0
      -
      -
      -
    • -
    • -
      -

      setIcon

      -
      public WItemSlot setIcon(@Nullable - @Nullable Icon icon)
      -
      Sets the icon to this slot. Can be used for labeling slots for certain activities.
      -
      -
      Parameters:
      -
      icon - the icon
      -
      Returns:
      -
      this slot widget
      -
      Since:
      -
      4.1.0
      -
      -
      -
    • -
    • -
      -

      isModifiable

      -
      public boolean isModifiable()
      -
      Returns true if the contents of this WItemSlot can be modified by players.
      -
      -
      Returns:
      -
      true if items can be inserted into or taken from this slot widget, false otherwise
      -
      Since:
      -
      1.8.0
      -
      -
      -
    • -
    • -
      -

      setModifiable

      -
      public WItemSlot setModifiable(boolean modifiable)
      -
      -
    • -
    • -
      -

      isInsertingAllowed

      -
      public boolean isInsertingAllowed()
      -
      Returns whether items can be inserted into this slot.
      -
      -
      Returns:
      -
      true if items can be inserted, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      setInsertingAllowed

      -
      public WItemSlot setInsertingAllowed(boolean insertingAllowed)
      -
      Sets whether inserting items into this slot is allowed.
      -
      -
      Parameters:
      -
      insertingAllowed - true if items can be inserted, false otherwise
      -
      Returns:
      -
      this slot widget
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      isTakingAllowed

      -
      public boolean isTakingAllowed()
      -
      Returns whether items can be taken from this slot.
      -
      -
      Returns:
      -
      true if items can be taken, false otherwise
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      setTakingAllowed

      -
      public WItemSlot setTakingAllowed(boolean takingAllowed)
      -
      Sets whether taking items from this slot is allowed.
      -
      -
      Parameters:
      -
      takingAllowed - true if items can be taken, false otherwise
      -
      Returns:
      -
      this slot widget
      -
      Since:
      -
      1.10.0
      -
      -
      -
    • -
    • -
      -

      getFocusedSlot

      -
      public int getFocusedSlot()
      -
      Gets the currently focused slot index.
      -
      -
      Returns:
      -
      the currently focused slot, or -1 if this widget isn't focused
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription host)
      -
      Description copied from class: WWidget
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized.

      -
      -
      Overrides:
      -
      validate in class WWidget
      -
      Parameters:
      -
      host - the host GUI description
      -
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      @Environment(CLIENT) -public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      createSlotPeer

      -
      protected ValidatedSlot createSlotPeer(Inventory inventory, - int index, - int x, - int y)
      -
      Creates a slot peer for this slot widget.
      -
      -
      Parameters:
      -
      inventory - the slot inventory
      -
      index - the index in the inventory
      -
      x - the X coordinate
      -
      y - the Y coordinate
      -
      Returns:
      -
      the created slot instance
      -
      Since:
      -
      1.11.0
      -
      -
      -
    • -
    • -
      -

      getBackgroundPainter

      -
      @Nullable -@Environment(CLIENT) -public @Nullable BackgroundPainter getBackgroundPainter()
      -
      Gets this slot widget's background painter.
      -
      -
      Returns:
      -
      the background painter
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setBackgroundPainter

      -
      @Environment(CLIENT) -public void setBackgroundPainter(@Nullable - @Nullable BackgroundPainter painter)
      -
      Sets this item slot's background painter.
      -
      -
      Parameters:
      -
      painter - the new painter
      -
      -
      -
    • -
    • -
      -

      getFilter

      -
      public Predicate<ItemStack> getFilter()
      -
      Gets the item filter of this item slot.
      -
      -
      Returns:
      -
      the item filter
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setFilter

      -
      public WItemSlot setFilter(Predicate<ItemStack> filter)
      -
      Sets the item filter of this item slot.
      -
      -
      Parameters:
      -
      filter - the new item filter
      -
      Returns:
      -
      this item slot
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      getFocusModel

      -
      @Nullable -public @Nullable FocusModel<?> getFocusModel()
      -
      Description copied from class: WWidget
      -
      Returns the focus model of this widget. The focus - model provides the focusable areas of this widget, - and handles switching through them. - -

      If this widget can focus, it should return - a nonnull focus model. The default implementation returns - FocusModel.simple(this) when the widget can be focused.

      -
      -
      Overrides:
      -
      getFocusModel in class WWidget
      -
      Returns:
      -
      the focus model, or null if not available
      -
      -
      -
    • -
    • -
      -

      onFocusLost

      -
      public void onFocusLost()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it has lost focus
      -
      -
      Overrides:
      -
      onFocusLost in class WWidget
      -
      -
      -
    • -
    • -
      -

      addChangeListener

      -
      public void addChangeListener(WItemSlot.ChangeListener listener)
      -
      Adds a change listener to this slot. - Does nothing if the listener is already registered.
      -
      -
      Parameters:
      -
      listener - the added listener
      -
      Throws:
      -
      NullPointerException - if the listener is null
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      onShown

      -
      public void onShown()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it is visible and - shows any hidden peers of itself and its children.
      -
      -
      Overrides:
      -
      onShown in class WWidget
      -
      -
      -
    • -
    • -
      -

      onMouseMove

      -
      public InputResult onMouseMove(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been moved while inside its bounds.
      -
      -
      Overrides:
      -
      onMouseMove in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onHidden

      -
      public void onHidden()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it won't be drawn and - hides any visible peers of itself and its children. - -

      The default implementation releases this widget's - focus if it is focused. Overriding implementations - might want to do this as well.

      -
      -
      Overrides:
      -
      onHidden in class WWidget
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Description copied from class: WWidget
      -
      Adds the default background painters to this widget and all children. - -

      Always called before GuiDescription.addPainters() to allow users to modify painters.

      -
      -
      Overrides:
      -
      addPainters in class WWidget
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    • -
      -

      getNarrationName

      -
      @Nullable -protected @Nullable Text getNarrationName()
      -
      Returns a "narration name" for this slot. - It's narrated before the slot index. One example of a narration name would be "hotbar" for the player's hotbar.
      -
      -
      Returns:
      -
      the narration name, or null if there's none for this slot
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WItemSlot (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WItemSlot

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WItemSlot
+
+
+
+
+
public class WItemSlot +extends WWidget
+
A widget that displays an item that can be interacted with. + +

Item slot widgets can contain multiple visual slots themselves. + For example, a slot widget might be 5x3 with 15 visual slots in total. + +

Item slots are handled with so-called peers in the background. + They are instances of ValidatedSlot that handle the interactions + between the player and the widget. + +

Filters

+ Item slots can have filters that check whether a player is allowed to insert or take out an item or not. + The filters can be set with setInputFilter(Predicate) and setOutputFilter(Predicate). For example: + +
+ 
+ // Only sand can be placed on this slot
+ slot.setInputFilter(stack -> stack.isOf(Items.SAND));
+
+ // Everything except glass can be taken out of this slot
+ slot.setOutputFilter(stack -> !stack.isOf(Items.GLASS));
+ 
+ 
+ +

Listeners

+ Slot change listeners are instances of WItemSlot.ChangeListener that can handle changes + to item stacks in slots. For example: + +
+ 
+ slot.addChangeListener((slot, inventory, index, stack) -> {
+     if (stack.isEmpty() || stack.getCount() < stack.getMaxCount()) {
+         System.out.println("I'm not full yet!");
+     }
+ });
+ 
+ 
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WItemSlot

      +
      public WItemSlot(Inventory inventory, + int startIndex, + int slotsWide, + int slotsHigh, + boolean big)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static WItemSlot of(Inventory inventory, + int index)
      +
      +
    • +
    • +
      +

      of

      +
      public static WItemSlot of(Inventory inventory, + int startIndex, + int slotsWide, + int slotsHigh)
      +
      +
    • +
    • +
      +

      outputOf

      +
      public static WItemSlot outputOf(Inventory inventory, + int index)
      +
      +
    • +
    • +
      +

      ofPlayerStorage

      +
      public static WItemSlot ofPlayerStorage(Inventory inventory)
      +
      Creates a 9x3 slot widget from the "main" part of a player inventory.
      +
      +
      Parameters:
      +
      inventory - the player inventory
      +
      Returns:
      +
      the created slot widget
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getWidth

      +
      public int getWidth()
      +
      +
      Overrides:
      +
      getWidth in class WWidget
      +
      +
      +
    • +
    • +
      +

      getHeight

      +
      public int getHeight()
      +
      +
      Overrides:
      +
      getHeight in class WWidget
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      isBigSlot

      +
      public boolean isBigSlot()
      +
      +
    • +
    • +
      +

      getIcon

      +
      @Nullable +public @Nullable Icon getIcon()
      +
      Returns the icon if set, otherwise null.
      +
      +
      Returns:
      +
      the icon if set, otherwise null
      +
      Since:
      +
      4.1.0
      +
      +
      +
    • +
    • +
      +

      setIcon

      +
      public WItemSlot setIcon(@Nullable + @Nullable Icon icon)
      +
      Sets the icon to this slot. Can be used for labeling slots for certain activities.
      +
      +
      Parameters:
      +
      icon - the icon
      +
      Returns:
      +
      this slot widget
      +
      Since:
      +
      4.1.0
      +
      +
      +
    • +
    • +
      +

      isModifiable

      +
      public boolean isModifiable()
      +
      Returns true if the contents of this WItemSlot can be modified by players.
      +
      +
      Returns:
      +
      true if items can be inserted into or taken from this slot widget, false otherwise
      +
      Since:
      +
      1.8.0
      +
      +
      +
    • +
    • +
      +

      setModifiable

      +
      public WItemSlot setModifiable(boolean modifiable)
      +
      +
    • +
    • +
      +

      isInsertingAllowed

      +
      public boolean isInsertingAllowed()
      +
      Returns whether items can be inserted into this slot.
      +
      +
      Returns:
      +
      true if items can be inserted, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      setInsertingAllowed

      +
      public WItemSlot setInsertingAllowed(boolean insertingAllowed)
      +
      Sets whether inserting items into this slot is allowed.
      +
      +
      Parameters:
      +
      insertingAllowed - true if items can be inserted, false otherwise
      +
      Returns:
      +
      this slot widget
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      isTakingAllowed

      +
      public boolean isTakingAllowed()
      +
      Returns whether items can be taken from this slot.
      +
      +
      Returns:
      +
      true if items can be taken, false otherwise
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      setTakingAllowed

      +
      public WItemSlot setTakingAllowed(boolean takingAllowed)
      +
      Sets whether taking items from this slot is allowed.
      +
      +
      Parameters:
      +
      takingAllowed - true if items can be taken, false otherwise
      +
      Returns:
      +
      this slot widget
      +
      Since:
      +
      1.10.0
      +
      +
      +
    • +
    • +
      +

      getFocusedSlot

      +
      public int getFocusedSlot()
      +
      Gets the currently focused slot index.
      +
      +
      Returns:
      +
      the currently focused slot, or -1 if this widget isn't focused
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription host)
      +
      Description copied from class: WWidget
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized.

      +
      +
      Overrides:
      +
      validate in class WWidget
      +
      Parameters:
      +
      host - the host GUI description
      +
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      @Environment(CLIENT) +public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      createSlotPeer

      +
      protected ValidatedSlot createSlotPeer(Inventory inventory, + int index, + int x, + int y)
      +
      Creates a slot peer for this slot widget.
      +
      +
      Parameters:
      +
      inventory - the slot inventory
      +
      index - the index in the inventory
      +
      x - the X coordinate
      +
      y - the Y coordinate
      +
      Returns:
      +
      the created slot instance
      +
      Since:
      +
      1.11.0
      +
      +
      +
    • +
    • +
      +

      getBackgroundPainter

      +
      @Nullable +@Environment(CLIENT) +public @Nullable BackgroundPainter getBackgroundPainter()
      +
      Gets this slot widget's background painter.
      +
      +
      Returns:
      +
      the background painter
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setBackgroundPainter

      +
      @Environment(CLIENT) +public void setBackgroundPainter(@Nullable + @Nullable BackgroundPainter painter)
      +
      Sets this item slot's background painter.
      +
      +
      Parameters:
      +
      painter - the new painter
      +
      +
      +
    • +
    • +
      +

      getInputFilter

      +
      public Predicate<ItemStack> getInputFilter()
      +
      Gets the item stack input filter of this slot.
      +
      +
      Returns:
      +
      the item input filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      setInputFilter

      +
      public WItemSlot setInputFilter(Predicate<ItemStack> inputFilter)
      +
      Sets the item input filter of this item slot.
      +
      +
      Parameters:
      +
      inputFilter - the new item input filter
      +
      Returns:
      +
      this item slot
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      getOutputFilter

      +
      public Predicate<ItemStack> getOutputFilter()
      +
      Gets the item stack output filter of this slot.
      +
      +
      Returns:
      +
      the item output filter
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      setOutputFilter

      +
      public WItemSlot setOutputFilter(Predicate<ItemStack> outputFilter)
      +
      Sets the item output filter of this item slot.
      +
      +
      Parameters:
      +
      outputFilter - the new item output filter
      +
      Returns:
      +
      this item slot
      +
      Since:
      +
      8.1.0
      +
      +
      +
    • +
    • +
      +

      getFilter

      +
      @Deprecated(forRemoval=true) +public Predicate<ItemStack> getFilter()
      +
      Deprecated, for removal: This API element is subject to removal in a future version. +
      Replaced by getInputFilter()
      +
      +
      Gets the item filter of this item slot.
      +
      +
      Returns:
      +
      the item filter
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setFilter

      +
      @Deprecated(forRemoval=true) +public WItemSlot setFilter(Predicate<ItemStack> filter)
      +
      Deprecated, for removal: This API element is subject to removal in a future version. + +
      +
      Sets the item filter of this item slot.
      +
      +
      Parameters:
      +
      filter - the new item filter
      +
      Returns:
      +
      this item slot
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      getFocusModel

      +
      @Nullable +public @Nullable FocusModel<?> getFocusModel()
      +
      Description copied from class: WWidget
      +
      Returns the focus model of this widget. The focus + model provides the focusable areas of this widget, + and handles switching through them. + +

      If this widget can focus, it should return + a nonnull focus model. The default implementation returns + FocusModel.simple(this) when the widget can be focused.

      +
      +
      Overrides:
      +
      getFocusModel in class WWidget
      +
      Returns:
      +
      the focus model, or null if not available
      +
      +
      +
    • +
    • +
      +

      onFocusLost

      +
      public void onFocusLost()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it has lost focus
      +
      +
      Overrides:
      +
      onFocusLost in class WWidget
      +
      +
      +
    • +
    • +
      +

      addChangeListener

      +
      public void addChangeListener(WItemSlot.ChangeListener listener)
      +
      Adds a change listener to this slot. + Does nothing if the listener is already registered.
      +
      +
      Parameters:
      +
      listener - the added listener
      +
      Throws:
      +
      NullPointerException - if the listener is null
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      onShown

      +
      public void onShown()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it is visible and + shows any hidden peers of itself and its children.
      +
      +
      Overrides:
      +
      onShown in class WWidget
      +
      +
      +
    • +
    • +
      +

      onMouseMove

      +
      public InputResult onMouseMove(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been moved while inside its bounds.
      +
      +
      Overrides:
      +
      onMouseMove in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onHidden

      +
      public void onHidden()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it won't be drawn and + hides any visible peers of itself and its children. + +

      The default implementation releases this widget's + focus if it is focused. Overriding implementations + might want to do this as well.

      +
      +
      Overrides:
      +
      onHidden in class WWidget
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Description copied from class: WWidget
      +
      Adds the default background painters to this widget and all children. + +

      Always called before GuiDescription.addPainters() to allow users to modify painters.

      +
      +
      Overrides:
      +
      addPainters in class WWidget
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    • +
      +

      getNarrationName

      +
      @Nullable +protected @Nullable Text getNarrationName()
      +
      Returns a "narration name" for this slot. + It's narrated before the slot index. One example of a narration name would be "hotbar" for the player's hotbar.
      +
      +
      Returns:
      +
      the narration name, or null if there's none for this slot
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WLabel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WLabel.html index a2108f4..24c53ea 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WLabel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WLabel.html @@ -1,653 +1,654 @@ - - - - -WLabel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WLabel

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WLabel
-
-
-
-
-
public class WLabel -extends WWidget
-
A single-line label widget.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      text

      -
      protected Text text
      -
      -
    • -
    • -
      -

      horizontalAlignment

      -
      protected HorizontalAlignment horizontalAlignment
      -
      -
    • -
    • -
      -

      verticalAlignment

      -
      protected VerticalAlignment verticalAlignment
      -
      -
    • -
    • -
      -

      color

      -
      protected int color
      -
      -
    • -
    • -
      -

      darkmodeColor

      -
      protected int darkmodeColor
      -
      -
    • -
    • -
      -

      DEFAULT_TEXT_COLOR

      -
      public static final int DEFAULT_TEXT_COLOR
      -
      The default text color for light mode labels.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      DEFAULT_DARKMODE_TEXT_COLOR

      -
      public static final int DEFAULT_DARKMODE_TEXT_COLOR
      -
      The default text color for dark mode labels.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WLabel

      -
      public WLabel(Text text, - int color)
      -
      Constructs a new label.
      -
      -
      Parameters:
      -
      text - the text of the label
      -
      color - the color of the label
      -
      -
      -
    • -
    • -
      -

      WLabel

      -
      public WLabel(Text text)
      -
      Constructs a new label with the default text color.
      -
      -
      Parameters:
      -
      text - the text of the label
      -
      Since:
      -
      1.8.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getTextStyleAt

      -
      @Environment(CLIENT) -@Nullable -public @Nullable Style getTextStyleAt(int x, - int y)
      -
      Gets the text style at the specific widget-space coordinates.
      -
      -
      Parameters:
      -
      x - the X coordinate in widget space
      -
      y - the Y coordinate in widget space
      -
      Returns:
      -
      the text style at the position, or null if not found
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      getDarkmodeColor

      -
      public int getDarkmodeColor()
      -
      Gets the dark mode color of this label.
      -
      -
      Returns:
      -
      the color
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setDarkmodeColor

      -
      public WLabel setDarkmodeColor(int color)
      -
      Sets the dark mode color of this label.
      -
      -
      Parameters:
      -
      color - the new color
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      disableDarkmode

      -
      public WLabel disableDarkmode()
      -
      Disables separate dark mode coloring by copying the dark color to be the light color.
      -
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      getColor

      -
      public int getColor()
      -
      Gets the light mode color of this label.
      -
      -
      Returns:
      -
      the color
      -
      -
      -
    • -
    • -
      -

      setColor

      -
      public WLabel setColor(int color)
      -
      Sets the light mode color of this label.
      -
      -
      Parameters:
      -
      color - the new color
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      setColor

      -
      public WLabel setColor(int color, - int darkmodeColor)
      -
      Sets the light and dark mode colors of this label.
      -
      -
      Parameters:
      -
      color - the new light color
      -
      darkmodeColor - the new dark color
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      getText

      -
      public Text getText()
      -
      Gets the text of this label.
      -
      -
      Returns:
      -
      the text
      -
      -
      -
    • -
    • -
      -

      setText

      -
      public WLabel setText(Text text)
      -
      Sets the text of this label.
      -
      -
      Parameters:
      -
      text - the new text
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      getHorizontalAlignment

      -
      public HorizontalAlignment getHorizontalAlignment()
      -
      Gets the horizontal text alignment of this label.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setHorizontalAlignment

      -
      public WLabel setHorizontalAlignment(HorizontalAlignment align)
      -
      Sets the horizontal text alignment of this label.
      -
      -
      Parameters:
      -
      align - the new text alignment
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      getVerticalAlignment

      -
      public VerticalAlignment getVerticalAlignment()
      -
      Gets the vertical text alignment of this label.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setVerticalAlignment

      -
      public WLabel setVerticalAlignment(VerticalAlignment align)
      -
      Sets the vertical text alignment of this label.
      -
      -
      Parameters:
      -
      align - the new text alignment
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WLabel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WLabel

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WLabel
+
+
+
+
+
public class WLabel +extends WWidget
+
A single-line label widget.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      text

      +
      protected Text text
      +
      +
    • +
    • +
      +

      horizontalAlignment

      +
      protected HorizontalAlignment horizontalAlignment
      +
      +
    • +
    • +
      +

      verticalAlignment

      +
      protected VerticalAlignment verticalAlignment
      +
      +
    • +
    • +
      +

      color

      +
      protected int color
      +
      +
    • +
    • +
      +

      darkmodeColor

      +
      protected int darkmodeColor
      +
      +
    • +
    • +
      +

      DEFAULT_TEXT_COLOR

      +
      public static final int DEFAULT_TEXT_COLOR
      +
      The default text color for light mode labels.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_DARKMODE_TEXT_COLOR

      +
      public static final int DEFAULT_DARKMODE_TEXT_COLOR
      +
      The default text color for dark mode labels.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WLabel

      +
      public WLabel(Text text, + int color)
      +
      Constructs a new label.
      +
      +
      Parameters:
      +
      text - the text of the label
      +
      color - the color of the label
      +
      +
      +
    • +
    • +
      +

      WLabel

      +
      public WLabel(Text text)
      +
      Constructs a new label with the default text color.
      +
      +
      Parameters:
      +
      text - the text of the label
      +
      Since:
      +
      1.8.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getTextStyleAt

      +
      @Environment(CLIENT) +@Nullable +public @Nullable Style getTextStyleAt(int x, + int y)
      +
      Gets the text style at the specific widget-space coordinates.
      +
      +
      Parameters:
      +
      x - the X coordinate in widget space
      +
      y - the Y coordinate in widget space
      +
      Returns:
      +
      the text style at the position, or null if not found
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      getDarkmodeColor

      +
      public int getDarkmodeColor()
      +
      Gets the dark mode color of this label.
      +
      +
      Returns:
      +
      the color
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setDarkmodeColor

      +
      public WLabel setDarkmodeColor(int color)
      +
      Sets the dark mode color of this label.
      +
      +
      Parameters:
      +
      color - the new color
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      disableDarkmode

      +
      public WLabel disableDarkmode()
      +
      Disables separate dark mode coloring by copying the dark color to be the light color.
      +
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      getColor

      +
      public int getColor()
      +
      Gets the light mode color of this label.
      +
      +
      Returns:
      +
      the color
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public WLabel setColor(int color)
      +
      Sets the light mode color of this label.
      +
      +
      Parameters:
      +
      color - the new color
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public WLabel setColor(int color, + int darkmodeColor)
      +
      Sets the light and dark mode colors of this label.
      +
      +
      Parameters:
      +
      color - the new light color
      +
      darkmodeColor - the new dark color
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      getText

      +
      public Text getText()
      +
      Gets the text of this label.
      +
      +
      Returns:
      +
      the text
      +
      +
      +
    • +
    • +
      +

      setText

      +
      public WLabel setText(Text text)
      +
      Sets the text of this label.
      +
      +
      Parameters:
      +
      text - the new text
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      getHorizontalAlignment

      +
      public HorizontalAlignment getHorizontalAlignment()
      +
      Gets the horizontal text alignment of this label.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setHorizontalAlignment

      +
      public WLabel setHorizontalAlignment(HorizontalAlignment align)
      +
      Sets the horizontal text alignment of this label.
      +
      +
      Parameters:
      +
      align - the new text alignment
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      getVerticalAlignment

      +
      public VerticalAlignment getVerticalAlignment()
      +
      Gets the vertical text alignment of this label.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setVerticalAlignment

      +
      public WLabel setVerticalAlignment(VerticalAlignment align)
      +
      Sets the vertical text alignment of this label.
      +
      +
      Parameters:
      +
      align - the new text alignment
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.LabelUpdater.html b/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.LabelUpdater.html index dc207aa..90ef7bb 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.LabelUpdater.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.LabelUpdater.html @@ -1,144 +1,145 @@ - - - - -WLabeledSlider.LabelUpdater (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface WLabeledSlider.LabelUpdater

-
-
-
-
Enclosing class:
-
WLabeledSlider
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public static interface WLabeledSlider.LabelUpdater
-
A label updater updates the label of a slider based on the current value. - -

Useful for situations when you want to have display values on the slider.

-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - -
    updateLabel(int value)
    -
    -
    Gets the updated label for the new slider value.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      updateLabel

      -
      Text updateLabel(int value)
      -
      Gets the updated label for the new slider value.
      -
      -
      Parameters:
      -
      value - the slider value
      -
      Returns:
      -
      the label
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WLabeledSlider.LabelUpdater (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WLabeledSlider.LabelUpdater

+
+
+
+
Enclosing class:
+
WLabeledSlider
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface WLabeledSlider.LabelUpdater
+
A label updater updates the label of a slider based on the current value. + +

Useful for situations when you want to have display values on the slider.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    updateLabel(int value)
    +
    +
    Gets the updated label for the new slider value.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateLabel

      +
      Text updateLabel(int value)
      +
      Gets the updated label for the new slider value.
      +
      +
      Parameters:
      +
      value - the slider value
      +
      Returns:
      +
      the label
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.html b/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.html index 037d36a..9c3f8e9 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.html @@ -1,518 +1,519 @@ - - - - -WLabeledSlider (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WLabeledSlider

-
- -
-
-
public class WLabeledSlider -extends WAbstractSlider
-
A vanilla-style labeled slider widget. - -

In addition to the standard slider listeners, - labeled sliders also support "label updaters" that can update the label - when the value is changed.

-
-
See Also:
-
- -
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WLabeledSlider

      -
      public WLabeledSlider(int min, - int max)
      -
      Constructs a horizontal slider with no default label.
      -
      -
      Parameters:
      -
      min - the minimum value
      -
      max - the maximum value
      -
      -
      -
    • -
    • -
      -

      WLabeledSlider

      -
      public WLabeledSlider(int min, - int max, - Axis axis)
      -
      Constructs a slider with no default label.
      -
      -
      Parameters:
      -
      min - the minimum value
      -
      max - the maximum value
      -
      axis - the slider axis
      -
      -
      -
    • -
    • -
      -

      WLabeledSlider

      -
      public WLabeledSlider(int min, - int max, - Axis axis, - @Nullable - @Nullable Text label)
      -
      Constructs a slider.
      -
      -
      Parameters:
      -
      min - the minimum value
      -
      max - the maximum value
      -
      axis - the slider axis
      -
      label - the slider label (can be null)
      -
      -
      -
    • -
    • -
      -

      WLabeledSlider

      -
      public WLabeledSlider(int min, - int max, - @Nullable - @Nullable Text label)
      -
      Constructs a horizontal slider.
      -
      -
      Parameters:
      -
      min - the minimum value
      -
      max - the maximum value
      -
      label - the slider label (can be null)
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WAbstractSlider
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      getLabel

      -
      @Nullable -public @Nullable Text getLabel()
      -
      Gets the current label of this slider.
      -
      -
      Returns:
      -
      the label
      -
      -
      -
    • -
    • -
      -

      setLabel

      -
      public void setLabel(@Nullable - @Nullable Text label)
      -
      Sets the label of this slider.
      -
      -
      Parameters:
      -
      label - the new label
      -
      -
      -
    • -
    • -
      -

      onValueChanged

      -
      protected void onValueChanged(int value)
      -
      -
      Overrides:
      -
      onValueChanged in class WAbstractSlider
      -
      -
      -
    • -
    • -
      -

      getLabelAlignment

      -
      public HorizontalAlignment getLabelAlignment()
      -
      Gets the text alignment of this slider's label.
      -
      -
      Returns:
      -
      the alignment
      -
      -
      -
    • -
    • -
      -

      setLabelAlignment

      -
      public void setLabelAlignment(HorizontalAlignment labelAlignment)
      -
      Sets the text alignment of this slider's label.
      -
      -
      Parameters:
      -
      labelAlignment - the new alignment
      -
      -
      -
    • -
    • -
      -

      getLabelUpdater

      -
      @Nullable -public @Nullable WLabeledSlider.LabelUpdater getLabelUpdater()
      -
      Gets the WLabeledSlider.LabelUpdater of this slider.
      -
      -
      Returns:
      -
      the label updater
      -
      -
      -
    • -
    • -
      -

      setLabelUpdater

      -
      public void setLabelUpdater(@Nullable - @Nullable WLabeledSlider.LabelUpdater labelUpdater)
      -
      Sets the WLabeledSlider.LabelUpdater of this slider.
      -
      -
      Parameters:
      -
      labelUpdater - the new label updater
      -
      -
      -
    • -
    • -
      -

      getThumbWidth

      -
      protected int getThumbWidth()
      -
      Description copied from class: WAbstractSlider
      -
      Returns the thumb size along the slider axis.
      -
      -
      Specified by:
      -
      getThumbWidth in class WAbstractSlider
      -
      Returns:
      -
      the thumb size along the slider axis
      -
      -
      -
    • -
    • -
      -

      isMouseInsideBounds

      -
      protected boolean isMouseInsideBounds(int x, - int y)
      -
      Description copied from class: WAbstractSlider
      -
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      -
      -
      Specified by:
      -
      isMouseInsideBounds in class WAbstractSlider
      -
      Parameters:
      -
      x - the mouse x position
      -
      y - the mouse y position
      -
      Returns:
      -
      if the cursor is inside dragging bounds
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WAbstractSlider
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WLabeledSlider (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WLabeledSlider

+
+ +
+
+
public class WLabeledSlider +extends WAbstractSlider
+
A vanilla-style labeled slider widget. + +

In addition to the standard slider listeners, + labeled sliders also support "label updaters" that can update the label + when the value is changed.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WLabeledSlider

      +
      public WLabeledSlider(int min, + int max)
      +
      Constructs a horizontal slider with no default label.
      +
      +
      Parameters:
      +
      min - the minimum value
      +
      max - the maximum value
      +
      +
      +
    • +
    • +
      +

      WLabeledSlider

      +
      public WLabeledSlider(int min, + int max, + Axis axis)
      +
      Constructs a slider with no default label.
      +
      +
      Parameters:
      +
      min - the minimum value
      +
      max - the maximum value
      +
      axis - the slider axis
      +
      +
      +
    • +
    • +
      +

      WLabeledSlider

      +
      public WLabeledSlider(int min, + int max, + Axis axis, + @Nullable + @Nullable Text label)
      +
      Constructs a slider.
      +
      +
      Parameters:
      +
      min - the minimum value
      +
      max - the maximum value
      +
      axis - the slider axis
      +
      label - the slider label (can be null)
      +
      +
      +
    • +
    • +
      +

      WLabeledSlider

      +
      public WLabeledSlider(int min, + int max, + @Nullable + @Nullable Text label)
      +
      Constructs a horizontal slider.
      +
      +
      Parameters:
      +
      min - the minimum value
      +
      max - the maximum value
      +
      label - the slider label (can be null)
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WAbstractSlider
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      getLabel

      +
      @Nullable +public @Nullable Text getLabel()
      +
      Gets the current label of this slider.
      +
      +
      Returns:
      +
      the label
      +
      +
      +
    • +
    • +
      +

      setLabel

      +
      public void setLabel(@Nullable + @Nullable Text label)
      +
      Sets the label of this slider.
      +
      +
      Parameters:
      +
      label - the new label
      +
      +
      +
    • +
    • +
      +

      onValueChanged

      +
      protected void onValueChanged(int value)
      +
      +
      Overrides:
      +
      onValueChanged in class WAbstractSlider
      +
      +
      +
    • +
    • +
      +

      getLabelAlignment

      +
      public HorizontalAlignment getLabelAlignment()
      +
      Gets the text alignment of this slider's label.
      +
      +
      Returns:
      +
      the alignment
      +
      +
      +
    • +
    • +
      +

      setLabelAlignment

      +
      public void setLabelAlignment(HorizontalAlignment labelAlignment)
      +
      Sets the text alignment of this slider's label.
      +
      +
      Parameters:
      +
      labelAlignment - the new alignment
      +
      +
      +
    • +
    • +
      +

      getLabelUpdater

      +
      @Nullable +public @Nullable WLabeledSlider.LabelUpdater getLabelUpdater()
      +
      Gets the WLabeledSlider.LabelUpdater of this slider.
      +
      +
      Returns:
      +
      the label updater
      +
      +
      +
    • +
    • +
      +

      setLabelUpdater

      +
      public void setLabelUpdater(@Nullable + @Nullable WLabeledSlider.LabelUpdater labelUpdater)
      +
      Sets the WLabeledSlider.LabelUpdater of this slider.
      +
      +
      Parameters:
      +
      labelUpdater - the new label updater
      +
      +
      +
    • +
    • +
      +

      getThumbWidth

      +
      protected int getThumbWidth()
      +
      Description copied from class: WAbstractSlider
      +
      Returns the thumb size along the slider axis.
      +
      +
      Specified by:
      +
      getThumbWidth in class WAbstractSlider
      +
      Returns:
      +
      the thumb size along the slider axis
      +
      +
      +
    • +
    • +
      +

      isMouseInsideBounds

      +
      protected boolean isMouseInsideBounds(int x, + int y)
      +
      Description copied from class: WAbstractSlider
      +
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      +
      +
      Specified by:
      +
      isMouseInsideBounds in class WAbstractSlider
      +
      Parameters:
      +
      x - the mouse x position
      +
      y - the mouse y position
      +
      Returns:
      +
      if the cursor is inside dragging bounds
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WAbstractSlider
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WListPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WListPanel.html index 8e47b52..78c4cd0 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WListPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WListPanel.html @@ -1,467 +1,468 @@ - - - - -WListPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WListPanel<D,W extends WWidget>

-
- -
-
-
public class WListPanel<D,W extends WWidget> -extends WClippedPanel
-
Similar to the RecyclerView in Android, this widget represents a scrollable list of items. - -

D is the type of data represented. The data must reside in some ordered backing List<D>. - D's *must* have working equals and hashCode methods to distinguish them from each other! -

W is the WWidget class that will represent a single D of data.

-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      data

      -
      protected List<D> data
      -
      The list of data that this list represents.
      -
      -
    • -
    • -
      -

      supplier

      -
      protected Supplier<W extends WWidget> supplier
      -
      The supplier of new empty widgets.
      -
      -
    • -
    • -
      -

      configurator

      -
      protected BiConsumer<D,W extends WWidget> configurator
      -
      The widget configurator that configures the passed widget - to display the passed data.
      -
      -
    • -
    • -
      -

      configured

      -
      protected HashMap<D,W extends WWidget> configured
      -
      -
    • -
    • -
      -

      unconfigured

      -
      protected List<W extends WWidget> unconfigured
      -
      -
    • -
    • -
      -

      cellHeight

      -
      protected int cellHeight
      -
      The height of each child cell.
      -
      -
    • -
    • -
      -

      fixedHeight

      -
      protected boolean fixedHeight
      -
      Whether this list has a fixed height for items.
      -
      -
    • -
    • -
      -

      margin

      -
      protected int margin
      -
      -
    • -
    • -
      -

      scrollBar

      -
      protected WScrollBar scrollBar
      -
      The scroll bar of this list.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WListPanel

      -
      public WListPanel(List<D> data, - Supplier<W> supplier, - BiConsumer<D,W> configurator)
      -
      Constructs a list panel.
      -
      -
      Parameters:
      -
      data - the list data
      -
      supplier - the widget supplier that creates unconfigured widgets
      -
      configurator - the widget configurator that configures widgets to display the passed data
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WClippedPanel
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription c)
      -
      Description copied from class: WPanel
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized. - -

      Subclasses should call super.validate(c) to ensure that children are validated.

      -
      -
      Overrides:
      -
      validate in class WPanel
      -
      Parameters:
      -
      c - the host GUI description
      -
      -
      -
    • -
    • -
      -

      setHost

      -
      public void setHost(GuiDescription host)
      -
      Description copied from class: WWidget
      -
      Sets the host of this widget and all its children without creating peers.
      -
      -
      Overrides:
      -
      setHost in class WPanel
      -
      Parameters:
      -
      host - the new host
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      layout

      -
      public void layout()
      -
      Description copied from class: WPanel
      -
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      -
      -
      Overrides:
      -
      layout in class WPanel
      -
      -
      -
    • -
    • -
      -

      setListItemHeight

      -
      public WListPanel<D,W> setListItemHeight(int height)
      -
      Sets the height of this list's items to a constant value.
      -
      -
      Parameters:
      -
      height - the item height
      -
      Returns:
      -
      this list
      -
      -
      -
    • -
    • -
      -

      onMouseScroll

      -
      public InputResult onMouseScroll(int x, - int y, - double amount)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been scrolled inside its bounds.
      -
      -
      Overrides:
      -
      onMouseScroll in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      amount - The scrolled amount. Positive values are up and negative values are down.
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getScrollBar

      -
      public WScrollBar getScrollBar()
      -
      Gets the WScrollBar attached to this panel.
      -
      -
      Returns:
      -
      the scroll bar bundled
      -
      Since:
      -
      5.3.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WListPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WListPanel<D,W extends WWidget>

+
+ +
+
+
public class WListPanel<D,W extends WWidget> +extends WClippedPanel
+
Similar to the RecyclerView in Android, this widget represents a scrollable list of items. + +

D is the type of data represented. The data must reside in some ordered backing List<D>. + D's *must* have working equals and hashCode methods to distinguish them from each other! +

W is the WWidget class that will represent a single D of data.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      data

      +
      protected List<D> data
      +
      The list of data that this list represents.
      +
      +
    • +
    • +
      +

      supplier

      +
      protected Supplier<W extends WWidget> supplier
      +
      The supplier of new empty widgets.
      +
      +
    • +
    • +
      +

      configurator

      +
      protected BiConsumer<D,W extends WWidget> configurator
      +
      The widget configurator that configures the passed widget + to display the passed data.
      +
      +
    • +
    • +
      +

      configured

      +
      protected HashMap<D,W extends WWidget> configured
      +
      +
    • +
    • +
      +

      unconfigured

      +
      protected List<W extends WWidget> unconfigured
      +
      +
    • +
    • +
      +

      cellHeight

      +
      protected int cellHeight
      +
      The height of each child cell.
      +
      +
    • +
    • +
      +

      fixedHeight

      +
      protected boolean fixedHeight
      +
      Whether this list has a fixed height for items.
      +
      +
    • +
    • +
      +

      margin

      +
      protected int margin
      +
      +
    • +
    • +
      +

      scrollBar

      +
      protected WScrollBar scrollBar
      +
      The scroll bar of this list.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WListPanel

      +
      public WListPanel(List<D> data, + Supplier<W> supplier, + BiConsumer<D,W> configurator)
      +
      Constructs a list panel.
      +
      +
      Parameters:
      +
      data - the list data
      +
      supplier - the widget supplier that creates unconfigured widgets
      +
      configurator - the widget configurator that configures widgets to display the passed data
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WClippedPanel
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription c)
      +
      Description copied from class: WPanel
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized. + +

      Subclasses should call super.validate(c) to ensure that children are validated.

      +
      +
      Overrides:
      +
      validate in class WPanel
      +
      Parameters:
      +
      c - the host GUI description
      +
      +
      +
    • +
    • +
      +

      setHost

      +
      public void setHost(GuiDescription host)
      +
      Description copied from class: WWidget
      +
      Sets the host of this widget and all its children without creating peers.
      +
      +
      Overrides:
      +
      setHost in class WPanel
      +
      Parameters:
      +
      host - the new host
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      layout

      +
      public void layout()
      +
      Description copied from class: WPanel
      +
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      +
      +
      Overrides:
      +
      layout in class WPanel
      +
      +
      +
    • +
    • +
      +

      setListItemHeight

      +
      public WListPanel<D,W> setListItemHeight(int height)
      +
      Sets the height of this list's items to a constant value.
      +
      +
      Parameters:
      +
      height - the item height
      +
      Returns:
      +
      this list
      +
      +
      +
    • +
    • +
      +

      onMouseScroll

      +
      public InputResult onMouseScroll(int x, + int y, + double amount)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been scrolled inside its bounds.
      +
      +
      Overrides:
      +
      onMouseScroll in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      amount - The scrolled amount. Positive values are up and negative values are down.
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getScrollBar

      +
      public WScrollBar getScrollBar()
      +
      Gets the WScrollBar attached to this panel.
      +
      +
      Returns:
      +
      the scroll bar bundled
      +
      Since:
      +
      5.3.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WPanel.html index 5989630..705deaf 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WPanel.html @@ -1,527 +1,528 @@ - - - - -WPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WPanel

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WPanel
-
-
-
-
-
Direct Known Subclasses:
-
WCardPanel, WClippedPanel, WPanelWithInsets, WTabPanel
-
-
-
public abstract class WPanel -extends WWidget
-
Panels are widgets that contain other widgets.
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      children

      -
      protected final List<WWidget> children
      -
      The widgets contained within this panel. - -

      The list is mutable.

      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WPanel

      -
      public WPanel()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      remove

      -
      public void remove(WWidget w)
      -
      Removes the widget from this panel.
      -
      -
      Parameters:
      -
      w - the removed widget
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      setBackgroundPainter

      -
      @Environment(CLIENT) -public WPanel setBackgroundPainter(BackgroundPainter painter)
      -
      Sets the BackgroundPainter of this panel.
      -
      -
      Parameters:
      -
      painter - the new painter
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    • -
      -

      getBackgroundPainter

      -
      @Environment(CLIENT) -public BackgroundPainter getBackgroundPainter()
      -
      Gets the current BackgroundPainter of this panel.
      -
      -
      Returns:
      -
      the painter
      -
      -
      -
    • -
    • -
      -

      layout

      -
      public void layout()
      -
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      -
      -
    • -
    • -
      -

      expandToFit

      -
      protected void expandToFit(WWidget w)
      -
      Expands this panel be at least as large as the widget.
      -
      -
      Parameters:
      -
      w - the widget
      -
      -
      -
    • -
    • -
      -

      expandToFit

      -
      protected void expandToFit(WWidget w, - Insets insets)
      -
      Expands this panel be at least as large as the widget.
      -
      -
      Parameters:
      -
      w - the widget
      -
      insets - the layout insets
      -
      Since:
      -
      4.0.0
      -
      -
      -
    • -
    • -
      -

      hit

      -
      public WWidget hit(int x, - int y)
      -
      Finds the most specific child node at this location.
      -
      -
      Overrides:
      -
      hit in class WWidget
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription c)
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized. - -

      Subclasses should call super.validate(c) to ensure that children are validated.

      -
      -
      Overrides:
      -
      validate in class WWidget
      -
      Parameters:
      -
      c - the host GUI description
      -
      -
      -
    • -
    • -
      -

      setHost

      -
      public void setHost(GuiDescription host)
      -
      Description copied from class: WWidget
      -
      Sets the host of this widget and all its children without creating peers.
      -
      -
      Overrides:
      -
      setHost in class WWidget
      -
      Parameters:
      -
      host - the new host
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      tick

      -
      @Environment(CLIENT) -public void tick()
      -
      Ticks all children of this panel.
      -
      -
      Overrides:
      -
      tick in class WWidget
      -
      -
      -
    • -
    • -
      -

      onShown

      -
      public void onShown()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it is visible and - shows any hidden peers of itself and its children.
      -
      -
      Overrides:
      -
      onShown in class WWidget
      -
      -
      -
    • -
    • -
      -

      onHidden

      -
      public void onHidden()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it won't be drawn and - hides any visible peers of itself and its children. - -

      The default implementation releases this widget's - focus if it is focused. Overriding implementations - might want to do this as well.

      -
      -
      Overrides:
      -
      onHidden in class WWidget
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Adds the default background painters to this widget and all children. - -

      Always called before GuiDescription.addPainters() to allow users to modify painters. - -

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      -
      -
      Overrides:
      -
      addPainters in class WWidget
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      streamChildren

      -
      public final Stream<WWidget> streamChildren()
      -
      Returns a stream of all visible top-level widgets in this panel.
      -
      -
      Returns:
      -
      a stream of all visible top-level widgets in this panel
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public String toString()
      -
      -
      Overrides:
      -
      toString in class Object
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WPanel

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WPanel
+
+
+
+
+
Direct Known Subclasses:
+
WCardPanel, WClippedPanel, WPanelWithInsets, WTabPanel
+
+
+
public abstract class WPanel +extends WWidget
+
Panels are widgets that contain other widgets.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      children

      +
      protected final List<WWidget> children
      +
      The widgets contained within this panel. + +

      The list is mutable.

      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WPanel

      +
      public WPanel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      remove

      +
      public void remove(WWidget w)
      +
      Removes the widget from this panel.
      +
      +
      Parameters:
      +
      w - the removed widget
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      setBackgroundPainter

      +
      @Environment(CLIENT) +public WPanel setBackgroundPainter(BackgroundPainter painter)
      +
      Sets the BackgroundPainter of this panel.
      +
      +
      Parameters:
      +
      painter - the new painter
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    • +
      +

      getBackgroundPainter

      +
      @Environment(CLIENT) +public BackgroundPainter getBackgroundPainter()
      +
      Gets the current BackgroundPainter of this panel.
      +
      +
      Returns:
      +
      the painter
      +
      +
      +
    • +
    • +
      +

      layout

      +
      public void layout()
      +
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      +
      +
    • +
    • +
      +

      expandToFit

      +
      protected void expandToFit(WWidget w)
      +
      Expands this panel be at least as large as the widget.
      +
      +
      Parameters:
      +
      w - the widget
      +
      +
      +
    • +
    • +
      +

      expandToFit

      +
      protected void expandToFit(WWidget w, + Insets insets)
      +
      Expands this panel be at least as large as the widget.
      +
      +
      Parameters:
      +
      w - the widget
      +
      insets - the layout insets
      +
      Since:
      +
      4.0.0
      +
      +
      +
    • +
    • +
      +

      hit

      +
      public WWidget hit(int x, + int y)
      +
      Finds the most specific child node at this location.
      +
      +
      Overrides:
      +
      hit in class WWidget
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription c)
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized. + +

      Subclasses should call super.validate(c) to ensure that children are validated.

      +
      +
      Overrides:
      +
      validate in class WWidget
      +
      Parameters:
      +
      c - the host GUI description
      +
      +
      +
    • +
    • +
      +

      setHost

      +
      public void setHost(GuiDescription host)
      +
      Description copied from class: WWidget
      +
      Sets the host of this widget and all its children without creating peers.
      +
      +
      Overrides:
      +
      setHost in class WWidget
      +
      Parameters:
      +
      host - the new host
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      tick

      +
      @Environment(CLIENT) +public void tick()
      +
      Ticks all children of this panel.
      +
      +
      Overrides:
      +
      tick in class WWidget
      +
      +
      +
    • +
    • +
      +

      onShown

      +
      public void onShown()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it is visible and + shows any hidden peers of itself and its children.
      +
      +
      Overrides:
      +
      onShown in class WWidget
      +
      +
      +
    • +
    • +
      +

      onHidden

      +
      public void onHidden()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it won't be drawn and + hides any visible peers of itself and its children. + +

      The default implementation releases this widget's + focus if it is focused. Overriding implementations + might want to do this as well.

      +
      +
      Overrides:
      +
      onHidden in class WWidget
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Adds the default background painters to this widget and all children. + +

      Always called before GuiDescription.addPainters() to allow users to modify painters. + +

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      +
      +
      Overrides:
      +
      addPainters in class WWidget
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      streamChildren

      +
      public final Stream<WWidget> streamChildren()
      +
      Returns a stream of all visible top-level widgets in this panel.
      +
      +
      Returns:
      +
      a stream of all visible top-level widgets in this panel
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WPanelWithInsets.html b/libgui/io/github/cottonmc/cotton/gui/widget/WPanelWithInsets.html index e68cc58..9b3012f 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WPanelWithInsets.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WPanelWithInsets.html @@ -1,245 +1,265 @@ - - - - -WPanelWithInsets (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WPanelWithInsets

-
- -
-
-
Direct Known Subclasses:
-
WBox, WGridPanel, WPlainPanel
-
-
-
public abstract class WPanelWithInsets -extends WPanel
-
A panel that has layout insets.
-
-
Since:
-
4.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      insets

      -
      protected Insets insets
      -
      The layout insets of this panel. - They control how far from the panel's edges the widgets are placed.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WPanelWithInsets

      -
      public WPanelWithInsets()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getInsets

      -
      public Insets getInsets()
      -
      Gets the layout insets of this panel.
      -
      -
      Returns:
      -
      the insets
      -
      -
      -
    • -
    • -
      -

      setInsets

      -
      public WPanelWithInsets setInsets(Insets insets)
      -
      Sets the layout insets of this panel. - Subclasses are encouraged to override this method to return their more specific type - (such as WGridPanel). - -

      If there are already widgets in this panel when the insets are modified, - the panel is resized and the widgets are moved according to the insets.

      -
      -
      Parameters:
      -
      insets - the insets, should not be null
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WPanelWithInsets (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WPanelWithInsets

+
+ +
+
+
Direct Known Subclasses:
+
WBox, WGridPanel, WPlainPanel
+
+
+
public abstract class WPanelWithInsets +extends WPanel
+
A panel that has layout insets.
+
+
Since:
+
4.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      insets

      +
      protected Insets insets
      +
      The layout insets of this panel. + They control how far from the panel's edges the widgets are placed.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WPanelWithInsets

      +
      public WPanelWithInsets()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getInsets

      +
      public Insets getInsets()
      +
      Gets the layout insets of this panel.
      +
      +
      Returns:
      +
      the insets
      +
      +
      +
    • +
    • +
      +

      setInsets

      +
      public WPanelWithInsets setInsets(Insets insets)
      +
      Sets the layout insets of this panel. + Subclasses are encouraged to override this method to return their more specific type + (such as WGridPanel). + +

      If there are already widgets in this panel when the insets are modified, + the panel is resized and the widgets are moved according to the insets.

      +
      +
      Parameters:
      +
      insets - the insets, should not be null
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    • +
      +

      expandToFit

      +
      protected void expandToFit(WWidget w)
      +
      Description copied from class: WPanel
      +
      Expands this panel be at least as large as the widget.
      +
      +
      Overrides:
      +
      expandToFit in class WPanel
      +
      Parameters:
      +
      w - the widget
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WPlainPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WPlainPanel.html index 0241586..b53484b 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WPlainPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WPlainPanel.html @@ -1,262 +1,263 @@ - - - - -WPlainPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WPlainPanel

-
- -
-
-
Direct Known Subclasses:
-
WPlayerInvPanel
-
-
-
public class WPlainPanel -extends WPanelWithInsets
-
A panel that positions children by pixel-perfect positions.
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WPlainPanel

      -
      public WPlainPanel()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public void add(WWidget w, - int x, - int y)
      -
      Adds a new widget to this panel. - -

      If the widget can be resized, - it will be resized to (18, 18).

      -
      -
      Parameters:
      -
      w - the widget
      -
      x - the X position
      -
      y - the Y position
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget w, - int x, - int y, - int width, - int height)
      -
      Adds a new widget to this panel and resizes it to a custom size.
      -
      -
      Parameters:
      -
      w - the widget
      -
      x - the X position
      -
      y - the Y position
      -
      width - the new width
      -
      height - the new height
      -
      -
      -
    • -
    • -
      -

      setInsets

      -
      public WPlainPanel setInsets(Insets insets)
      -
      Description copied from class: WPanelWithInsets
      -
      Sets the layout insets of this panel. - Subclasses are encouraged to override this method to return their more specific type - (such as WGridPanel). - -

      If there are already widgets in this panel when the insets are modified, - the panel is resized and the widgets are moved according to the insets.

      -
      -
      Overrides:
      -
      setInsets in class WPanelWithInsets
      -
      Parameters:
      -
      insets - the insets, should not be null
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WPlainPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WPlainPanel

+
+ +
+
+
Direct Known Subclasses:
+
WPlayerInvPanel
+
+
+
public class WPlainPanel +extends WPanelWithInsets
+
A panel that positions children by pixel-perfect positions.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WPlainPanel

      +
      public WPlainPanel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(WWidget w, + int x, + int y)
      +
      Adds a new widget to this panel. + +

      If the widget can be resized, + it will be resized to (18, 18).

      +
      +
      Parameters:
      +
      w - the widget
      +
      x - the X position
      +
      y - the Y position
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget w, + int x, + int y, + int width, + int height)
      +
      Adds a new widget to this panel and resizes it to a custom size.
      +
      +
      Parameters:
      +
      w - the widget
      +
      x - the X position
      +
      y - the Y position
      +
      width - the new width
      +
      height - the new height
      +
      +
      +
    • +
    • +
      +

      setInsets

      +
      public WPlainPanel setInsets(Insets insets)
      +
      Description copied from class: WPanelWithInsets
      +
      Sets the layout insets of this panel. + Subclasses are encouraged to override this method to return their more specific type + (such as WGridPanel). + +

      If there are already widgets in this panel when the insets are modified, + the panel is resized and the widgets are moved according to the insets.

      +
      +
      Overrides:
      +
      setInsets in class WPanelWithInsets
      +
      Parameters:
      +
      insets - the insets, should not be null
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.html index 62ef977..4d16e48 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.html @@ -1,317 +1,409 @@ - - - - -WPlayerInvPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WPlayerInvPanel

-
- -
-
-
public class WPlayerInvPanel -extends WPlainPanel
-
A player inventory widget that has a visually separate hotbar.
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WPlayerInvPanel

      -
      public WPlayerInvPanel(PlayerInventory playerInventory)
      -
      Constructs a player inventory panel with a label.
      -
      -
      Parameters:
      -
      playerInventory - the player inventory
      -
      -
      -
    • -
    • -
      -

      WPlayerInvPanel

      -
      public WPlayerInvPanel(PlayerInventory playerInventory, - boolean hasLabel)
      -
      Constructs a player inventory panel.
      -
      -
      Parameters:
      -
      playerInventory - the player inventory
      -
      hasLabel - whether there should be an "Inventory" label
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      WPlayerInvPanel

      -
      public WPlayerInvPanel(PlayerInventory playerInventory, - @Nullable - @Nullable WWidget label)
      -
      Constructs a player inventory panel.
      -
      -
      Parameters:
      -
      playerInventory - the player inventory
      -
      label - the label widget, can be null
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WPanel
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      createInventoryLabel

      -
      public static WLabel createInventoryLabel(PlayerInventory playerInventory)
      -
      Creates a vanilla-style inventory label for a player inventory.
      -
      -
      Parameters:
      -
      playerInventory - the player inventory
      -
      Returns:
      -
      the created label
      -
      Since:
      -
      3.1.0
      -
      -
      -
    • -
    • -
      -

      setBackgroundPainter

      -
      @Environment(CLIENT) -public WPanel setBackgroundPainter(BackgroundPainter painter)
      -
      Sets the background painter of this inventory widget's slots.
      -
      -
      Overrides:
      -
      setBackgroundPainter in class WPanel
      -
      Parameters:
      -
      painter - the new painter
      -
      Returns:
      -
      this panel
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription c)
      -
      Description copied from class: WPanel
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized. - -

      Subclasses should call super.validate(c) to ensure that children are validated.

      -
      -
      Overrides:
      -
      validate in class WPanel
      -
      Parameters:
      -
      c - the host GUI description
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WPlayerInvPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WPlayerInvPanel

+
+ +
+
+
public class WPlayerInvPanel +extends WPlainPanel
+
A player inventory widget that has a visually separate hotbar.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WPlayerInvPanel

      +
      public WPlayerInvPanel(PlayerInventory playerInventory)
      +
      Constructs a player inventory panel with a label.
      +
      +
      Parameters:
      +
      playerInventory - the player inventory
      +
      +
      +
    • +
    • +
      +

      WPlayerInvPanel

      +
      public WPlayerInvPanel(PlayerInventory playerInventory, + boolean hasLabel)
      +
      Constructs a player inventory panel.
      +
      +
      Parameters:
      +
      playerInventory - the player inventory
      +
      hasLabel - whether there should be an "Inventory" label
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      WPlayerInvPanel

      +
      public WPlayerInvPanel(PlayerInventory playerInventory, + @Nullable + @Nullable WWidget label)
      +
      Constructs a player inventory panel.
      +
      +
      Parameters:
      +
      playerInventory - the player inventory
      +
      label - the label widget, can be null
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WPanel
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      createInventoryLabel

      +
      public static WLabel createInventoryLabel(PlayerInventory playerInventory)
      +
      Creates a vanilla-style inventory label for a player inventory.
      +
      +
      Parameters:
      +
      playerInventory - the player inventory
      +
      Returns:
      +
      the created label
      +
      Since:
      +
      3.1.0
      +
      +
      +
    • +
    • +
      +

      setBackgroundPainter

      +
      @Environment(CLIENT) +public WPanel setBackgroundPainter(BackgroundPainter painter)
      +
      Sets the background painter of this inventory widget's slots.
      +
      +
      Overrides:
      +
      setBackgroundPainter in class WPanel
      +
      Parameters:
      +
      painter - the new painter
      +
      Returns:
      +
      this panel
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription c)
      +
      Description copied from class: WPanel
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized. + +

      Subclasses should call super.validate(c) to ensure that children are validated.

      +
      +
      Overrides:
      +
      validate in class WPanel
      +
      Parameters:
      +
      c - the host GUI description
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WScrollBar.html b/libgui/io/github/cottonmc/cotton/gui/widget/WScrollBar.html index d3a2902..81ff2c9 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WScrollBar.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WScrollBar.html @@ -1,627 +1,628 @@ - - - - -WScrollBar (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WScrollBar

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WScrollBar
-
-
-
-
-
public class WScrollBar -extends WWidget
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      axis

      -
      protected Axis axis
      -
      -
    • -
    • -
      -

      value

      -
      protected int value
      -
      -
    • -
    • -
      -

      maxValue

      -
      protected int maxValue
      -
      -
    • -
    • -
      -

      window

      -
      protected int window
      -
      -
    • -
    • -
      -

      anchor

      -
      protected int anchor
      -
      -
    • -
    • -
      -

      anchorValue

      -
      protected int anchorValue
      -
      -
    • -
    • -
      -

      sliding

      -
      protected boolean sliding
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WScrollBar

      -
      public WScrollBar()
      -
      Constructs a horizontal scroll bar.
      -
      -
    • -
    • -
      -

      WScrollBar

      -
      public WScrollBar(Axis axis)
      -
      Constructs a scroll bar with a custom axis.
      -
      -
      Parameters:
      -
      axis - the axis
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      getHandleSize

      -
      public int getHandleSize()
      -
      Gets the on-axis size of the scrollbar handle in gui pixels
      -
      -
    • -
    • -
      -

      getMovableDistance

      -
      public int getMovableDistance()
      -
      Gets the number of pixels the scrollbar handle is able to move along its track from one end to the other.
      -
      -
    • -
    • -
      -

      pixelsToValues

      -
      public int pixelsToValues(int pixels)
      -
      -
    • -
    • -
      -

      getHandlePosition

      -
      public int getHandlePosition()
      -
      -
    • -
    • -
      -

      getMaxScrollValue

      -
      public int getMaxScrollValue()
      -
      Gets the maximum scroll value achievable; this will typically be the maximum value minus the - window size
      -
      -
    • -
    • -
      -

      adjustSlider

      -
      protected void adjustSlider(int x, - int y)
      -
      -
    • -
    • -
      -

      onMouseDown

      -
      public InputResult onMouseDown(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed while inside its bounds
      -
      -
      Overrides:
      -
      onMouseDown in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseDrag

      -
      @Environment(CLIENT) -public InputResult onMouseDrag(int x, - int y, - int button, - double deltaX, - double deltaY)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      -
      -
      Overrides:
      -
      onMouseDrag in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      deltaX - The amount of dragging on the X axis
      -
      deltaY - The amount of dragging on the Y axis
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseUp

      -
      @Environment(CLIENT) -public InputResult onMouseUp(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been released while inside its bounds
      -
      -
      Overrides:
      -
      onMouseUp in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseScroll

      -
      @Environment(CLIENT) -public InputResult onMouseScroll(int x, - int y, - double amount)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been scrolled inside its bounds.
      -
      -
      Overrides:
      -
      onMouseScroll in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      amount - The scrolled amount. Positive values are up and negative values are down.
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getValue

      -
      public int getValue()
      -
      -
    • -
    • -
      -

      setValue

      -
      public WScrollBar setValue(int value)
      -
      -
    • -
    • -
      -

      getMaxValue

      -
      public int getMaxValue()
      -
      -
    • -
    • -
      -

      setMaxValue

      -
      public WScrollBar setMaxValue(int max)
      -
      -
    • -
    • -
      -

      getWindow

      -
      public int getWindow()
      -
      -
    • -
    • -
      -

      setWindow

      -
      public WScrollBar setWindow(int window)
      -
      -
    • -
    • -
      -

      checkValue

      -
      protected void checkValue()
      -
      Checks that the current value is in the correct range - and adjusts it if needed.
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WScrollBar (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WScrollBar

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WScrollBar
+
+
+
+
+
public class WScrollBar +extends WWidget
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      axis

      +
      protected Axis axis
      +
      +
    • +
    • +
      +

      value

      +
      protected int value
      +
      +
    • +
    • +
      +

      maxValue

      +
      protected int maxValue
      +
      +
    • +
    • +
      +

      window

      +
      protected int window
      +
      +
    • +
    • +
      +

      anchor

      +
      protected int anchor
      +
      +
    • +
    • +
      +

      anchorValue

      +
      protected int anchorValue
      +
      +
    • +
    • +
      +

      sliding

      +
      protected boolean sliding
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WScrollBar

      +
      public WScrollBar()
      +
      Constructs a horizontal scroll bar.
      +
      +
    • +
    • +
      +

      WScrollBar

      +
      public WScrollBar(Axis axis)
      +
      Constructs a scroll bar with a custom axis.
      +
      +
      Parameters:
      +
      axis - the axis
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      getHandleSize

      +
      public int getHandleSize()
      +
      Gets the on-axis size of the scrollbar handle in gui pixels
      +
      +
    • +
    • +
      +

      getMovableDistance

      +
      public int getMovableDistance()
      +
      Gets the number of pixels the scrollbar handle is able to move along its track from one end to the other.
      +
      +
    • +
    • +
      +

      pixelsToValues

      +
      public int pixelsToValues(int pixels)
      +
      +
    • +
    • +
      +

      getHandlePosition

      +
      public int getHandlePosition()
      +
      +
    • +
    • +
      +

      getMaxScrollValue

      +
      public int getMaxScrollValue()
      +
      Gets the maximum scroll value achievable; this will typically be the maximum value minus the + window size
      +
      +
    • +
    • +
      +

      adjustSlider

      +
      protected void adjustSlider(int x, + int y)
      +
      +
    • +
    • +
      +

      onMouseDown

      +
      public InputResult onMouseDown(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed while inside its bounds
      +
      +
      Overrides:
      +
      onMouseDown in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseDrag

      +
      @Environment(CLIENT) +public InputResult onMouseDrag(int x, + int y, + int button, + double deltaX, + double deltaY)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      +
      +
      Overrides:
      +
      onMouseDrag in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      deltaX - The amount of dragging on the X axis
      +
      deltaY - The amount of dragging on the Y axis
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseUp

      +
      @Environment(CLIENT) +public InputResult onMouseUp(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been released while inside its bounds
      +
      +
      Overrides:
      +
      onMouseUp in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseScroll

      +
      @Environment(CLIENT) +public InputResult onMouseScroll(int x, + int y, + double amount)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been scrolled inside its bounds.
      +
      +
      Overrides:
      +
      onMouseScroll in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      amount - The scrolled amount. Positive values are up and negative values are down.
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      +
    • +
    • +
      +

      setValue

      +
      public WScrollBar setValue(int value)
      +
      +
    • +
    • +
      +

      getMaxValue

      +
      public int getMaxValue()
      +
      +
    • +
    • +
      +

      setMaxValue

      +
      public WScrollBar setMaxValue(int max)
      +
      +
    • +
    • +
      +

      getWindow

      +
      public int getWindow()
      +
      +
    • +
    • +
      +

      setWindow

      +
      public WScrollBar setWindow(int window)
      +
      +
    • +
    • +
      +

      checkValue

      +
      protected void checkValue()
      +
      Checks that the current value is in the correct range + and adjusts it if needed.
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WScrollPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WScrollPanel.html index 7a31447..227376f 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WScrollPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WScrollPanel.html @@ -1,377 +1,378 @@ - - - - -WScrollPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WScrollPanel

-
- -
-
-
public class WScrollPanel -extends WClippedPanel
-
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
-
-
Since:
-
2.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      horizontalScrollBar

      -
      protected WScrollBar horizontalScrollBar
      -
      The horizontal scroll bar of this panel.
      -
      -
    • -
    • -
      -

      verticalScrollBar

      -
      protected WScrollBar verticalScrollBar
      -
      The vertical scroll bar of this panel.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WScrollPanel

      -
      public WScrollPanel(WWidget widget)
      -
      Creates a vertically scrolling panel.
      -
      -
      Parameters:
      -
      widget - the viewed widget
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      isScrollingHorizontally

      -
      public net.fabricmc.fabric.api.util.TriState isScrollingHorizontally()
      -
      Returns whether this scroll panel has a horizontal scroll bar.
      -
      -
      Returns:
      -
      true if there is a horizontal scroll bar, - default if a scroll bar should be added if needed, - and false otherwise
      -
      -
      -
    • -
    • -
      -

      setScrollingHorizontally

      -
      public WScrollPanel setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState scrollingHorizontally)
      -
      -
    • -
    • -
      -

      isScrollingVertically

      -
      public net.fabricmc.fabric.api.util.TriState isScrollingVertically()
      -
      Returns whether this scroll panel has a vertical scroll bar.
      -
      -
      Returns:
      -
      true if there is a vertical scroll bar, - * default if a scroll bar should be added if needed, - * and false otherwise
      -
      -
      -
    • -
    • -
      -

      setScrollingVertically

      -
      public WScrollPanel setScrollingVertically(net.fabricmc.fabric.api.util.TriState scrollingVertically)
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WClippedPanel
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      layout

      -
      public void layout()
      -
      Description copied from class: WPanel
      -
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      -
      -
      Overrides:
      -
      layout in class WPanel
      -
      -
      -
    • -
    • -
      -

      onMouseScroll

      -
      public InputResult onMouseScroll(int x, - int y, - double amount)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been scrolled inside its bounds.
      -
      -
      Overrides:
      -
      onMouseScroll in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      amount - The scrolled amount. Positive values are up and negative values are down.
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription c)
      -
      Description copied from class: WPanel
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized. - -

      Subclasses should call super.validate(c) to ensure that children are validated.

      -
      -
      Overrides:
      -
      validate in class WPanel
      -
      Parameters:
      -
      c - the host GUI description
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WScrollPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WScrollPanel

+
+ +
+
+
public class WScrollPanel +extends WClippedPanel
+
Similar to the JScrollPane in Swing, this widget represents a scrollable widget.
+
+
Since:
+
2.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      horizontalScrollBar

      +
      protected WScrollBar horizontalScrollBar
      +
      The horizontal scroll bar of this panel.
      +
      +
    • +
    • +
      +

      verticalScrollBar

      +
      protected WScrollBar verticalScrollBar
      +
      The vertical scroll bar of this panel.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WScrollPanel

      +
      public WScrollPanel(WWidget widget)
      +
      Creates a vertically scrolling panel.
      +
      +
      Parameters:
      +
      widget - the viewed widget
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isScrollingHorizontally

      +
      public net.fabricmc.fabric.api.util.TriState isScrollingHorizontally()
      +
      Returns whether this scroll panel has a horizontal scroll bar.
      +
      +
      Returns:
      +
      true if there is a horizontal scroll bar, + default if a scroll bar should be added if needed, + and false otherwise
      +
      +
      +
    • +
    • +
      +

      setScrollingHorizontally

      +
      public WScrollPanel setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState scrollingHorizontally)
      +
      +
    • +
    • +
      +

      isScrollingVertically

      +
      public net.fabricmc.fabric.api.util.TriState isScrollingVertically()
      +
      Returns whether this scroll panel has a vertical scroll bar.
      +
      +
      Returns:
      +
      true if there is a vertical scroll bar, + * default if a scroll bar should be added if needed, + * and false otherwise
      +
      +
      +
    • +
    • +
      +

      setScrollingVertically

      +
      public WScrollPanel setScrollingVertically(net.fabricmc.fabric.api.util.TriState scrollingVertically)
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WClippedPanel
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      layout

      +
      public void layout()
      +
      Description copied from class: WPanel
      +
      Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
      +
      +
      Overrides:
      +
      layout in class WPanel
      +
      +
      +
    • +
    • +
      +

      onMouseScroll

      +
      public InputResult onMouseScroll(int x, + int y, + double amount)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been scrolled inside its bounds.
      +
      +
      Overrides:
      +
      onMouseScroll in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      amount - The scrolled amount. Positive values are up and negative values are down.
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription c)
      +
      Description copied from class: WPanel
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized. + +

      Subclasses should call super.validate(c) to ensure that children are validated.

      +
      +
      Overrides:
      +
      validate in class WPanel
      +
      Parameters:
      +
      c - the host GUI description
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WSlider.html b/libgui/io/github/cottonmc/cotton/gui/widget/WSlider.html index 5bc7c79..0316fa4 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WSlider.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WSlider.html @@ -1,355 +1,356 @@ - - - - -WSlider (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WSlider

-
- -
-
-
public class WSlider -extends WAbstractSlider
-
A simple slider widget that can be used to select int values.
-
-
See Also:
-
- -
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      TRACK_WIDTH

      -
      public static final int TRACK_WIDTH
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      THUMB_SIZE

      -
      public static final int THUMB_SIZE
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      LIGHT_TEXTURE

      -
      public static final Identifier LIGHT_TEXTURE
      -
      -
    • -
    • -
      -

      DARK_TEXTURE

      -
      public static final Identifier DARK_TEXTURE
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WSlider

      -
      public WSlider(int min, - int max, - Axis axis)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getThumbWidth

      -
      protected int getThumbWidth()
      -
      Description copied from class: WAbstractSlider
      -
      Returns the thumb size along the slider axis.
      -
      -
      Specified by:
      -
      getThumbWidth in class WAbstractSlider
      -
      Returns:
      -
      the thumb size along the slider axis
      -
      -
      -
    • -
    • -
      -

      isMouseInsideBounds

      -
      protected boolean isMouseInsideBounds(int x, - int y)
      -
      Description copied from class: WAbstractSlider
      -
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      -
      -
      Specified by:
      -
      isMouseInsideBounds in class WAbstractSlider
      -
      Parameters:
      -
      x - the mouse x position
      -
      y - the mouse y position
      -
      Returns:
      -
      if the cursor is inside dragging bounds
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      getBackgroundPainter

      -
      @Environment(CLIENT) -@Nullable -public @Nullable BackgroundPainter getBackgroundPainter()
      -
      -
    • -
    • -
      -

      setBackgroundPainter

      -
      @Environment(CLIENT) -public void setBackgroundPainter(@Nullable - @Nullable BackgroundPainter backgroundPainter)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WSlider (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WSlider

+
+ +
+
+
public class WSlider +extends WAbstractSlider
+
A simple slider widget that can be used to select int values.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      TRACK_WIDTH

      +
      public static final int TRACK_WIDTH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      THUMB_SIZE

      +
      public static final int THUMB_SIZE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      LIGHT_TEXTURE

      +
      public static final Identifier LIGHT_TEXTURE
      +
      +
    • +
    • +
      +

      DARK_TEXTURE

      +
      public static final Identifier DARK_TEXTURE
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WSlider

      +
      public WSlider(int min, + int max, + Axis axis)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getThumbWidth

      +
      protected int getThumbWidth()
      +
      Description copied from class: WAbstractSlider
      +
      Returns the thumb size along the slider axis.
      +
      +
      Specified by:
      +
      getThumbWidth in class WAbstractSlider
      +
      Returns:
      +
      the thumb size along the slider axis
      +
      +
      +
    • +
    • +
      +

      isMouseInsideBounds

      +
      protected boolean isMouseInsideBounds(int x, + int y)
      +
      Description copied from class: WAbstractSlider
      +
      Checks if the mouse cursor is close enough to the slider that the user can start dragging.
      +
      +
      Specified by:
      +
      isMouseInsideBounds in class WAbstractSlider
      +
      Parameters:
      +
      x - the mouse x position
      +
      y - the mouse y position
      +
      Returns:
      +
      if the cursor is inside dragging bounds
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      getBackgroundPainter

      +
      @Environment(CLIENT) +@Nullable +public @Nullable BackgroundPainter getBackgroundPainter()
      +
      +
    • +
    • +
      +

      setBackgroundPainter

      +
      @Environment(CLIENT) +public void setBackgroundPainter(@Nullable + @Nullable BackgroundPainter backgroundPainter)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WSprite.html b/libgui/io/github/cottonmc/cotton/gui/widget/WSprite.html index 0442928..a0243d4 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WSprite.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WSprite.html @@ -1,551 +1,552 @@ - - - - -WSprite (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WSprite

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WSprite
-
-
-
-
-
Direct Known Subclasses:
-
WTiledSprite
-
-
-
public class WSprite -extends WWidget
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      currentFrame

      -
      protected int currentFrame
      -
      -
    • -
    • -
      -

      currentFrameTime

      -
      protected long currentFrameTime
      -
      -
    • -
    • -
      -

      frames

      -
      protected Texture[] frames
      -
      -
    • -
    • -
      -

      frameTime

      -
      protected int frameTime
      -
      -
    • -
    • -
      -

      lastFrame

      -
      protected long lastFrame
      -
      -
    • -
    • -
      -

      singleImage

      -
      protected boolean singleImage
      -
      -
    • -
    • -
      -

      tint

      -
      protected int tint
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WSprite

      -
      public WSprite(Texture texture)
      -
      Create a new sprite with a single image.
      -
      -
      Parameters:
      -
      texture - The image texture to display.
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      WSprite

      -
      public WSprite(Identifier image)
      -
      Create a new sprite with a single image.
      -
      -
      Parameters:
      -
      image - The location of the image to display.
      -
      -
      -
    • -
    • -
      -

      WSprite

      -
      public WSprite(Identifier image, - float u1, - float v1, - float u2, - float v2)
      -
      Create a new sprite with a single image and custom UV values.
      -
      -
      Parameters:
      -
      image - The location of the image to display.
      -
      u1 - the left edge of the texture
      -
      v1 - the top edge of the texture
      -
      u2 - the right edge of the texture
      -
      v2 - the bottom edge of the texture
      -
      -
      -
    • -
    • -
      -

      WSprite

      -
      public WSprite(int frameTime, - Identifier... frames)
      -
      Create a new animated sprite.
      -
      -
      Parameters:
      -
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      -
      frames - The locations of the frames of the animation.
      -
      -
      -
    • -
    • -
      -

      WSprite

      -
      public WSprite(int frameTime, - Texture... frames)
      -
      Create a new animated sprite.
      -
      -
      Parameters:
      -
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      -
      frames - The locations of the frames of the animation.
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setImage

      -
      public WSprite setImage(Identifier image)
      -
      Sets the image of this sprite.
      -
      -
      Parameters:
      -
      image - the new image
      -
      Returns:
      -
      this sprite
      -
      -
      -
    • -
    • -
      -

      setFrames

      -
      public WSprite setFrames(Identifier... frames)
      -
      Sets the animation frames of this sprite.
      -
      -
      Parameters:
      -
      frames - the frames
      -
      Returns:
      -
      this sprite
      -
      -
      -
    • -
    • -
      -

      setImage

      -
      public WSprite setImage(Texture image)
      -
      Sets the image of this sprite.
      -
      -
      Parameters:
      -
      image - the new image
      -
      Returns:
      -
      this sprite
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      setFrames

      -
      public WSprite setFrames(Texture... frames)
      -
      Sets the animation frames of this sprite.
      -
      -
      Parameters:
      -
      frames - the frames
      -
      Returns:
      -
      this sprite
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      setTint

      -
      public WSprite setTint(int tint)
      -
      Sets the tint for this sprite to the following color-with-alpha. If you don't want to specify - alpha, use setOpaqueTint(int) instead.
      -
      -
      Parameters:
      -
      tint - the new tint
      -
      Returns:
      -
      this sprite
      -
      -
      -
    • -
    • -
      -

      setOpaqueTint

      -
      public WSprite setOpaqueTint(int tint)
      -
      Sets the tint for this sprite to the following opaque color.
      -
      -
      Parameters:
      -
      tint - the new tint
      -
      Returns:
      -
      this sprite
      -
      -
      -
    • -
    • -
      -

      setUv

      -
      public WSprite setUv(float u1, - float v1, - float u2, - float v2)
      -
      Sets the UV values of this sprite.
      -
      -
      Parameters:
      -
      u1 - the left edge of the texture
      -
      v1 - the top edge of the texture
      -
      u2 - the right edge of the texture
      -
      v2 - the bottom edge of the texture
      -
      Returns:
      -
      this sprite
      -
      Since:
      -
      1.8.0
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      paintFrame

      -
      @Environment(CLIENT) -protected void paintFrame(DrawContext context, - int x, - int y, - Texture texture)
      -
      Paints a single frame for this sprite.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate to draw it at
      -
      y - the Y coordinate to draw it at
      -
      texture - the texture to draw
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WSprite (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WSprite

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WSprite
+
+
+
+
+
Direct Known Subclasses:
+
WTiledSprite
+
+
+
public class WSprite +extends WWidget
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      currentFrame

      +
      protected int currentFrame
      +
      +
    • +
    • +
      +

      currentFrameTime

      +
      protected long currentFrameTime
      +
      +
    • +
    • +
      +

      frames

      +
      protected Texture[] frames
      +
      +
    • +
    • +
      +

      frameTime

      +
      protected int frameTime
      +
      +
    • +
    • +
      +

      lastFrame

      +
      protected long lastFrame
      +
      +
    • +
    • +
      +

      singleImage

      +
      protected boolean singleImage
      +
      +
    • +
    • +
      +

      tint

      +
      protected int tint
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WSprite

      +
      public WSprite(Texture texture)
      +
      Create a new sprite with a single image.
      +
      +
      Parameters:
      +
      texture - The image texture to display.
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      WSprite

      +
      public WSprite(Identifier image)
      +
      Create a new sprite with a single image.
      +
      +
      Parameters:
      +
      image - The location of the image to display.
      +
      +
      +
    • +
    • +
      +

      WSprite

      +
      public WSprite(Identifier image, + float u1, + float v1, + float u2, + float v2)
      +
      Create a new sprite with a single image and custom UV values.
      +
      +
      Parameters:
      +
      image - The location of the image to display.
      +
      u1 - the left edge of the texture
      +
      v1 - the top edge of the texture
      +
      u2 - the right edge of the texture
      +
      v2 - the bottom edge of the texture
      +
      +
      +
    • +
    • +
      +

      WSprite

      +
      public WSprite(int frameTime, + Identifier... frames)
      +
      Create a new animated sprite.
      +
      +
      Parameters:
      +
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      +
      frames - The locations of the frames of the animation.
      +
      +
      +
    • +
    • +
      +

      WSprite

      +
      public WSprite(int frameTime, + Texture... frames)
      +
      Create a new animated sprite.
      +
      +
      Parameters:
      +
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      +
      frames - The locations of the frames of the animation.
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setImage

      +
      public WSprite setImage(Identifier image)
      +
      Sets the image of this sprite.
      +
      +
      Parameters:
      +
      image - the new image
      +
      Returns:
      +
      this sprite
      +
      +
      +
    • +
    • +
      +

      setFrames

      +
      public WSprite setFrames(Identifier... frames)
      +
      Sets the animation frames of this sprite.
      +
      +
      Parameters:
      +
      frames - the frames
      +
      Returns:
      +
      this sprite
      +
      +
      +
    • +
    • +
      +

      setImage

      +
      public WSprite setImage(Texture image)
      +
      Sets the image of this sprite.
      +
      +
      Parameters:
      +
      image - the new image
      +
      Returns:
      +
      this sprite
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      setFrames

      +
      public WSprite setFrames(Texture... frames)
      +
      Sets the animation frames of this sprite.
      +
      +
      Parameters:
      +
      frames - the frames
      +
      Returns:
      +
      this sprite
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      setTint

      +
      public WSprite setTint(int tint)
      +
      Sets the tint for this sprite to the following color-with-alpha. If you don't want to specify + alpha, use setOpaqueTint(int) instead.
      +
      +
      Parameters:
      +
      tint - the new tint
      +
      Returns:
      +
      this sprite
      +
      +
      +
    • +
    • +
      +

      setOpaqueTint

      +
      public WSprite setOpaqueTint(int tint)
      +
      Sets the tint for this sprite to the following opaque color.
      +
      +
      Parameters:
      +
      tint - the new tint
      +
      Returns:
      +
      this sprite
      +
      +
      +
    • +
    • +
      +

      setUv

      +
      public WSprite setUv(float u1, + float v1, + float u2, + float v2)
      +
      Sets the UV values of this sprite.
      +
      +
      Parameters:
      +
      u1 - the left edge of the texture
      +
      v1 - the top edge of the texture
      +
      u2 - the right edge of the texture
      +
      v2 - the bottom edge of the texture
      +
      Returns:
      +
      this sprite
      +
      Since:
      +
      1.8.0
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      paintFrame

      +
      @Environment(CLIENT) +protected void paintFrame(DrawContext context, + int x, + int y, + Texture texture)
      +
      Paints a single frame for this sprite.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate to draw it at
      +
      y - the Y coordinate to draw it at
      +
      texture - the texture to draw
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.Builder.html b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.Builder.html index 33eae1a..b135e71 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.Builder.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.Builder.html @@ -1,258 +1,259 @@ - - - - -WTabPanel.Tab.Builder (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WTabPanel.Tab.Builder

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
-
-
-
-
Enclosing class:
-
WTabPanel.Tab
-
-
-
public static final class WTabPanel.Tab.Builder -extends Object
-
A builder for tab data.
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Builder

      -
      public Builder(WWidget widget)
      -
      Constructs a new tab data builder.
      -
      -
      Parameters:
      -
      widget - the contained widget
      -
      Throws:
      -
      NullPointerException - if the widget is null
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - + + + + +WTabPanel.Tab.Builder (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WTabPanel.Tab.Builder

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
+
+
+
+
Enclosing class:
+
WTabPanel.Tab
+
+
+
public static final class WTabPanel.Tab.Builder +extends Object
+
A builder for tab data.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Builder

      +
      public Builder(WWidget widget)
      +
      Constructs a new tab data builder.
      +
      +
      Parameters:
      +
      widget - the contained widget
      +
      Throws:
      +
      NullPointerException - if the widget is null
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.html b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.html index 26fdf8a..dfa7421 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.Tab.html @@ -1,210 +1,211 @@ - - - - -WTabPanel.Tab (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WTabPanel.Tab

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
-
-
-
-
Enclosing class:
-
WTabPanel
-
-
-
public static class WTabPanel.Tab -extends Object
-
The data of a tab.
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getTitle

      -
      @Nullable -public @Nullable Text getTitle()
      -
      Gets the title of this tab.
      -
      -
      Returns:
      -
      the title, or null if there's no title
      -
      -
      -
    • -
    • -
      -

      getIcon

      -
      @Nullable -public @Nullable Icon getIcon()
      -
      Gets the icon of this tab.
      -
      -
      Returns:
      -
      the icon, or null if there's no title
      -
      -
      -
    • -
    • -
      -

      getWidget

      -
      public WWidget getWidget()
      -
      Gets the contained widget of this tab.
      -
      -
      Returns:
      -
      the contained widget
      -
      -
      -
    • -
    • -
      -

      addTooltip

      -
      @Environment(CLIENT) -public void addTooltip(TooltipBuilder tooltip)
      -
      Adds this widget's tooltip to the tooltip builder.
      -
      -
      Parameters:
      -
      tooltip - the tooltip builder
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WTabPanel.Tab (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WTabPanel.Tab

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab
+
+
+
+
Enclosing class:
+
WTabPanel
+
+
+
public static class WTabPanel.Tab +extends Object
+
The data of a tab.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getTitle

      +
      @Nullable +public @Nullable Text getTitle()
      +
      Gets the title of this tab.
      +
      +
      Returns:
      +
      the title, or null if there's no title
      +
      +
      +
    • +
    • +
      +

      getIcon

      +
      @Nullable +public @Nullable Icon getIcon()
      +
      Gets the icon of this tab.
      +
      +
      Returns:
      +
      the icon, or null if there's no title
      +
      +
      +
    • +
    • +
      +

      getWidget

      +
      public WWidget getWidget()
      +
      Gets the contained widget of this tab.
      +
      +
      Returns:
      +
      the contained widget
      +
      +
      +
    • +
    • +
      +

      addTooltip

      +
      @Environment(CLIENT) +public void addTooltip(TooltipBuilder tooltip)
      +
      Adds this widget's tooltip to the tooltip builder.
      +
      +
      Parameters:
      +
      tooltip - the tooltip builder
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.html b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.html index 3370a30..26a3017 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WTabPanel.html @@ -1,377 +1,378 @@ - - - - -WTabPanel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WTabPanel

-
- -
-
-
public class WTabPanel -extends WPanel
-
A panel that contains creative inventory-style tabs on the top.
-
-
Since:
-
3.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WTabPanel

      -
      public WTabPanel()
      -
      Constructs a new tab panel.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      add

      -
      public void add(WTabPanel.Tab tab)
      -
      Adds a tab to this panel.
      -
      -
      Parameters:
      -
      tab - the added tab
      -
      -
      -
    • -
    • -
      -

      add

      -
      public void add(WWidget widget, - Consumer<WTabPanel.Tab.Builder> configurator)
      -
      Configures and adds a tab to this panel.
      -
      -
      Parameters:
      -
      widget - the contained widget
      -
      configurator - the tab configurator
      -
      -
      -
    • -
    • -
      -

      getSelectedTab

      -
      public WTabPanel.Tab getSelectedTab()
      -
      Returns the currently open tab's data.
      -
      -
      Returns:
      -
      the currently open tab's data
      -
      Since:
      -
      6.3.0
      -
      -
      -
    • -
    • -
      -

      setSelectedTab

      -
      @Contract("null -> fail; _ -> this") -public WTabPanel setSelectedTab(WTabPanel.Tab tab)
      -
      Sets the currently open tab to the provided WTabPanel.Tab.
      -
      -
      Parameters:
      -
      tab - the tab to open, cannot be null
      -
      Returns:
      -
      this tab panel
      -
      Throws:
      -
      NoSuchElementException - if the tab is not in this panel
      -
      Since:
      -
      6.3.0
      -
      -
      -
    • -
    • -
      -

      getSelectedIndex

      -
      public int getSelectedIndex()
      -
      Returns the index of the currently open tab.
      -
      -
      Returns:
      -
      the index of the currently open tab
      -
      Since:
      -
      6.3.0
      -
      -
      -
    • -
    • -
      -

      setSelectedIndex

      -
      @Contract("_ -> this") -public WTabPanel setSelectedIndex(int tabIndex)
      -
      Sets the currently open tab by its index.
      -
      -
      Parameters:
      -
      tabIndex - the 0-based index of the tab to select, in order of adding
      -
      Returns:
      -
      this tab panel
      -
      Throws:
      -
      IndexOutOfBoundsException - if the tab index is invalid for this tab panel
      -
      Since:
      -
      6.3.0
      -
      -
      -
    • -
    • -
      -

      getTabCount

      -
      public int getTabCount()
      -
      Returns the number of tabs in this tab panel.
      -
      -
      Returns:
      -
      the number of tabs in this tab panel
      -
      Since:
      -
      6.3.0
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Description copied from class: WPanel
      -
      Adds the default background painters to this widget and all children. - -

      Always called before GuiDescription.addPainters() to allow users to modify painters. - -

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      -
      -
      Overrides:
      -
      addPainters in class WPanel
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WTabPanel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WTabPanel

+
+ +
+
+
public class WTabPanel +extends WPanel
+
A panel that contains creative inventory-style tabs on the top.
+
+
Since:
+
3.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WTabPanel

      +
      public WTabPanel()
      +
      Constructs a new tab panel.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(WTabPanel.Tab tab)
      +
      Adds a tab to this panel.
      +
      +
      Parameters:
      +
      tab - the added tab
      +
      +
      +
    • +
    • +
      +

      add

      +
      public void add(WWidget widget, + Consumer<WTabPanel.Tab.Builder> configurator)
      +
      Configures and adds a tab to this panel.
      +
      +
      Parameters:
      +
      widget - the contained widget
      +
      configurator - the tab configurator
      +
      +
      +
    • +
    • +
      +

      getSelectedTab

      +
      public WTabPanel.Tab getSelectedTab()
      +
      Returns the currently open tab's data.
      +
      +
      Returns:
      +
      the currently open tab's data
      +
      Since:
      +
      6.3.0
      +
      +
      +
    • +
    • +
      +

      setSelectedTab

      +
      @Contract("null -> fail; _ -> this") +public WTabPanel setSelectedTab(WTabPanel.Tab tab)
      +
      Sets the currently open tab to the provided WTabPanel.Tab.
      +
      +
      Parameters:
      +
      tab - the tab to open, cannot be null
      +
      Returns:
      +
      this tab panel
      +
      Throws:
      +
      NoSuchElementException - if the tab is not in this panel
      +
      Since:
      +
      6.3.0
      +
      +
      +
    • +
    • +
      +

      getSelectedIndex

      +
      public int getSelectedIndex()
      +
      Returns the index of the currently open tab.
      +
      +
      Returns:
      +
      the index of the currently open tab
      +
      Since:
      +
      6.3.0
      +
      +
      +
    • +
    • +
      +

      setSelectedIndex

      +
      @Contract("_ -> this") +public WTabPanel setSelectedIndex(int tabIndex)
      +
      Sets the currently open tab by its index.
      +
      +
      Parameters:
      +
      tabIndex - the 0-based index of the tab to select, in order of adding
      +
      Returns:
      +
      this tab panel
      +
      Throws:
      +
      IndexOutOfBoundsException - if the tab index is invalid for this tab panel
      +
      Since:
      +
      6.3.0
      +
      +
      +
    • +
    • +
      +

      getTabCount

      +
      public int getTabCount()
      +
      Returns the number of tabs in this tab panel.
      +
      +
      Returns:
      +
      the number of tabs in this tab panel
      +
      Since:
      +
      6.3.0
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Description copied from class: WPanel
      +
      Adds the default background painters to this widget and all children. + +

      Always called before GuiDescription.addPainters() to allow users to modify painters. + +

      Subclasses should call super.addPainters() to ensure that children have proper default painters.

      +
      +
      Overrides:
      +
      addPainters in class WPanel
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WText.html b/libgui/io/github/cottonmc/cotton/gui/widget/WText.html index 2824760..acc99e2 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WText.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WText.html @@ -1,604 +1,605 @@ - - - - -WText (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WText

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WText
-
-
-
-
-
public class WText -extends WWidget
-
A multiline label widget.
-
-
Since:
-
1.8.0
-
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      text

      -
      protected Text text
      -
      -
    • -
    • -
      -

      color

      -
      protected int color
      -
      -
    • -
    • -
      -

      darkmodeColor

      -
      protected int darkmodeColor
      -
      -
    • -
    • -
      -

      horizontalAlignment

      -
      protected HorizontalAlignment horizontalAlignment
      -
      -
    • -
    • -
      -

      verticalAlignment

      -
      protected VerticalAlignment verticalAlignment
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WText

      -
      public WText(Text text)
      -
      -
    • -
    • -
      -

      WText

      -
      public WText(Text text, - int color)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      getTextStyleAt

      -
      @Environment(CLIENT) -@Nullable -public @Nullable Style getTextStyleAt(int x, - int y)
      -
      Gets the text style at the specific widget-space coordinates.
      -
      -
      Parameters:
      -
      x - the X coordinate in widget space
      -
      y - the Y coordinate in widget space
      -
      Returns:
      -
      the text style at the position, or null if not found
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getText

      -
      public Text getText()
      -
      Gets the text of this label.
      -
      -
      Returns:
      -
      the text
      -
      -
      -
    • -
    • -
      -

      setText

      -
      public WText setText(Text text)
      -
      Sets the text of this label.
      -
      -
      Parameters:
      -
      text - the new text
      -
      Returns:
      -
      this label
      -
      -
      -
    • -
    • -
      -

      getColor

      -
      public int getColor()
      -
      Gets the light mode color of this label.
      -
      -
      Returns:
      -
      the color
      -
      -
      -
    • -
    • -
      -

      setColor

      -
      public WText setColor(int color)
      -
      Sets the light mode color of this label.
      -
      -
      Parameters:
      -
      color - the new color
      -
      Returns:
      -
      this text widget
      -
      -
      -
    • -
    • -
      -

      getDarkmodeColor

      -
      public int getDarkmodeColor()
      -
      Gets the dark mode color of this label.
      -
      -
      Returns:
      -
      the color
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setDarkmodeColor

      -
      public WText setDarkmodeColor(int darkmodeColor)
      -
      Sets the dark mode color of this label.
      -
      -
      Parameters:
      -
      darkmodeColor - the new color
      -
      Returns:
      -
      this text widget
      -
      -
      -
    • -
    • -
      -

      setColor

      -
      public WText setColor(int color, - int darkmodeColor)
      -
      Sets the light and dark mode colors of this label.
      -
      -
      Parameters:
      -
      color - the new light color
      -
      darkmodeColor - the new dark color
      -
      Returns:
      -
      this text widget
      -
      -
      -
    • -
    • -
      -

      disableDarkmode

      -
      public WText disableDarkmode()
      -
      Disables separate dark mode coloring by copying the dark color to be the light color.
      -
      -
      Returns:
      -
      this text widget
      -
      -
      -
    • -
    • -
      -

      getHorizontalAlignment

      -
      public HorizontalAlignment getHorizontalAlignment()
      -
      Gets the horizontal alignment of this text widget.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      1.9.0
      -
      -
      -
    • -
    • -
      -

      setHorizontalAlignment

      -
      public WText setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
      -
      Sets the horizontal alignment of this text widget.
      -
      -
      Parameters:
      -
      horizontalAlignment - the new alignment
      -
      Returns:
      -
      this widget
      -
      Since:
      -
      1.9.0
      -
      -
      -
    • -
    • -
      -

      getVerticalAlignment

      -
      public VerticalAlignment getVerticalAlignment()
      -
      Gets the vertical alignment of this text widget.
      -
      -
      Returns:
      -
      the alignment
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setVerticalAlignment

      -
      public WText setVerticalAlignment(VerticalAlignment verticalAlignment)
      -
      Sets the vertical alignment of this text widget.
      -
      -
      Parameters:
      -
      verticalAlignment - the new alignment
      -
      Returns:
      -
      this widget
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WText (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WText

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WText
+
+
+
+
+
public class WText +extends WWidget
+
A multiline label widget.
+
+
Since:
+
1.8.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      text

      +
      protected Text text
      +
      +
    • +
    • +
      +

      color

      +
      protected int color
      +
      +
    • +
    • +
      +

      darkmodeColor

      +
      protected int darkmodeColor
      +
      +
    • +
    • +
      +

      horizontalAlignment

      +
      protected HorizontalAlignment horizontalAlignment
      +
      +
    • +
    • +
      +

      verticalAlignment

      +
      protected VerticalAlignment verticalAlignment
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WText

      +
      public WText(Text text)
      +
      +
    • +
    • +
      +

      WText

      +
      public WText(Text text, + int color)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      getTextStyleAt

      +
      @Environment(CLIENT) +@Nullable +public @Nullable Style getTextStyleAt(int x, + int y)
      +
      Gets the text style at the specific widget-space coordinates.
      +
      +
      Parameters:
      +
      x - the X coordinate in widget space
      +
      y - the Y coordinate in widget space
      +
      Returns:
      +
      the text style at the position, or null if not found
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getText

      +
      public Text getText()
      +
      Gets the text of this label.
      +
      +
      Returns:
      +
      the text
      +
      +
      +
    • +
    • +
      +

      setText

      +
      public WText setText(Text text)
      +
      Sets the text of this label.
      +
      +
      Parameters:
      +
      text - the new text
      +
      Returns:
      +
      this label
      +
      +
      +
    • +
    • +
      +

      getColor

      +
      public int getColor()
      +
      Gets the light mode color of this label.
      +
      +
      Returns:
      +
      the color
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public WText setColor(int color)
      +
      Sets the light mode color of this label.
      +
      +
      Parameters:
      +
      color - the new color
      +
      Returns:
      +
      this text widget
      +
      +
      +
    • +
    • +
      +

      getDarkmodeColor

      +
      public int getDarkmodeColor()
      +
      Gets the dark mode color of this label.
      +
      +
      Returns:
      +
      the color
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setDarkmodeColor

      +
      public WText setDarkmodeColor(int darkmodeColor)
      +
      Sets the dark mode color of this label.
      +
      +
      Parameters:
      +
      darkmodeColor - the new color
      +
      Returns:
      +
      this text widget
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public WText setColor(int color, + int darkmodeColor)
      +
      Sets the light and dark mode colors of this label.
      +
      +
      Parameters:
      +
      color - the new light color
      +
      darkmodeColor - the new dark color
      +
      Returns:
      +
      this text widget
      +
      +
      +
    • +
    • +
      +

      disableDarkmode

      +
      public WText disableDarkmode()
      +
      Disables separate dark mode coloring by copying the dark color to be the light color.
      +
      +
      Returns:
      +
      this text widget
      +
      +
      +
    • +
    • +
      +

      getHorizontalAlignment

      +
      public HorizontalAlignment getHorizontalAlignment()
      +
      Gets the horizontal alignment of this text widget.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      1.9.0
      +
      +
      +
    • +
    • +
      +

      setHorizontalAlignment

      +
      public WText setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
      +
      Sets the horizontal alignment of this text widget.
      +
      +
      Parameters:
      +
      horizontalAlignment - the new alignment
      +
      Returns:
      +
      this widget
      +
      Since:
      +
      1.9.0
      +
      +
      +
    • +
    • +
      +

      getVerticalAlignment

      +
      public VerticalAlignment getVerticalAlignment()
      +
      Gets the vertical alignment of this text widget.
      +
      +
      Returns:
      +
      the alignment
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setVerticalAlignment

      +
      public WText setVerticalAlignment(VerticalAlignment verticalAlignment)
      +
      Sets the vertical alignment of this text widget.
      +
      +
      Parameters:
      +
      verticalAlignment - the new alignment
      +
      Returns:
      +
      this widget
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WTextField.html b/libgui/io/github/cottonmc/cotton/gui/widget/WTextField.html index e8b2374..4b21542 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WTextField.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WTextField.html @@ -1,775 +1,776 @@ - - - - -WTextField (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WTextField

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WTextField
-
-
-
-
-
public class WTextField -extends WWidget
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      TEXT_PADDING_X

      -
      public static final int TEXT_PADDING_X
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      TEXT_PADDING_Y

      -
      public static final int TEXT_PADDING_Y
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      CURSOR_PADDING_Y

      -
      public static final int CURSOR_PADDING_Y
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      CURSOR_HEIGHT

      -
      public static final int CURSOR_HEIGHT
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WTextField

      -
      public WTextField()
      -
      -
    • -
    • -
      -

      WTextField

      -
      public WTextField(Text suggestion)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setText

      -
      public void setText(String s)
      -
      Sets the text of this text field. - If the text is more than the max length, - it'll be shortened to the max length.
      -
      -
      Parameters:
      -
      s - the new text
      -
      -
      -
    • -
    • -
      -

      getText

      -
      public String getText()
      -
      Returns the text in this text field.
      -
      -
      Returns:
      -
      the text in this text field
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      tick

      -
      public void tick()
      -
      Description copied from class: WWidget
      -
      Executes a client-side tick for this widget.
      -
      -
      Overrides:
      -
      tick in class WWidget
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Description copied from class: WWidget
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Overrides:
      -
      setSize in class WWidget
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      setCursorPos

      -
      public void setCursorPos(int location)
      -
      -
    • -
    • -
      -

      getMaxLength

      -
      public int getMaxLength()
      -
      -
    • -
    • -
      -

      getCursor

      -
      public int getCursor()
      -
      -
    • -
    • -
      -

      scrollCursorIntoView

      -
      @Environment(CLIENT) -public void scrollCursorIntoView()
      -
      -
    • -
    • -
      -

      getSelection

      -
      @Nullable -public @Nullable String getSelection()
      -
      -
    • -
    • -
      -

      isEditable

      -
      public boolean isEditable()
      -
      -
    • -
    • -
      -

      renderBox

      -
      @Environment(CLIENT) -protected void renderBox(DrawContext context, - int x, - int y)
      -
      -
    • -
    • -
      -

      renderText

      -
      @Environment(CLIENT) -protected void renderText(DrawContext context, - int x, - int y, - String visibleText)
      -
      -
    • -
    • -
      -

      renderCursor

      -
      @Environment(CLIENT) -protected void renderCursor(DrawContext context, - int x, - int y, - String visibleText)
      -
      -
    • -
    • -
      -

      renderSuggestion

      -
      @Environment(CLIENT) -protected void renderSuggestion(DrawContext context, - int x, - int y)
      -
      -
    • -
    • -
      -

      renderSelection

      -
      @Environment(CLIENT) -protected void renderSelection(DrawContext context, - int x, - int y, - String visibleText)
      -
      -
    • -
    • -
      -

      renderTextField

      -
      @Environment(CLIENT) -protected void renderTextField(DrawContext context, - int x, - int y)
      -
      -
    • -
    • -
      -

      setTextPredicate

      -
      public WTextField setTextPredicate(Predicate<String> predicate_1)
      -
      -
    • -
    • -
      -

      setChangedListener

      -
      public WTextField setChangedListener(Consumer<String> listener)
      -
      -
    • -
    • -
      -

      setMaxLength

      -
      public WTextField setMaxLength(int max)
      -
      -
    • -
    • -
      -

      setEnabledColor

      -
      public WTextField setEnabledColor(int col)
      -
      -
    • -
    • -
      -

      setSuggestionColor

      -
      public WTextField setSuggestionColor(int suggestionColor)
      -
      -
    • -
    • -
      -

      setDisabledColor

      -
      public WTextField setDisabledColor(int col)
      -
      -
    • -
    • -
      -

      setEditable

      -
      public WTextField setEditable(boolean editable)
      -
      -
    • -
    • -
      -

      getSuggestion

      -
      @Nullable -public @Nullable Text getSuggestion()
      -
      -
    • -
    • -
      -

      setSuggestion

      -
      public WTextField setSuggestion(@Nullable - @Nullable Text suggestion)
      -
      -
    • -
    • -
      -

      setBackgroundPainter

      -
      @Environment(CLIENT) -public WTextField setBackgroundPainter(BackgroundPainter painter)
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      onFocusGained

      -
      public void onFocusGained()
      -
      Description copied from class: WWidget
      -
      Notifies this widget that it has gained focus
      -
      -
      Overrides:
      -
      onFocusGained in class WWidget
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      getCaretPosition

      -
      @Environment(CLIENT) -public int getCaretPosition(int clickX)
      -
      -
    • -
    • -
      -

      onCharTyped

      -
      @Environment(CLIENT) -public InputResult onCharTyped(char ch)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a character has been typed. This method is subject to key repeat, - and may be called for characters that do not directly have a corresponding keyboard key.
      -
      -
      Overrides:
      -
      onCharTyped in class WWidget
      -
      Parameters:
      -
      ch - the character typed
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onDirectionalKey

      -
      @Environment(CLIENT) -public void onDirectionalKey(int direction, - int modifiers)
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      @Environment(CLIENT) -public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WTextField (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WTextField

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WTextField
+
+
+
+
+
public class WTextField +extends WWidget
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      TEXT_PADDING_X

      +
      public static final int TEXT_PADDING_X
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TEXT_PADDING_Y

      +
      public static final int TEXT_PADDING_Y
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      CURSOR_PADDING_Y

      +
      public static final int CURSOR_PADDING_Y
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      CURSOR_HEIGHT

      +
      public static final int CURSOR_HEIGHT
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WTextField

      +
      public WTextField()
      +
      +
    • +
    • +
      +

      WTextField

      +
      public WTextField(Text suggestion)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setText

      +
      public void setText(String s)
      +
      Sets the text of this text field. + If the text is more than the max length, + it'll be shortened to the max length.
      +
      +
      Parameters:
      +
      s - the new text
      +
      +
      +
    • +
    • +
      +

      getText

      +
      public String getText()
      +
      Returns the text in this text field.
      +
      +
      Returns:
      +
      the text in this text field
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      tick

      +
      public void tick()
      +
      Description copied from class: WWidget
      +
      Executes a client-side tick for this widget.
      +
      +
      Overrides:
      +
      tick in class WWidget
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Description copied from class: WWidget
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Overrides:
      +
      setSize in class WWidget
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      setCursorPos

      +
      public void setCursorPos(int location)
      +
      +
    • +
    • +
      +

      getMaxLength

      +
      public int getMaxLength()
      +
      +
    • +
    • +
      +

      getCursor

      +
      public int getCursor()
      +
      +
    • +
    • +
      +

      scrollCursorIntoView

      +
      @Environment(CLIENT) +public void scrollCursorIntoView()
      +
      +
    • +
    • +
      +

      getSelection

      +
      @Nullable +public @Nullable String getSelection()
      +
      +
    • +
    • +
      +

      isEditable

      +
      public boolean isEditable()
      +
      +
    • +
    • +
      +

      renderBox

      +
      @Environment(CLIENT) +protected void renderBox(DrawContext context, + int x, + int y)
      +
      +
    • +
    • +
      +

      renderText

      +
      @Environment(CLIENT) +protected void renderText(DrawContext context, + int x, + int y, + String visibleText)
      +
      +
    • +
    • +
      +

      renderCursor

      +
      @Environment(CLIENT) +protected void renderCursor(DrawContext context, + int x, + int y, + String visibleText)
      +
      +
    • +
    • +
      +

      renderSuggestion

      +
      @Environment(CLIENT) +protected void renderSuggestion(DrawContext context, + int x, + int y)
      +
      +
    • +
    • +
      +

      renderSelection

      +
      @Environment(CLIENT) +protected void renderSelection(DrawContext context, + int x, + int y, + String visibleText)
      +
      +
    • +
    • +
      +

      renderTextField

      +
      @Environment(CLIENT) +protected void renderTextField(DrawContext context, + int x, + int y)
      +
      +
    • +
    • +
      +

      setTextPredicate

      +
      public WTextField setTextPredicate(Predicate<String> predicate_1)
      +
      +
    • +
    • +
      +

      setChangedListener

      +
      public WTextField setChangedListener(Consumer<String> listener)
      +
      +
    • +
    • +
      +

      setMaxLength

      +
      public WTextField setMaxLength(int max)
      +
      +
    • +
    • +
      +

      setEnabledColor

      +
      public WTextField setEnabledColor(int col)
      +
      +
    • +
    • +
      +

      setSuggestionColor

      +
      public WTextField setSuggestionColor(int suggestionColor)
      +
      +
    • +
    • +
      +

      setDisabledColor

      +
      public WTextField setDisabledColor(int col)
      +
      +
    • +
    • +
      +

      setEditable

      +
      public WTextField setEditable(boolean editable)
      +
      +
    • +
    • +
      +

      getSuggestion

      +
      @Nullable +public @Nullable Text getSuggestion()
      +
      +
    • +
    • +
      +

      setSuggestion

      +
      public WTextField setSuggestion(@Nullable + @Nullable Text suggestion)
      +
      +
    • +
    • +
      +

      setBackgroundPainter

      +
      @Environment(CLIENT) +public WTextField setBackgroundPainter(BackgroundPainter painter)
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      onFocusGained

      +
      public void onFocusGained()
      +
      Description copied from class: WWidget
      +
      Notifies this widget that it has gained focus
      +
      +
      Overrides:
      +
      onFocusGained in class WWidget
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      getCaretPosition

      +
      @Environment(CLIENT) +public int getCaretPosition(int clickX)
      +
      +
    • +
    • +
      +

      onCharTyped

      +
      @Environment(CLIENT) +public InputResult onCharTyped(char ch)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a character has been typed. This method is subject to key repeat, + and may be called for characters that do not directly have a corresponding keyboard key.
      +
      +
      Overrides:
      +
      onCharTyped in class WWidget
      +
      Parameters:
      +
      ch - the character typed
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onDirectionalKey

      +
      @Environment(CLIENT) +public void onDirectionalKey(int direction, + int modifiers)
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      @Environment(CLIENT) +public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WTiledSprite.html b/libgui/io/github/cottonmc/cotton/gui/widget/WTiledSprite.html index 9faf233..7db7767 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WTiledSprite.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WTiledSprite.html @@ -1,385 +1,386 @@ - - - - -WTiledSprite (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WTiledSprite

-
- -
-
-
public class WTiledSprite -extends WSprite
-
A sprite whose texture will be tiled.
-
-
Since:
-
2.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WTiledSprite

      -
      public WTiledSprite(int tileWidth, - int tileHeight, - Identifier image)
      -
      Create a tiled sprite.
      -
      -
      Parameters:
      -
      tileWidth - The width a tile
      -
      tileHeight - The height of a tile
      -
      image - The image to tile
      -
      -
      -
    • -
    • -
      -

      WTiledSprite

      -
      public WTiledSprite(int tileWidth, - int tileHeight, - int frameTime, - Identifier... frames)
      -
      Create a new animated tiled sprite.
      -
      -
      Parameters:
      -
      tileWidth - The width a tile
      -
      tileHeight - The height of a tile
      -
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      -
      frames - The locations of the frames of the animation.
      -
      -
      -
    • -
    • -
      -

      WTiledSprite

      -
      public WTiledSprite(int tileWidth, - int tileHeight, - Texture image)
      -
      Create a tiled sprite.
      -
      -
      Parameters:
      -
      tileWidth - The width a tile
      -
      tileHeight - The height of a tile
      -
      image - The image to tile
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      WTiledSprite

      -
      public WTiledSprite(int tileWidth, - int tileHeight, - int frameTime, - Texture... frames)
      -
      Create a new animated tiled sprite.
      -
      -
      Parameters:
      -
      tileWidth - The width a tile
      -
      tileHeight - The height of a tile
      -
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      -
      frames - The locations of the frames of the animation.
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setTileSize

      -
      public void setTileSize(int width, - int height)
      -
      Sets the tiling size. This determines how often the texture will repeat.
      -
      -
      Parameters:
      -
      width - the new tiling width
      -
      height - the new tiling height
      -
      -
      -
    • -
    • -
      -

      getTileWidth

      -
      public int getTileWidth()
      -
      Gets the tile width of this sprite.
      -
      -
      Returns:
      -
      the tile width
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      getTileHeight

      -
      public int getTileHeight()
      -
      Gets the tile height of this sprite.
      -
      -
      Returns:
      -
      the tile height
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      setTileWidth

      -
      public WTiledSprite setTileWidth(int tileWidth)
      -
      Sets the tile width of this sprite.
      -
      -
      Parameters:
      -
      tileWidth - the new tile width
      -
      Returns:
      -
      this sprite
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      setTileHeight

      -
      public WTiledSprite setTileHeight(int tileHeight)
      -
      Sets the tile height of this sprite.
      -
      -
      Parameters:
      -
      tileHeight - the new tile height
      -
      Returns:
      -
      this sprite
      -
      Since:
      -
      2.2.0
      -
      -
      -
    • -
    • -
      -

      paintFrame

      -
      @Environment(CLIENT) -public void paintFrame(DrawContext context, - int x, - int y, - Texture texture)
      -
      Description copied from class: WSprite
      -
      Paints a single frame for this sprite.
      -
      -
      Overrides:
      -
      paintFrame in class WSprite
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate to draw it at
      -
      y - the Y coordinate to draw it at
      -
      texture - the texture to draw
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WTiledSprite (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WTiledSprite

+
+ +
+
+
public class WTiledSprite +extends WSprite
+
A sprite whose texture will be tiled.
+
+
Since:
+
2.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WTiledSprite

      +
      public WTiledSprite(int tileWidth, + int tileHeight, + Identifier image)
      +
      Create a tiled sprite.
      +
      +
      Parameters:
      +
      tileWidth - The width a tile
      +
      tileHeight - The height of a tile
      +
      image - The image to tile
      +
      +
      +
    • +
    • +
      +

      WTiledSprite

      +
      public WTiledSprite(int tileWidth, + int tileHeight, + int frameTime, + Identifier... frames)
      +
      Create a new animated tiled sprite.
      +
      +
      Parameters:
      +
      tileWidth - The width a tile
      +
      tileHeight - The height of a tile
      +
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      +
      frames - The locations of the frames of the animation.
      +
      +
      +
    • +
    • +
      +

      WTiledSprite

      +
      public WTiledSprite(int tileWidth, + int tileHeight, + Texture image)
      +
      Create a tiled sprite.
      +
      +
      Parameters:
      +
      tileWidth - The width a tile
      +
      tileHeight - The height of a tile
      +
      image - The image to tile
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      WTiledSprite

      +
      public WTiledSprite(int tileWidth, + int tileHeight, + int frameTime, + Texture... frames)
      +
      Create a new animated tiled sprite.
      +
      +
      Parameters:
      +
      tileWidth - The width a tile
      +
      tileHeight - The height of a tile
      +
      frameTime - How long in milliseconds to display for. (1 tick = 50 ms)
      +
      frames - The locations of the frames of the animation.
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setTileSize

      +
      public void setTileSize(int width, + int height)
      +
      Sets the tiling size. This determines how often the texture will repeat.
      +
      +
      Parameters:
      +
      width - the new tiling width
      +
      height - the new tiling height
      +
      +
      +
    • +
    • +
      +

      getTileWidth

      +
      public int getTileWidth()
      +
      Gets the tile width of this sprite.
      +
      +
      Returns:
      +
      the tile width
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      getTileHeight

      +
      public int getTileHeight()
      +
      Gets the tile height of this sprite.
      +
      +
      Returns:
      +
      the tile height
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      setTileWidth

      +
      public WTiledSprite setTileWidth(int tileWidth)
      +
      Sets the tile width of this sprite.
      +
      +
      Parameters:
      +
      tileWidth - the new tile width
      +
      Returns:
      +
      this sprite
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      setTileHeight

      +
      public WTiledSprite setTileHeight(int tileHeight)
      +
      Sets the tile height of this sprite.
      +
      +
      Parameters:
      +
      tileHeight - the new tile height
      +
      Returns:
      +
      this sprite
      +
      Since:
      +
      2.2.0
      +
      +
      +
    • +
    • +
      +

      paintFrame

      +
      @Environment(CLIENT) +public void paintFrame(DrawContext context, + int x, + int y, + Texture texture)
      +
      Description copied from class: WSprite
      +
      Paints a single frame for this sprite.
      +
      +
      Overrides:
      +
      paintFrame in class WSprite
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate to draw it at
      +
      y - the Y coordinate to draw it at
      +
      texture - the texture to draw
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WToggleButton.html b/libgui/io/github/cottonmc/cotton/gui/widget/WToggleButton.html index 0d4a621..b62ac34 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WToggleButton.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WToggleButton.html @@ -1,655 +1,656 @@ - - - - -WToggleButton (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WToggleButton

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget -
io.github.cottonmc.cotton.gui.widget.WToggleButton
-
-
-
-
-
public class WToggleButton -extends WWidget
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      DEFAULT_OFF_IMAGE

      -
      protected static final Texture DEFAULT_OFF_IMAGE
      -
      -
    • -
    • -
      -

      DEFAULT_ON_IMAGE

      -
      protected static final Texture DEFAULT_ON_IMAGE
      -
      -
    • -
    • -
      -

      DEFAULT_FOCUS_IMAGE

      -
      protected static final Texture DEFAULT_FOCUS_IMAGE
      -
      -
    • -
    • -
      -

      onImage

      -
      protected Texture onImage
      -
      -
    • -
    • -
      -

      offImage

      -
      protected Texture offImage
      -
      -
    • -
    • -
      -

      focusImage

      -
      protected Texture focusImage
      -
      -
    • -
    • -
      -

      label

      -
      @Nullable -protected @Nullable Text label
      -
      -
    • -
    • -
      -

      isOn

      -
      protected boolean isOn
      -
      -
    • -
    • -
      -

      onToggle

      -
      @Nullable -protected @Nullable Consumer<Boolean> onToggle
      -
      -
    • -
    • -
      -

      color

      -
      protected int color
      -
      -
    • -
    • -
      -

      darkmodeColor

      -
      protected int darkmodeColor
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WToggleButton

      -
      public WToggleButton()
      -
      Constructs a toggle button with default images and no label.
      -
      -
    • -
    • -
      -

      WToggleButton

      -
      public WToggleButton(Text label)
      -
      Constructs a toggle button with default images.
      -
      -
      Parameters:
      -
      label - the button label
      -
      -
      -
    • -
    • -
      -

      WToggleButton

      -
      public WToggleButton(Identifier onImage, - Identifier offImage)
      -
      Constructs a toggle button with custom images and no label.
      -
      -
      Parameters:
      -
      onImage - the toggled on image
      -
      offImage - the toggled off image
      -
      -
      -
    • -
    • -
      -

      WToggleButton

      -
      public WToggleButton(Identifier onImage, - Identifier offImage, - Text label)
      -
      Constructs a toggle button with custom images.
      -
      -
      Parameters:
      -
      onImage - the toggled on image
      -
      offImage - the toggled off image
      -
      label - the button label
      -
      -
      -
    • -
    • -
      -

      WToggleButton

      -
      public WToggleButton(Texture onImage, - Texture offImage)
      -
      Constructs a toggle button with custom images and no label.
      -
      -
      Parameters:
      -
      onImage - the toggled on image
      -
      offImage - the toggled off image
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      WToggleButton

      -
      public WToggleButton(Texture onImage, - Texture offImage, - Text label)
      -
      Constructs a toggle button with custom images.
      -
      -
      Parameters:
      -
      onImage - the toggled on image
      -
      offImage - the toggled off image
      -
      label - the button label
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Description copied from class: WWidget
      -
      Paints this widget.
      -
      -
      Overrides:
      -
      paint in class WWidget
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Description copied from class: WWidget
      -
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      -
      -
      Overrides:
      -
      canResize in class WWidget
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Description copied from class: WWidget
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Overrides:
      -
      canFocus in class WWidget
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Overrides:
      -
      onClick in class WWidget
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Description copied from class: WWidget
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Overrides:
      -
      onKeyPressed in class WWidget
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onToggle

      -
      protected void onToggle(boolean on)
      -
      -
    • -
    • -
      -

      getToggle

      -
      public boolean getToggle()
      -
      -
    • -
    • -
      -

      setToggle

      -
      public void setToggle(boolean on)
      -
      -
    • -
    • -
      -

      getOnToggle

      -
      @Nullable -public @Nullable Consumer<Boolean> getOnToggle()
      -
      -
    • -
    • -
      -

      setOnToggle

      -
      public WToggleButton setOnToggle(@Nullable - @Nullable Consumer<Boolean> onToggle)
      -
      -
    • -
    • -
      -

      getLabel

      -
      @Nullable -public @Nullable Text getLabel()
      -
      -
    • -
    • -
      -

      setLabel

      -
      public WToggleButton setLabel(@Nullable - @Nullable Text label)
      -
      -
    • -
    • -
      -

      setColor

      -
      public WToggleButton setColor(int light, - int dark)
      -
      -
    • -
    • -
      -

      getOnImage

      -
      public Texture getOnImage()
      -
      -
    • -
    • -
      -

      setOnImage

      -
      public WToggleButton setOnImage(Texture onImage)
      -
      -
    • -
    • -
      -

      getOffImage

      -
      public Texture getOffImage()
      -
      -
    • -
    • -
      -

      setOffImage

      -
      public WToggleButton setOffImage(Texture offImage)
      -
      -
    • -
    • -
      -

      getFocusImage

      -
      public Texture getFocusImage()
      -
      -
    • -
    • -
      -

      setFocusImage

      -
      public WToggleButton setFocusImage(Texture focusImage)
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Description copied from class: WWidget
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Overrides:
      -
      addNarrations in class WWidget
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WToggleButton (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WToggleButton

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget +
io.github.cottonmc.cotton.gui.widget.WToggleButton
+
+
+
+
+
public class WToggleButton +extends WWidget
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_OFF_IMAGE

      +
      protected static final Texture DEFAULT_OFF_IMAGE
      +
      +
    • +
    • +
      +

      DEFAULT_ON_IMAGE

      +
      protected static final Texture DEFAULT_ON_IMAGE
      +
      +
    • +
    • +
      +

      DEFAULT_FOCUS_IMAGE

      +
      protected static final Texture DEFAULT_FOCUS_IMAGE
      +
      +
    • +
    • +
      +

      onImage

      +
      protected Texture onImage
      +
      +
    • +
    • +
      +

      offImage

      +
      protected Texture offImage
      +
      +
    • +
    • +
      +

      focusImage

      +
      protected Texture focusImage
      +
      +
    • +
    • +
      +

      label

      +
      @Nullable +protected @Nullable Text label
      +
      +
    • +
    • +
      +

      isOn

      +
      protected boolean isOn
      +
      +
    • +
    • +
      +

      onToggle

      +
      @Nullable +protected @Nullable Consumer<Boolean> onToggle
      +
      +
    • +
    • +
      +

      color

      +
      protected int color
      +
      +
    • +
    • +
      +

      darkmodeColor

      +
      protected int darkmodeColor
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WToggleButton

      +
      public WToggleButton()
      +
      Constructs a toggle button with default images and no label.
      +
      +
    • +
    • +
      +

      WToggleButton

      +
      public WToggleButton(Text label)
      +
      Constructs a toggle button with default images.
      +
      +
      Parameters:
      +
      label - the button label
      +
      +
      +
    • +
    • +
      +

      WToggleButton

      +
      public WToggleButton(Identifier onImage, + Identifier offImage)
      +
      Constructs a toggle button with custom images and no label.
      +
      +
      Parameters:
      +
      onImage - the toggled on image
      +
      offImage - the toggled off image
      +
      +
      +
    • +
    • +
      +

      WToggleButton

      +
      public WToggleButton(Identifier onImage, + Identifier offImage, + Text label)
      +
      Constructs a toggle button with custom images.
      +
      +
      Parameters:
      +
      onImage - the toggled on image
      +
      offImage - the toggled off image
      +
      label - the button label
      +
      +
      +
    • +
    • +
      +

      WToggleButton

      +
      public WToggleButton(Texture onImage, + Texture offImage)
      +
      Constructs a toggle button with custom images and no label.
      +
      +
      Parameters:
      +
      onImage - the toggled on image
      +
      offImage - the toggled off image
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      WToggleButton

      +
      public WToggleButton(Texture onImage, + Texture offImage, + Text label)
      +
      Constructs a toggle button with custom images.
      +
      +
      Parameters:
      +
      onImage - the toggled on image
      +
      offImage - the toggled off image
      +
      label - the button label
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Description copied from class: WWidget
      +
      Paints this widget.
      +
      +
      Overrides:
      +
      paint in class WWidget
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Description copied from class: WWidget
      +
      Checks whether this widget can be resized using WWidget.setSize(int, int).
      +
      +
      Overrides:
      +
      canResize in class WWidget
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Description copied from class: WWidget
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Overrides:
      +
      canFocus in class WWidget
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Overrides:
      +
      onClick in class WWidget
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Description copied from class: WWidget
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Overrides:
      +
      onKeyPressed in class WWidget
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onToggle

      +
      protected void onToggle(boolean on)
      +
      +
    • +
    • +
      +

      getToggle

      +
      public boolean getToggle()
      +
      +
    • +
    • +
      +

      setToggle

      +
      public void setToggle(boolean on)
      +
      +
    • +
    • +
      +

      getOnToggle

      +
      @Nullable +public @Nullable Consumer<Boolean> getOnToggle()
      +
      +
    • +
    • +
      +

      setOnToggle

      +
      public WToggleButton setOnToggle(@Nullable + @Nullable Consumer<Boolean> onToggle)
      +
      +
    • +
    • +
      +

      getLabel

      +
      @Nullable +public @Nullable Text getLabel()
      +
      +
    • +
    • +
      +

      setLabel

      +
      public WToggleButton setLabel(@Nullable + @Nullable Text label)
      +
      +
    • +
    • +
      +

      setColor

      +
      public WToggleButton setColor(int light, + int dark)
      +
      +
    • +
    • +
      +

      getOnImage

      +
      public Texture getOnImage()
      +
      +
    • +
    • +
      +

      setOnImage

      +
      public WToggleButton setOnImage(Texture onImage)
      +
      +
    • +
    • +
      +

      getOffImage

      +
      public Texture getOffImage()
      +
      +
    • +
    • +
      +

      setOffImage

      +
      public WToggleButton setOffImage(Texture offImage)
      +
      +
    • +
    • +
      +

      getFocusImage

      +
      public Texture getFocusImage()
      +
      +
    • +
    • +
      +

      setFocusImage

      +
      public WToggleButton setFocusImage(Texture focusImage)
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Description copied from class: WWidget
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Overrides:
      +
      addNarrations in class WWidget
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/WWidget.html b/libgui/io/github/cottonmc/cotton/gui/widget/WWidget.html index fed1378..8a71918 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/WWidget.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/WWidget.html @@ -1,1215 +1,1216 @@ - - - - -WWidget (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class WWidget

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.WWidget
-
-
-
-
Direct Known Subclasses:
-
WAbstractSlider, WBar, WButton, WDynamicLabel, WItem, WItemSlot, WLabel, WPanel, WScrollBar, WSprite, WText, WTextField, WToggleButton
-
-
-
public class WWidget -extends Object
-
The base class for all widgets.
-
  • Property Summary

    Properties
    Modifier and Type
    Property
    Description
    public java.lang.Boolean
    Returns whether the user is hovering over this widget.
-
-
-
    - -
  • -
    -

    Field Summary

    -
    Fields
    -
    -
    Modifier and Type
    -
    Field
    -
    Description
    -
    protected int
    - -
    -
    The height of this widget, defaults to 18 pixels.
    -
    - - -
    -
    The containing GuiDescription of this widget.
    -
    -
    protected @Nullable WPanel
    - -
    -
    The containing panel of this widget.
    -
    -
    protected int
    - -
    -
    The width of this widget, defaults to 18 pixels.
    -
    -
    protected int
    - -
    -
    The X coordinate of this widget relative to its parent.
    -
    -
    protected int
    - -
    -
    The Y coordinate of this widget relative to its parent.
    -
    -
    -
    -
  • - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    - -
     
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    - -
    -
    Adds the narrations of this widget to a narration builder.
    -
    -
    void
    - -
    -
    Adds the default background painters to this widget and all children.
    -
    -
    void
    - -
    -
    Adds lines to this widget's tooltip.
    -
    -
    boolean
    - -
    -
    Tests whether this widget can have the focus in the GUI.
    -
    -
    boolean
    - -
    -
    Tests whether this widget receives mouse hovering status.
    -
    -
    boolean
    - -
    -
    Checks whether this widget can be resized using setSize(int, int).
    -
    -
    int
    - -
    -
    Gets the absolute X coordinate of this widget.
    -
    -
    int
    - -
    -
    Gets the absolute Y coordinate of this widget.
    -
    - - -
    -
    Returns the focus model of this widget.
    -
    -
    int
    - -
     
    - - -
    -
    Gets the host of this widget.
    -
    - - -
    -
    Gets the parent panel of this widget.
    -
    -
    int
    - -
     
    -
    int
    - -
    -
    Gets the X coordinate of this widget relative to its parent.
    -
    -
    int
    - -
    -
    Gets the Y coordinate of this widget relative to its parent.
    -
    - -
    hit(int x, - int y)
    -
    -
    Find the most specific child node at this location.
    -
    - - -
    -
    Returns whether the user is hovering over this widget.
    -
    -
    static boolean
    - -
    -
    Tests if the provided key code is an activation key for widgets.
    -
    -
    boolean
    - -
    -
    Tests whether this widget has focus.
    -
    -
    final boolean
    - -
    -
    Returns whether the user is hovering over this widget.
    -
    -
    boolean
    - -
    -
    Returns whether this widget can be narrated.
    -
    -
    boolean
    -
    isWithinBounds(int x, - int y)
    -
    -
    Checks whether a location is within this widget's bounds.
    -
    - -
    onCharTyped(char ch)
    -
    -
    Notifies this widget that a character has been typed.
    -
    - -
    onClick(int x, - int y, - int button)
    -
    -
    Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
    -
    -
    void
    - -
    -
    Notifies this widget that it has gained focus
    -
    -
    void
    - -
    -
    Notifies this widget that it has lost focus
    -
    -
    void
    - -
    -
    Notifies this widget that it won't be drawn and - hides any visible peers of itself and its children.
    -
    - -
    onKeyPressed(int ch, - int key, - int modifiers)
    -
    -
    Notifies this widget that a key has been pressed.
    -
    - -
    onKeyReleased(int ch, - int key, - int modifiers)
    -
    -
    Notifies this widget that a key has been released
    -
    - -
    onMouseDown(int x, - int y, - int button)
    -
    -
    Notifies this widget that the mouse has been pressed while inside its bounds
    -
    - -
    onMouseDrag(int x, - int y, - int button, - double deltaX, - double deltaY)
    -
    -
    Notifies this widget that the mouse has been moved while pressed and inside its bounds.
    -
    - -
    onMouseMove(int x, - int y)
    -
    -
    Notifies this widget that the mouse has been moved while inside its bounds.
    -
    - -
    onMouseScroll(int x, - int y, - double amount)
    -
    -
    Notifies this widget that the mouse has been scrolled inside its bounds.
    -
    - -
    onMouseUp(int x, - int y, - int button)
    -
    -
    Notifies this widget that the mouse has been released while inside its bounds
    -
    -
    void
    - -
    -
    Notifies this widget that it is visible and - shows any hidden peers of itself and its children.
    -
    -
    void
    -
    paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
    -
    -
    Paints this widget.
    -
    -
    void
    - -
    -
    If this widget has a host, releases this widget's focus.
    -
    -
    void
    -
    renderTooltip(DrawContext context, - int x, - int y, - int tX, - int tY)
    -
    -
    Internal method to render tooltip data.
    -
    -
    void
    - -
    -
    If this widget has a host, requests the focus from the host.
    -
    -
    void
    - -
    -
    Sets the host of this widget and all its children without creating peers.
    -
    -
    final void
    -
    setHovered(boolean hovered)
    -
    -
    Sets the hovered property.
    -
    -
    void
    -
    setLocation(int x, - int y)
    -
    -
    Sets the location of this widget relative to its parent.
    -
    -
    void
    -
    setParent(WPanel parent)
    -
    -
    Sets the parent panel of this widget.
    -
    -
    void
    -
    setSize(int x, - int y)
    -
    -
    Sets the size of this widget.
    -
    -
    boolean
    - -
    -
    Checks if this widget should be rendered in dark mode.
    -
    -
    void
    - -
    -
    Executes a client-side tick for this widget.
    -
    -
    void
    - -
    -
    Creates component peers and initializes animation data for this Widget and all its children.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      parent

      -
      @Nullable -protected @Nullable WPanel parent
      -
      The containing panel of this widget. - Can be null if this widget is the root panel or a HUD widget.
      -
      -
    • -
    • -
      -

      x

      -
      protected int x
      -
      The X coordinate of this widget relative to its parent.
      -
      -
    • -
    • -
      -

      y

      -
      protected int y
      -
      The Y coordinate of this widget relative to its parent.
      -
      -
    • -
    • -
      -

      width

      -
      protected int width
      -
      The width of this widget, defaults to 18 pixels.
      -
      -
    • -
    • -
      -

      height

      -
      protected int height
      -
      The height of this widget, defaults to 18 pixels.
      -
      -
    • -
    • -
      -

      host

      - -
      The containing GuiDescription of this widget. - Can be null if this widget is a HUD widget.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      WWidget

      -
      public WWidget()
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      setLocation

      -
      public void setLocation(int x, - int y)
      -
      Sets the location of this widget relative to its parent.
      -
      -
      Parameters:
      -
      x - the new X coordinate
      -
      y - the new Y coordinate
      -
      -
      -
    • -
    • -
      -

      setSize

      -
      public void setSize(int x, - int y)
      -
      Sets the size of this widget. - -

      Overriding methods may restrict one of the dimensions to be - a constant value, for example super.setSize(x, 20).

      -
      -
      Parameters:
      -
      x - the new width
      -
      y - the new height
      -
      -
      -
    • -
    • -
      -

      getX

      -
      public int getX()
      -
      Gets the X coordinate of this widget relative to its parent.
      -
      -
      Returns:
      -
      the X coordinate
      -
      -
      -
    • -
    • -
      -

      getY

      -
      public int getY()
      -
      Gets the Y coordinate of this widget relative to its parent.
      -
      -
      Returns:
      -
      the Y coordinate
      -
      -
      -
    • -
    • -
      -

      getAbsoluteX

      -
      public int getAbsoluteX()
      -
      Gets the absolute X coordinate of this widget.
      -
      -
      Returns:
      -
      the absolute X coordinate
      -
      -
      -
    • -
    • -
      -

      getAbsoluteY

      -
      public int getAbsoluteY()
      -
      Gets the absolute Y coordinate of this widget.
      -
      -
      Returns:
      -
      the absolute Y coordinate
      -
      -
      -
    • -
    • -
      -

      getWidth

      -
      public int getWidth()
      -
      -
    • -
    • -
      -

      getHeight

      -
      public int getHeight()
      -
      -
    • -
    • -
      -

      canResize

      -
      public boolean canResize()
      -
      Checks whether this widget can be resized using setSize(int, int).
      -
      -
      Returns:
      -
      true if this widget can be resized, false otherwise
      -
      -
      -
    • -
    • -
      -

      getParent

      -
      @Nullable -public @Nullable WPanel getParent()
      -
      Gets the parent panel of this widget.
      -
      -
      Returns:
      -
      the parent, or null if this widget has no parent
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      setParent

      -
      public void setParent(WPanel parent)
      -
      Sets the parent panel of this widget.
      -
      -
      Parameters:
      -
      parent - the new parent
      -
      -
      -
    • -
    • -
      -

      onMouseDown

      -
      @Environment(CLIENT) -public InputResult onMouseDown(int x, - int y, - int button)
      -
      Notifies this widget that the mouse has been pressed while inside its bounds
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseDrag

      -
      @Environment(CLIENT) -public InputResult onMouseDrag(int x, - int y, - int button, - double deltaX, - double deltaY)
      -
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      deltaX - The amount of dragging on the X axis
      -
      deltaY - The amount of dragging on the Y axis
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      Since:
      -
      1.5.0
      -
      -
      -
    • -
    • -
      -

      onMouseUp

      -
      @Environment(CLIENT) -public InputResult onMouseUp(int x, - int y, - int button)
      -
      Notifies this widget that the mouse has been released while inside its bounds
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onClick

      -
      @Environment(CLIENT) -public InputResult onClick(int x, - int y, - int button)
      -
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseScroll

      -
      @Environment(CLIENT) -public InputResult onMouseScroll(int x, - int y, - double amount)
      -
      Notifies this widget that the mouse has been scrolled inside its bounds.
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      amount - The scrolled amount. Positive values are up and negative values are down.
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onMouseMove

      -
      @Environment(CLIENT) -public InputResult onMouseMove(int x, - int y)
      -
      Notifies this widget that the mouse has been moved while inside its bounds.
      -
      -
      Parameters:
      -
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      -
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      Since:
      -
      1.5.0
      -
      -
      -
    • -
    • -
      -

      onCharTyped

      -
      @Environment(CLIENT) -public InputResult onCharTyped(char ch)
      -
      Notifies this widget that a character has been typed. This method is subject to key repeat, - and may be called for characters that do not directly have a corresponding keyboard key.
      -
      -
      Parameters:
      -
      ch - the character typed
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyPressed

      -
      @Environment(CLIENT) -public InputResult onKeyPressed(int ch, - int key, - int modifiers)
      -
      Notifies this widget that a key has been pressed.
      -
      -
      Parameters:
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onKeyReleased

      -
      @Environment(CLIENT) -public InputResult onKeyReleased(int ch, - int key, - int modifiers)
      -
      Notifies this widget that a key has been released
      -
      -
      Parameters:
      -
      key - the GLFW scancode of the key
      -
      Returns:
      -
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      -
      -
      -
    • -
    • -
      -

      onFocusGained

      -
      public void onFocusGained()
      -
      Notifies this widget that it has gained focus
      -
      -
    • -
    • -
      -

      onFocusLost

      -
      public void onFocusLost()
      -
      Notifies this widget that it has lost focus
      -
      -
    • -
    • -
      -

      isFocused

      -
      public boolean isFocused()
      -
      Tests whether this widget has focus.
      -
      -
      Returns:
      -
      true if this widget widget has focus, false otherwise
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      requestFocus

      -
      public void requestFocus()
      -
      If this widget has a host, requests the focus from the host.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      releaseFocus

      -
      public void releaseFocus()
      -
      If this widget has a host, releases this widget's focus.
      -
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      canFocus

      -
      public boolean canFocus()
      -
      Tests whether this widget can have the focus in the GUI.
      -
      -
      Returns:
      -
      true if this widget can be focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int mouseX, - int mouseY)
      -
      Paints this widget.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - this widget's X coordinate on the screen
      -
      y - this widget's Y coordinate on the screen
      -
      mouseX - the X coordinate of the cursor
      -
      mouseY - the X coordinate of the cursor
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      isWithinBounds

      -
      public boolean isWithinBounds(int x, - int y)
      -
      Checks whether a location is within this widget's bounds. - -

      The default implementation checks that X and Y are at least 0 and below the width and height of this widget.

      -
      -
      Parameters:
      -
      x - the X coordinate
      -
      y - the Y coordinate
      -
      Returns:
      -
      true if the location is within this widget, false otherwise
      -
      -
      -
    • -
    • -
      -

      renderTooltip

      -
      @Environment(CLIENT) -public void renderTooltip(DrawContext context, - int x, - int y, - int tX, - int tY)
      -
      Internal method to render tooltip data. This requires an overridden addTooltip method to insert data into the tooltip - without this, the method returns early because of no work.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate of this widget on screen
      -
      y - the Y coordinate of this widget on screen
      -
      tX - the X coordinate of the tooltip
      -
      tY - the Y coordinate of the tooltip
      -
      -
      -
    • -
    • -
      -

      validate

      -
      public void validate(GuiDescription host)
      -
      Creates component peers and initializes animation data for this Widget and all its children. - The host screen handler must clear any heavyweight peers - from its records before this method is called. - -

      This method must be called on the root panel of any screen once the widgets have been initialized.

      -
      -
      Parameters:
      -
      host - the host GUI description
      -
      -
      -
    • -
    • -
      -

      getHost

      -
      @Nullable -public final @Nullable GuiDescription getHost()
      -
      Gets the host of this widget.
      -
      -
      Returns:
      -
      the host
      -
      Since:
      -
      2.1.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      setHost

      -
      public void setHost(GuiDescription host)
      -
      Sets the host of this widget and all its children without creating peers.
      -
      -
      Parameters:
      -
      host - the new host
      -
      Since:
      -
      2.1.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      addTooltip

      -
      @Environment(CLIENT) -public void addTooltip(TooltipBuilder tooltip)
      -
      Adds lines to this widget's tooltip. If the lines remain empty after this call, no tooltip will be drawn.
      -
      -
      Parameters:
      -
      tooltip - the builder to add tooltip lines to
      -
      -
      -
    • -
    • -
      -

      hit

      -
      public WWidget hit(int x, - int y)
      -
      Find the most specific child node at this location. For non-panel widgets, returns this widget.
      -
      -
    • -
    • -
      -

      tick

      -
      @Environment(CLIENT) -public void tick()
      -
      Executes a client-side tick for this widget.
      -
      -
    • -
    • -
      -

      getFocusModel

      -
      @Nullable -public @Nullable FocusModel<?> getFocusModel()
      -
      Returns the focus model of this widget. The focus - model provides the focusable areas of this widget, - and handles switching through them. - -

      If this widget can focus, it should return - a nonnull focus model. The default implementation returns - FocusModel.simple(this) when the widget can be focused.

      -
      -
      Returns:
      -
      the focus model, or null if not available
      -
      Since:
      -
      7.0.0
      -
      -
      -
    • -
    • -
      -

      onShown

      -
      public void onShown()
      -
      Notifies this widget that it is visible and - shows any hidden peers of itself and its children.
      -
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      onHidden

      -
      public void onHidden()
      -
      Notifies this widget that it won't be drawn and - hides any visible peers of itself and its children. - -

      The default implementation releases this widget's - focus if it is focused. Overriding implementations - might want to do this as well.

      -
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      addPainters

      -
      @Environment(CLIENT) -public void addPainters()
      -
      Adds the default background painters to this widget and all children. - -

      Always called before GuiDescription.addPainters() to allow users to modify painters.

      -
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    • -
      -

      canHover

      -
      public boolean canHover()
      -
      Tests whether this widget receives mouse hovering status.
      -
      -
      Returns:
      -
      true if this widget receives hovering status, false otherwise
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    • -
      -

      hoveredProperty

      -
      public ObservableProperty<Boolean> hoveredProperty()
      -
      Returns whether the user is hovering over this widget. - The result is an observable property that can be modified and listened to. - -

      This property takes into account isWithinBounds(int, int) to check - if the cursor is within the bounds, as well as canHover() to enable hovering at all. - -

      Hovering is used by LibGui itself mostly for narration support. - For rendering, it might be preferable that you check the mouse coordinates in - paint() directly. - That lets you react to different parts of the widget being hovered over.

      -
      -
      Returns:
      -
      the hovered property
      -
      Since:
      -
      4.2.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      isHovered

      -
      public final boolean isHovered()
      -
      Returns whether the user is hovering over this widget. - This is equivalent to calling hoveredProperty().get().
      -
      -
      Returns:
      -
      true if this widget is hovered, false otherwise
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    • -
      -

      setHovered

      -
      public final void setHovered(boolean hovered)
      -
      Sets the hovered property. - This is equivalent to calling hoveredProperty().set(hovered).
      -
      -
      Parameters:
      -
      hovered - the new value; true if hovered, false otherwise
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    • -
      -

      isNarratable

      -
      public boolean isNarratable()
      -
      Returns whether this widget can be narrated.
      -
      -
      Returns:
      -
      whether this widget can be narrated
      -
      Since:
      -
      4.2.0
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      addNarrations

      -
      @Environment(CLIENT) -public void addNarrations(NarrationMessageBuilder builder)
      -
      Adds the narrations of this widget to a narration builder. - Narrations will only apply if this widget is narratable. - -

      The widget needs to be focusable or hoverable, - and also be focused/hovered for narrations to be added.

      -
      -
      Parameters:
      -
      builder - the narration builder, cannot be null
      -
      Since:
      -
      4.2.0
      -
      -
      -
    • -
    • -
      -

      isActivationKey

      -
      @Environment(CLIENT) -public static boolean isActivationKey(int ch)
      -
      Tests if the provided key code is an activation key for widgets. - -

      The activation keys are Enter, keypad Enter, and Space.

      -
      -
      Parameters:
      -
      ch - the key code
      -
      Returns:
      -
      whether the key is an activation key
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    • -
      -

      shouldRenderInDarkMode

      -
      @Environment(CLIENT) -public boolean shouldRenderInDarkMode()
      -
      Checks if this widget should be rendered in dark mode. - -

      If the widget has a host that forces dark mode, - the forced value is used. Otherwise, this method returns LibGui.isDarkMode(). - -

      Painting should respect this value for general-purpose widgets - intended for use in multiple different GUIs.

      -
      -
      Returns:
      -
      true if this widget should be rendered in dark mode, false otherwise
      -
      Since:
      -
      7.1.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +WWidget (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WWidget

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.WWidget
+
+
+
+
Direct Known Subclasses:
+
WAbstractSlider, WBar, WButton, WDynamicLabel, WItem, WItemSlot, WLabel, WPanel, WScrollBar, WSprite, WText, WTextField, WToggleButton
+
+
+
public class WWidget +extends Object
+
The base class for all widgets.
+
  • Property Summary

    Properties
    Modifier and Type
    Property
    Description
    public java.lang.Boolean
    Returns whether the user is hovering over this widget.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    protected int
    + +
    +
    The height of this widget, defaults to 18 pixels.
    +
    + + +
    +
    The containing GuiDescription of this widget.
    +
    +
    protected @Nullable WPanel
    + +
    +
    The containing panel of this widget.
    +
    +
    protected int
    + +
    +
    The width of this widget, defaults to 18 pixels.
    +
    +
    protected int
    + +
    +
    The X coordinate of this widget relative to its parent.
    +
    +
    protected int
    + +
    +
    The Y coordinate of this widget relative to its parent.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Adds the narrations of this widget to a narration builder.
    +
    +
    void
    + +
    +
    Adds the default background painters to this widget and all children.
    +
    +
    void
    + +
    +
    Adds lines to this widget's tooltip.
    +
    +
    boolean
    + +
    +
    Tests whether this widget can have the focus in the GUI.
    +
    +
    boolean
    + +
    +
    Tests whether this widget receives mouse hovering status.
    +
    +
    boolean
    + +
    +
    Checks whether this widget can be resized using setSize(int, int).
    +
    +
    int
    + +
    +
    Gets the absolute X coordinate of this widget.
    +
    +
    int
    + +
    +
    Gets the absolute Y coordinate of this widget.
    +
    + + +
    +
    Returns the focus model of this widget.
    +
    +
    int
    + +
     
    + + +
    +
    Gets the host of this widget.
    +
    + + +
    +
    Gets the parent panel of this widget.
    +
    +
    int
    + +
     
    +
    int
    + +
    +
    Gets the X coordinate of this widget relative to its parent.
    +
    +
    int
    + +
    +
    Gets the Y coordinate of this widget relative to its parent.
    +
    + +
    hit(int x, + int y)
    +
    +
    Find the most specific child node at this location.
    +
    + + +
    +
    Returns whether the user is hovering over this widget.
    +
    +
    static boolean
    + +
    +
    Tests if the provided key code is an activation key for widgets.
    +
    +
    boolean
    + +
    +
    Tests whether this widget has focus.
    +
    +
    final boolean
    + +
    +
    Returns whether the user is hovering over this widget.
    +
    +
    boolean
    + +
    +
    Returns whether this widget can be narrated.
    +
    +
    boolean
    +
    isWithinBounds(int x, + int y)
    +
    +
    Checks whether a location is within this widget's bounds.
    +
    + +
    onCharTyped(char ch)
    +
    +
    Notifies this widget that a character has been typed.
    +
    + +
    onClick(int x, + int y, + int button)
    +
    +
    Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
    +
    +
    void
    + +
    +
    Notifies this widget that it has gained focus
    +
    +
    void
    + +
    +
    Notifies this widget that it has lost focus
    +
    +
    void
    + +
    +
    Notifies this widget that it won't be drawn and + hides any visible peers of itself and its children.
    +
    + +
    onKeyPressed(int ch, + int key, + int modifiers)
    +
    +
    Notifies this widget that a key has been pressed.
    +
    + +
    onKeyReleased(int ch, + int key, + int modifiers)
    +
    +
    Notifies this widget that a key has been released
    +
    + +
    onMouseDown(int x, + int y, + int button)
    +
    +
    Notifies this widget that the mouse has been pressed while inside its bounds
    +
    + +
    onMouseDrag(int x, + int y, + int button, + double deltaX, + double deltaY)
    +
    +
    Notifies this widget that the mouse has been moved while pressed and inside its bounds.
    +
    + +
    onMouseMove(int x, + int y)
    +
    +
    Notifies this widget that the mouse has been moved while inside its bounds.
    +
    + +
    onMouseScroll(int x, + int y, + double amount)
    +
    +
    Notifies this widget that the mouse has been scrolled inside its bounds.
    +
    + +
    onMouseUp(int x, + int y, + int button)
    +
    +
    Notifies this widget that the mouse has been released while inside its bounds
    +
    +
    void
    + +
    +
    Notifies this widget that it is visible and + shows any hidden peers of itself and its children.
    +
    +
    void
    +
    paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
    +
    +
    Paints this widget.
    +
    +
    void
    + +
    +
    If this widget has a host, releases this widget's focus.
    +
    +
    void
    +
    renderTooltip(DrawContext context, + int x, + int y, + int tX, + int tY)
    +
    +
    Internal method to render tooltip data.
    +
    +
    void
    + +
    +
    If this widget has a host, requests the focus from the host.
    +
    +
    void
    + +
    +
    Sets the host of this widget and all its children without creating peers.
    +
    +
    final void
    +
    setHovered(boolean hovered)
    +
    +
    Sets the hovered property.
    +
    +
    void
    +
    setLocation(int x, + int y)
    +
    +
    Sets the location of this widget relative to its parent.
    +
    +
    void
    +
    setParent(WPanel parent)
    +
    +
    Sets the parent panel of this widget.
    +
    +
    void
    +
    setSize(int x, + int y)
    +
    +
    Sets the size of this widget.
    +
    +
    boolean
    + +
    +
    Checks if this widget should be rendered in dark mode.
    +
    +
    void
    + +
    +
    Executes a client-side tick for this widget.
    +
    +
    void
    + +
    +
    Creates component peers and initializes animation data for this Widget and all its children.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      parent

      +
      @Nullable +protected @Nullable WPanel parent
      +
      The containing panel of this widget. + Can be null if this widget is the root panel or a HUD widget.
      +
      +
    • +
    • +
      +

      x

      +
      protected int x
      +
      The X coordinate of this widget relative to its parent.
      +
      +
    • +
    • +
      +

      y

      +
      protected int y
      +
      The Y coordinate of this widget relative to its parent.
      +
      +
    • +
    • +
      +

      width

      +
      protected int width
      +
      The width of this widget, defaults to 18 pixels.
      +
      +
    • +
    • +
      +

      height

      +
      protected int height
      +
      The height of this widget, defaults to 18 pixels.
      +
      +
    • +
    • +
      +

      host

      + +
      The containing GuiDescription of this widget. + Can be null if this widget is a HUD widget.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WWidget

      +
      public WWidget()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setLocation

      +
      public void setLocation(int x, + int y)
      +
      Sets the location of this widget relative to its parent.
      +
      +
      Parameters:
      +
      x - the new X coordinate
      +
      y - the new Y coordinate
      +
      +
      +
    • +
    • +
      +

      setSize

      +
      public void setSize(int x, + int y)
      +
      Sets the size of this widget. + +

      Overriding methods may restrict one of the dimensions to be + a constant value, for example super.setSize(x, 20).

      +
      +
      Parameters:
      +
      x - the new width
      +
      y - the new height
      +
      +
      +
    • +
    • +
      +

      getX

      +
      public int getX()
      +
      Gets the X coordinate of this widget relative to its parent.
      +
      +
      Returns:
      +
      the X coordinate
      +
      +
      +
    • +
    • +
      +

      getY

      +
      public int getY()
      +
      Gets the Y coordinate of this widget relative to its parent.
      +
      +
      Returns:
      +
      the Y coordinate
      +
      +
      +
    • +
    • +
      +

      getAbsoluteX

      +
      public int getAbsoluteX()
      +
      Gets the absolute X coordinate of this widget.
      +
      +
      Returns:
      +
      the absolute X coordinate
      +
      +
      +
    • +
    • +
      +

      getAbsoluteY

      +
      public int getAbsoluteY()
      +
      Gets the absolute Y coordinate of this widget.
      +
      +
      Returns:
      +
      the absolute Y coordinate
      +
      +
      +
    • +
    • +
      +

      getWidth

      +
      public int getWidth()
      +
      +
    • +
    • +
      +

      getHeight

      +
      public int getHeight()
      +
      +
    • +
    • +
      +

      canResize

      +
      public boolean canResize()
      +
      Checks whether this widget can be resized using setSize(int, int).
      +
      +
      Returns:
      +
      true if this widget can be resized, false otherwise
      +
      +
      +
    • +
    • +
      +

      getParent

      +
      @Nullable +public @Nullable WPanel getParent()
      +
      Gets the parent panel of this widget.
      +
      +
      Returns:
      +
      the parent, or null if this widget has no parent
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      setParent

      +
      public void setParent(WPanel parent)
      +
      Sets the parent panel of this widget.
      +
      +
      Parameters:
      +
      parent - the new parent
      +
      +
      +
    • +
    • +
      +

      onMouseDown

      +
      @Environment(CLIENT) +public InputResult onMouseDown(int x, + int y, + int button)
      +
      Notifies this widget that the mouse has been pressed while inside its bounds
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseDrag

      +
      @Environment(CLIENT) +public InputResult onMouseDrag(int x, + int y, + int button, + double deltaX, + double deltaY)
      +
      Notifies this widget that the mouse has been moved while pressed and inside its bounds.
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      deltaX - The amount of dragging on the X axis
      +
      deltaY - The amount of dragging on the Y axis
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      Since:
      +
      1.5.0
      +
      +
      +
    • +
    • +
      +

      onMouseUp

      +
      @Environment(CLIENT) +public InputResult onMouseUp(int x, + int y, + int button)
      +
      Notifies this widget that the mouse has been released while inside its bounds
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onClick

      +
      @Environment(CLIENT) +public InputResult onClick(int x, + int y, + int button)
      +
      Notifies this widget that the mouse has been pressed and released, both while inside its bounds.
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      button - The mouse button that was used. Button numbering is consistent with LWJGL Mouse (0=left, 1=right, 2=mousewheel click)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseScroll

      +
      @Environment(CLIENT) +public InputResult onMouseScroll(int x, + int y, + double amount)
      +
      Notifies this widget that the mouse has been scrolled inside its bounds.
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      amount - The scrolled amount. Positive values are up and negative values are down.
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onMouseMove

      +
      @Environment(CLIENT) +public InputResult onMouseMove(int x, + int y)
      +
      Notifies this widget that the mouse has been moved while inside its bounds.
      +
      +
      Parameters:
      +
      x - The X coordinate of the event, in widget-space (0 is the left edge of this widget)
      +
      y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      Since:
      +
      1.5.0
      +
      +
      +
    • +
    • +
      +

      onCharTyped

      +
      @Environment(CLIENT) +public InputResult onCharTyped(char ch)
      +
      Notifies this widget that a character has been typed. This method is subject to key repeat, + and may be called for characters that do not directly have a corresponding keyboard key.
      +
      +
      Parameters:
      +
      ch - the character typed
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyPressed

      +
      @Environment(CLIENT) +public InputResult onKeyPressed(int ch, + int key, + int modifiers)
      +
      Notifies this widget that a key has been pressed.
      +
      +
      Parameters:
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onKeyReleased

      +
      @Environment(CLIENT) +public InputResult onKeyReleased(int ch, + int key, + int modifiers)
      +
      Notifies this widget that a key has been released
      +
      +
      Parameters:
      +
      key - the GLFW scancode of the key
      +
      Returns:
      +
      InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.
      +
      +
      +
    • +
    • +
      +

      onFocusGained

      +
      public void onFocusGained()
      +
      Notifies this widget that it has gained focus
      +
      +
    • +
    • +
      +

      onFocusLost

      +
      public void onFocusLost()
      +
      Notifies this widget that it has lost focus
      +
      +
    • +
    • +
      +

      isFocused

      +
      public boolean isFocused()
      +
      Tests whether this widget has focus.
      +
      +
      Returns:
      +
      true if this widget widget has focus, false otherwise
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      requestFocus

      +
      public void requestFocus()
      +
      If this widget has a host, requests the focus from the host.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      releaseFocus

      +
      public void releaseFocus()
      +
      If this widget has a host, releases this widget's focus.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      canFocus

      +
      public boolean canFocus()
      +
      Tests whether this widget can have the focus in the GUI.
      +
      +
      Returns:
      +
      true if this widget can be focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int mouseX, + int mouseY)
      +
      Paints this widget.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - this widget's X coordinate on the screen
      +
      y - this widget's Y coordinate on the screen
      +
      mouseX - the X coordinate of the cursor
      +
      mouseY - the X coordinate of the cursor
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      isWithinBounds

      +
      public boolean isWithinBounds(int x, + int y)
      +
      Checks whether a location is within this widget's bounds. + +

      The default implementation checks that X and Y are at least 0 and below the width and height of this widget.

      +
      +
      Parameters:
      +
      x - the X coordinate
      +
      y - the Y coordinate
      +
      Returns:
      +
      true if the location is within this widget, false otherwise
      +
      +
      +
    • +
    • +
      +

      renderTooltip

      +
      @Environment(CLIENT) +public void renderTooltip(DrawContext context, + int x, + int y, + int tX, + int tY)
      +
      Internal method to render tooltip data. This requires an overridden addTooltip method to insert data into the tooltip - without this, the method returns early because of no work.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate of this widget on screen
      +
      y - the Y coordinate of this widget on screen
      +
      tX - the X coordinate of the tooltip
      +
      tY - the Y coordinate of the tooltip
      +
      +
      +
    • +
    • +
      +

      validate

      +
      public void validate(GuiDescription host)
      +
      Creates component peers and initializes animation data for this Widget and all its children. + The host screen handler must clear any heavyweight peers + from its records before this method is called. + +

      This method must be called on the root panel of any screen once the widgets have been initialized.

      +
      +
      Parameters:
      +
      host - the host GUI description
      +
      +
      +
    • +
    • +
      +

      getHost

      +
      @Nullable +public final @Nullable GuiDescription getHost()
      +
      Gets the host of this widget.
      +
      +
      Returns:
      +
      the host
      +
      Since:
      +
      2.1.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      setHost

      +
      public void setHost(GuiDescription host)
      +
      Sets the host of this widget and all its children without creating peers.
      +
      +
      Parameters:
      +
      host - the new host
      +
      Since:
      +
      2.1.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addTooltip

      +
      @Environment(CLIENT) +public void addTooltip(TooltipBuilder tooltip)
      +
      Adds lines to this widget's tooltip. If the lines remain empty after this call, no tooltip will be drawn.
      +
      +
      Parameters:
      +
      tooltip - the builder to add tooltip lines to
      +
      +
      +
    • +
    • +
      +

      hit

      +
      public WWidget hit(int x, + int y)
      +
      Find the most specific child node at this location. For non-panel widgets, returns this widget.
      +
      +
    • +
    • +
      +

      tick

      +
      @Environment(CLIENT) +public void tick()
      +
      Executes a client-side tick for this widget.
      +
      +
    • +
    • +
      +

      getFocusModel

      +
      @Nullable +public @Nullable FocusModel<?> getFocusModel()
      +
      Returns the focus model of this widget. The focus + model provides the focusable areas of this widget, + and handles switching through them. + +

      If this widget can focus, it should return + a nonnull focus model. The default implementation returns + FocusModel.simple(this) when the widget can be focused.

      +
      +
      Returns:
      +
      the focus model, or null if not available
      +
      Since:
      +
      7.0.0
      +
      +
      +
    • +
    • +
      +

      onShown

      +
      public void onShown()
      +
      Notifies this widget that it is visible and + shows any hidden peers of itself and its children.
      +
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      onHidden

      +
      public void onHidden()
      +
      Notifies this widget that it won't be drawn and + hides any visible peers of itself and its children. + +

      The default implementation releases this widget's + focus if it is focused. Overriding implementations + might want to do this as well.

      +
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      addPainters

      +
      @Environment(CLIENT) +public void addPainters()
      +
      Adds the default background painters to this widget and all children. + +

      Always called before GuiDescription.addPainters() to allow users to modify painters.

      +
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    • +
      +

      canHover

      +
      public boolean canHover()
      +
      Tests whether this widget receives mouse hovering status.
      +
      +
      Returns:
      +
      true if this widget receives hovering status, false otherwise
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    • +
      +

      hoveredProperty

      +
      public ObservableProperty<Boolean> hoveredProperty()
      +
      Returns whether the user is hovering over this widget. + The result is an observable property that can be modified and listened to. + +

      This property takes into account isWithinBounds(int, int) to check + if the cursor is within the bounds, as well as canHover() to enable hovering at all. + +

      Hovering is used by LibGui itself mostly for narration support. + For rendering, it might be preferable that you check the mouse coordinates in + paint() directly. + That lets you react to different parts of the widget being hovered over.

      +
      +
      Returns:
      +
      the hovered property
      +
      Since:
      +
      4.2.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      isHovered

      +
      public final boolean isHovered()
      +
      Returns whether the user is hovering over this widget. + This is equivalent to calling hoveredProperty().get().
      +
      +
      Returns:
      +
      true if this widget is hovered, false otherwise
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    • +
      +

      setHovered

      +
      public final void setHovered(boolean hovered)
      +
      Sets the hovered property. + This is equivalent to calling hoveredProperty().set(hovered).
      +
      +
      Parameters:
      +
      hovered - the new value; true if hovered, false otherwise
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    • +
      +

      isNarratable

      +
      public boolean isNarratable()
      +
      Returns whether this widget can be narrated.
      +
      +
      Returns:
      +
      whether this widget can be narrated
      +
      Since:
      +
      4.2.0
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addNarrations

      +
      @Environment(CLIENT) +public void addNarrations(NarrationMessageBuilder builder)
      +
      Adds the narrations of this widget to a narration builder. + Narrations will only apply if this widget is narratable. + +

      The widget needs to be focusable or hoverable, + and also be focused/hovered for narrations to be added.

      +
      +
      Parameters:
      +
      builder - the narration builder, cannot be null
      +
      Since:
      +
      4.2.0
      +
      +
      +
    • +
    • +
      +

      isActivationKey

      +
      @Environment(CLIENT) +public static boolean isActivationKey(int ch)
      +
      Tests if the provided key code is an activation key for widgets. + +

      The activation keys are Enter, keypad Enter, and Space.

      +
      +
      Parameters:
      +
      ch - the key code
      +
      Returns:
      +
      whether the key is an activation key
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    • +
      +

      shouldRenderInDarkMode

      +
      @Environment(CLIENT) +public boolean shouldRenderInDarkMode()
      +
      Checks if this widget should be rendered in dark mode. + +

      If the widget has a host that forces dark mode, + the forced value is used. Otherwise, this method returns LibGui.isDarkMode(). + +

      Painting should respect this value for general-purpose widgets + intended for use in multiple different GUIs.

      +
      +
      Returns:
      +
      true if this widget should be rendered in dark mode, false otherwise
      +
      Since:
      +
      7.1.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Axis.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Axis.html index bf78680..8c4dc98 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Axis.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Axis.html @@ -1,239 +1,240 @@ - - - - -Axis (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class Axis

-
-
java.lang.Object -
java.lang.Enum<Axis> -
io.github.cottonmc.cotton.gui.widget.data.Axis
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<Axis>, Constable
-
-
-
public enum Axis -extends Enum<Axis>
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    -
      -
    • -
      -

      HORIZONTAL

      -
      public static final Axis HORIZONTAL
      -
      -
    • -
    • -
      -

      VERTICAL

      -
      public static final Axis VERTICAL
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static Axis[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static Axis valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    • -
      -

      choose

      -
      public <T> T choose(T horizontal, - T vertical)
      -
      Chooses a value based on this axis.
      -
      -
      Type Parameters:
      -
      T - the type of the value
      -
      Parameters:
      -
      horizontal - the value returned if this axis is horizontal
      -
      vertical - the value returned if this axis is vertical
      -
      Returns:
      -
      the corresponding value for this axis
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Axis (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Axis

+
+
java.lang.Object +
java.lang.Enum<Axis> +
io.github.cottonmc.cotton.gui.widget.data.Axis
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Axis>, Constable
+
+
+
public enum Axis +extends Enum<Axis>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      HORIZONTAL

      +
      public static final Axis HORIZONTAL
      +
      +
    • +
    • +
      +

      VERTICAL

      +
      public static final Axis VERTICAL
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Axis[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Axis valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      choose

      +
      public <T> T choose(T horizontal, + T vertical)
      +
      Chooses a value based on this axis.
      +
      +
      Type Parameters:
      +
      T - the type of the value
      +
      Parameters:
      +
      horizontal - the value returned if this axis is horizontal
      +
      vertical - the value returned if this axis is vertical
      +
      Returns:
      +
      the corresponding value for this axis
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.HSL.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.HSL.html index 3da31b0..9705d76 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.HSL.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.HSL.html @@ -1,237 +1,238 @@ - - - - -Color.HSL (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Color.HSL

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.data.Color.HSL
-
-
-
-
All Implemented Interfaces:
-
Color
-
-
-
Enclosing interface:
-
Color
-
-
-
public static class Color.HSL -extends Object -implements Color
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      HSL

      -
      public HSL(float hue, - float sat, - float luma)
      -
      -
      Parameters:
      -
      hue - hue angle, between 0 and 1
      -
      sat - saturation, between 0 and 1
      -
      luma - luminance, between 0 and 1
      -
      -
      -
    • -
    • -
      -

      HSL

      -
      public HSL(int rgb)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toRgb

      -
      public int toRgb()
      -
      Description copied from interface: Color
      -
      Gets an ARGB integer representing this color in the sRGB colorspace.
      -
      -
      Specified by:
      -
      toRgb in interface Color
      -
      -
      -
    • -
    • -
      -

      getHue

      -
      public float getHue()
      -
      -
    • -
    • -
      -

      getSaturation

      -
      public float getSaturation()
      -
      -
    • -
    • -
      -

      getLuma

      -
      public float getLuma()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Color.HSL (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Color.HSL

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.data.Color.HSL
+
+
+
+
All Implemented Interfaces:
+
Color
+
+
+
Enclosing interface:
+
Color
+
+
+
public static class Color.HSL +extends Object +implements Color
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HSL

      +
      public HSL(float hue, + float sat, + float luma)
      +
      +
      Parameters:
      +
      hue - hue angle, between 0 and 1
      +
      sat - saturation, between 0 and 1
      +
      luma - luminance, between 0 and 1
      +
      +
      +
    • +
    • +
      +

      HSL

      +
      public HSL(int rgb)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toRgb

      +
      public int toRgb()
      +
      Description copied from interface: Color
      +
      Gets an ARGB integer representing this color in the sRGB colorspace.
      +
      +
      Specified by:
      +
      toRgb in interface Color
      +
      +
      +
    • +
    • +
      +

      getHue

      +
      public float getHue()
      +
      +
    • +
    • +
      +

      getSaturation

      +
      public float getSaturation()
      +
      +
    • +
    • +
      +

      getLuma

      +
      public float getLuma()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.LCH.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.LCH.html index ee993cd..62236b1 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.LCH.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.LCH.html @@ -1,223 +1,224 @@ - - - - -Color.LCH (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Color.LCH

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.data.Color.LCH
-
-
-
-
All Implemented Interfaces:
-
Color
-
-
-
Enclosing interface:
-
Color
-
-
-
public static class Color.LCH -extends Object -implements Color
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      LCH

      -
      public LCH(float luma, - float chroma, - float hue)
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toRgb

      -
      public int toRgb()
      -
      Description copied from interface: Color
      -
      Gets an ARGB integer representing this color in the sRGB colorspace.
      -
      -
      Specified by:
      -
      toRgb in interface Color
      -
      -
      -
    • -
    • -
      -

      getHue

      -
      public float getHue()
      -
      -
    • -
    • -
      -

      getChroma

      -
      public float getChroma()
      -
      -
    • -
    • -
      -

      getLuma

      -
      public float getLuma()
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Color.LCH (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Color.LCH

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.data.Color.LCH
+
+
+
+
All Implemented Interfaces:
+
Color
+
+
+
Enclosing interface:
+
Color
+
+
+
public static class Color.LCH +extends Object +implements Color
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LCH

      +
      public LCH(float luma, + float chroma, + float hue)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toRgb

      +
      public int toRgb()
      +
      Description copied from interface: Color
      +
      Gets an ARGB integer representing this color in the sRGB colorspace.
      +
      +
      Specified by:
      +
      toRgb in interface Color
      +
      +
      +
    • +
    • +
      +

      getHue

      +
      public float getHue()
      +
      +
    • +
    • +
      +

      getChroma

      +
      public float getChroma()
      +
      +
    • +
    • +
      +

      getLuma

      +
      public float getLuma()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.RGB.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.RGB.html index 6585cab..2217f0e 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.RGB.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.RGB.html @@ -1,367 +1,368 @@ - - - - -Color.RGB (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class Color.RGB

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.data.Color.RGB
-
-
-
-
All Implemented Interfaces:
-
Color
-
-
-
Enclosing interface:
-
Color
-
-
-
public static class Color.RGB -extends Object -implements Color
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      RGB

      -
      public RGB(int value)
      -
      -
    • -
    • -
      -

      RGB

      -
      public RGB(int a, - int r, - int g, - int b)
      -
      -
    • -
    • -
      -

      RGB

      -
      public RGB(int r, - int g, - int b)
      -
      Constructs an RGB object with 100% alpha value (no transparency)
      -
      -
      Since:
      -
      2.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toRgb

      -
      public int toRgb()
      -
      Description copied from interface: Color
      -
      Gets an ARGB integer representing this color in the sRGB colorspace.
      -
      -
      Specified by:
      -
      toRgb in interface Color
      -
      -
      -
    • -
    • -
      -

      getA

      -
      public int getA()
      -
      -
    • -
    • -
      -

      getR

      -
      public int getR()
      -
      -
    • -
    • -
      -

      getG

      -
      public int getG()
      -
      -
    • -
    • -
      -

      getB

      -
      public int getB()
      -
      -
    • -
    • -
      -

      getChroma

      -
      public int getChroma()
      -
      Gets the chroma value, which is related to the length of the vector in projected (hexagonal) space.
      -
      -
    • -
    • -
      -

      getHue

      -
      public int getHue()
      -
      Gets the HSV/HSL Hue, which is the angle around the color hexagon (or circle)
      -
      -
    • -
    • -
      -

      getLightness

      -
      public int getLightness()
      -
      Gets the HSL Lightness, or average light intensity, of this color
      -
      -
    • -
    • -
      -

      getLuma

      -
      public int getLuma()
      -
      Gets the HSL Luma, or perceptual brightness, of this color
      -
      -
    • -
    • -
      -

      getValue

      -
      public int getValue()
      -
      Gets the HSV Value, which is just the largest component in the color
      -
      -
    • -
    • -
      -

      getHSVSaturation

      -
      public float getHSVSaturation()
      -
      Gets the saturation for this color based on chrominance and HSV Value
      -
      -
    • -
    • -
      -

      getHSLSaturation

      -
      public float getHSLSaturation()
      -
      Gets the saturation for this color based on chrominance and HSL luma.
      -
      -
    • -
    • -
      -

      interpolate

      -
      public Color.RGB interpolate(Color.RGB endColor, - double t)
      -
      Calculates an interpolated value along the fraction t between 0.0 and 1.0. When t = 1.0, endVal is returned. - Eg.: If this color is black, your endColor is white and t = 0.5 you get gray.
      -
      -
      Parameters:
      -
      endColor - a Color to interpolate with
      -
      t - fraction between 0.0 and 1.0
      -
      Since:
      -
      2.3.0
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Color.RGB (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Color.RGB

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.data.Color.RGB
+
+
+
+
All Implemented Interfaces:
+
Color
+
+
+
Enclosing interface:
+
Color
+
+
+
public static class Color.RGB +extends Object +implements Color
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RGB

      +
      public RGB(int value)
      +
      +
    • +
    • +
      +

      RGB

      +
      public RGB(int a, + int r, + int g, + int b)
      +
      +
    • +
    • +
      +

      RGB

      +
      public RGB(int r, + int g, + int b)
      +
      Constructs an RGB object with 100% alpha value (no transparency)
      +
      +
      Since:
      +
      2.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toRgb

      +
      public int toRgb()
      +
      Description copied from interface: Color
      +
      Gets an ARGB integer representing this color in the sRGB colorspace.
      +
      +
      Specified by:
      +
      toRgb in interface Color
      +
      +
      +
    • +
    • +
      +

      getA

      +
      public int getA()
      +
      +
    • +
    • +
      +

      getR

      +
      public int getR()
      +
      +
    • +
    • +
      +

      getG

      +
      public int getG()
      +
      +
    • +
    • +
      +

      getB

      +
      public int getB()
      +
      +
    • +
    • +
      +

      getChroma

      +
      public int getChroma()
      +
      Gets the chroma value, which is related to the length of the vector in projected (hexagonal) space.
      +
      +
    • +
    • +
      +

      getHue

      +
      public int getHue()
      +
      Gets the HSV/HSL Hue, which is the angle around the color hexagon (or circle)
      +
      +
    • +
    • +
      +

      getLightness

      +
      public int getLightness()
      +
      Gets the HSL Lightness, or average light intensity, of this color
      +
      +
    • +
    • +
      +

      getLuma

      +
      public int getLuma()
      +
      Gets the HSL Luma, or perceptual brightness, of this color
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      Gets the HSV Value, which is just the largest component in the color
      +
      +
    • +
    • +
      +

      getHSVSaturation

      +
      public float getHSVSaturation()
      +
      Gets the saturation for this color based on chrominance and HSV Value
      +
      +
    • +
    • +
      +

      getHSLSaturation

      +
      public float getHSLSaturation()
      +
      Gets the saturation for this color based on chrominance and HSL luma.
      +
      +
    • +
    • +
      +

      interpolate

      +
      public Color.RGB interpolate(Color.RGB endColor, + double t)
      +
      Calculates an interpolated value along the fraction t between 0.0 and 1.0. When t = 1.0, endVal is returned. + Eg.: If this color is black, your endColor is white and t = 0.5 you get gray.
      +
      +
      Parameters:
      +
      endColor - a Color to interpolate with
      +
      t - fraction between 0.0 and 1.0
      +
      Since:
      +
      2.3.0
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.html index 49ff88e..77f3e4c 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Color.html @@ -1,402 +1,403 @@ - - - - -Color (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface Color

-
-
-
-
All Known Implementing Classes:
-
Color.HSL, Color.LCH, Color.RGB
-
-
-
public interface Color
-
-
- -
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      WHITE

      -
      static final Color WHITE
      -
      -
    • -
    • -
      -

      BLACK

      -
      static final Color BLACK
      -
      -
    • -
    • -
      -

      RED

      -
      static final Color RED
      -
      -
    • -
    • -
      -

      GREEN

      -
      static final Color GREEN
      -
      -
    • -
    • -
      -

      BLUE

      -
      static final Color BLUE
      -
      -
    • -
    • -
      -

      WHITE_DYE

      -
      static final Color WHITE_DYE
      -
      -
    • -
    • -
      -

      ORANGE_DYE

      -
      static final Color ORANGE_DYE
      -
      -
    • -
    • -
      -

      MAGENTA_DYE

      -
      static final Color MAGENTA_DYE
      -
      -
    • -
    • -
      -

      LIGHT_BLUE_DYE

      -
      static final Color LIGHT_BLUE_DYE
      -
      -
    • -
    • -
      -

      YELLOW_DYE

      -
      static final Color YELLOW_DYE
      -
      -
    • -
    • -
      -

      LIME_DYE

      -
      static final Color LIME_DYE
      -
      -
    • -
    • -
      -

      PINK_DYE

      -
      static final Color PINK_DYE
      -
      -
    • -
    • -
      -

      GRAY_DYE

      -
      static final Color GRAY_DYE
      -
      -
    • -
    • -
      -

      LIGHT_GRAY_DYE

      -
      static final Color LIGHT_GRAY_DYE
      -
      -
    • -
    • -
      -

      CYAN_DYE

      -
      static final Color CYAN_DYE
      -
      -
    • -
    • -
      -

      PURPLE_DYE

      -
      static final Color PURPLE_DYE
      -
      -
    • -
    • -
      -

      BLUE_DYE

      -
      static final Color BLUE_DYE
      -
      -
    • -
    • -
      -

      BROWN_DYE

      -
      static final Color BROWN_DYE
      -
      -
    • -
    • -
      -

      GREEN_DYE

      -
      static final Color GREEN_DYE
      -
      -
    • -
    • -
      -

      RED_DYE

      -
      static final Color RED_DYE
      -
      -
    • -
    • -
      -

      BLACK_DYE

      -
      static final Color BLACK_DYE
      -
      -
    • -
    • -
      -

      DYE_COLORS

      -
      static final Color[] DYE_COLORS
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toRgb

      -
      int toRgb()
      -
      Gets an ARGB integer representing this color in the sRGB colorspace.
      -
      -
    • -
    • -
      -

      rgb

      -
      static Color rgb(int value)
      -
      -
    • -
    • -
      -

      rgb

      -
      static Color rgb(int a, - int r, - int g, - int b)
      -
      -
    • -
    • -
      -

      opaqueRgb

      -
      static Color opaqueRgb(int value)
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Color (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Color

+
+
+
+
All Known Implementing Classes:
+
Color.HSL, Color.LCH, Color.RGB
+
+
+
public interface Color
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      WHITE

      +
      static final Color WHITE
      +
      +
    • +
    • +
      +

      BLACK

      +
      static final Color BLACK
      +
      +
    • +
    • +
      +

      RED

      +
      static final Color RED
      +
      +
    • +
    • +
      +

      GREEN

      +
      static final Color GREEN
      +
      +
    • +
    • +
      +

      BLUE

      +
      static final Color BLUE
      +
      +
    • +
    • +
      +

      WHITE_DYE

      +
      static final Color WHITE_DYE
      +
      +
    • +
    • +
      +

      ORANGE_DYE

      +
      static final Color ORANGE_DYE
      +
      +
    • +
    • +
      +

      MAGENTA_DYE

      +
      static final Color MAGENTA_DYE
      +
      +
    • +
    • +
      +

      LIGHT_BLUE_DYE

      +
      static final Color LIGHT_BLUE_DYE
      +
      +
    • +
    • +
      +

      YELLOW_DYE

      +
      static final Color YELLOW_DYE
      +
      +
    • +
    • +
      +

      LIME_DYE

      +
      static final Color LIME_DYE
      +
      +
    • +
    • +
      +

      PINK_DYE

      +
      static final Color PINK_DYE
      +
      +
    • +
    • +
      +

      GRAY_DYE

      +
      static final Color GRAY_DYE
      +
      +
    • +
    • +
      +

      LIGHT_GRAY_DYE

      +
      static final Color LIGHT_GRAY_DYE
      +
      +
    • +
    • +
      +

      CYAN_DYE

      +
      static final Color CYAN_DYE
      +
      +
    • +
    • +
      +

      PURPLE_DYE

      +
      static final Color PURPLE_DYE
      +
      +
    • +
    • +
      +

      BLUE_DYE

      +
      static final Color BLUE_DYE
      +
      +
    • +
    • +
      +

      BROWN_DYE

      +
      static final Color BROWN_DYE
      +
      +
    • +
    • +
      +

      GREEN_DYE

      +
      static final Color GREEN_DYE
      +
      +
    • +
    • +
      +

      RED_DYE

      +
      static final Color RED_DYE
      +
      +
    • +
    • +
      +

      BLACK_DYE

      +
      static final Color BLACK_DYE
      +
      +
    • +
    • +
      +

      DYE_COLORS

      +
      static final Color[] DYE_COLORS
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toRgb

      +
      int toRgb()
      +
      Gets an ARGB integer representing this color in the sRGB colorspace.
      +
      +
    • +
    • +
      +

      rgb

      +
      static Color rgb(int value)
      +
      +
    • +
    • +
      +

      rgb

      +
      static Color rgb(int a, + int r, + int g, + int b)
      +
      +
    • +
    • +
      +

      opaqueRgb

      +
      static Color opaqueRgb(int value)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/HorizontalAlignment.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/HorizontalAlignment.html index 6e75df4..7bcc7bb 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/HorizontalAlignment.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/HorizontalAlignment.html @@ -1,224 +1,225 @@ - - - - -HorizontalAlignment (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class HorizontalAlignment

-
-
java.lang.Object -
java.lang.Enum<HorizontalAlignment> -
io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<HorizontalAlignment>, Constable
-
-
-
public enum HorizontalAlignment -extends Enum<HorizontalAlignment>
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static HorizontalAlignment[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static HorizontalAlignment valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +HorizontalAlignment (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class HorizontalAlignment

+
+
java.lang.Object +
java.lang.Enum<HorizontalAlignment> +
io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<HorizontalAlignment>, Constable
+
+
+
public enum HorizontalAlignment +extends Enum<HorizontalAlignment>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static HorizontalAlignment[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static HorizontalAlignment valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/InputResult.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/InputResult.html index 2a74424..536615b 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/InputResult.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/InputResult.html @@ -1,240 +1,241 @@ - - - - -InputResult (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class InputResult

-
-
java.lang.Object -
java.lang.Enum<InputResult> -
io.github.cottonmc.cotton.gui.widget.data.InputResult
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<InputResult>, Constable
-
-
-
public enum InputResult -extends Enum<InputResult>
-
Specifies whether an input event was ignored or processed. - Used for mouse and keyboard input events.
-
-
Since:
-
4.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    -
      -
    • -
      -

      PROCESSED

      -
      public static final InputResult PROCESSED
      -
      -
    • -
    • -
      -

      IGNORED

      -
      public static final InputResult IGNORED
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static InputResult[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static InputResult valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    • -
      -

      of

      -
      public static InputResult of(boolean processed)
      -
      Gets the corresponding input result for a processed boolean.
      -
      -
      Parameters:
      -
      processed - whether an input event was processed
      -
      Returns:
      -
      PROCESSED if true, IGNORED otherwise
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +InputResult (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class InputResult

+
+
java.lang.Object +
java.lang.Enum<InputResult> +
io.github.cottonmc.cotton.gui.widget.data.InputResult
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<InputResult>, Constable
+
+
+
public enum InputResult +extends Enum<InputResult>
+
Specifies whether an input event was ignored or processed. + Used for mouse and keyboard input events.
+
+
Since:
+
4.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      PROCESSED

      +
      public static final InputResult PROCESSED
      +
      +
    • +
    • +
      +

      IGNORED

      +
      public static final InputResult IGNORED
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static InputResult[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static InputResult valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static InputResult of(boolean processed)
      +
      Gets the corresponding input result for a processed boolean.
      +
      +
      Parameters:
      +
      processed - whether an input event was processed
      +
      Returns:
      +
      PROCESSED if true, IGNORED otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Insets.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Insets.html index 82f2d9b..f9879c6 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Insets.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Insets.html @@ -1,376 +1,377 @@ - - - - -Insets (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Record Class Insets

-
-
java.lang.Object -
java.lang.Record -
io.github.cottonmc.cotton.gui.widget.data.Insets
-
-
-
-
-
Record Components:
-
top - the top (Y-) inset size
-
left - the left (X-) inset size
-
bottom - the bottom (Y+) inset size
-
right - the right (X+) inset size
-
-
-
public record Insets(int top, int left, int bottom, int right) -extends Record
-
The layout insets of a panel. The insets describe how many pixels should be around the panel's contents. - For example, root panels have 7 pixels around their contents, which is set via ROOT_PANEL.
-
-
Since:
-
4.0.0
-
-
-
-
    - -
  • -
    -

    Field Summary

    -
    Fields
    -
    -
    Modifier and Type
    -
    Field
    -
    Description
    -
    static final Insets
    - -
    -
    Empty layout insets that do not provide any borders around content.
    -
    -
    static final Insets
    - -
    -
    The default insets of a root panel, providing 7 pixels around the content on all sides.
    -
    -
    -
    -
  • - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    -
    Insets(int size)
    -
    -
    Constructs layout insets.
    -
    -
    Insets(int vertical, - int horizontal)
    -
    -
    Constructs layout insets.
    -
    -
    Insets(int top, - int left, - int bottom, - int right)
    -
    -
    Constructs layout insets.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    int
    - -
    -
    Returns the value of the bottom record component.
    -
    -
    final boolean
    - -
    -
    Indicates whether some other object is "equal to" this one.
    -
    -
    final int
    - -
    -
    Returns a hash code value for this object.
    -
    -
    int
    - -
    -
    Returns the value of the left record component.
    -
    -
    int
    - -
    -
    Returns the value of the right record component.
    -
    -
    int
    -
    top()
    -
    -
    Returns the value of the top record component.
    -
    -
    final String
    - -
    -
    Returns a string representation of this record class.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Field Details

    -
      -
    • -
      -

      NONE

      -
      public static final Insets NONE
      -
      Empty layout insets that do not provide any borders around content.
      -
      -
    • -
    • -
      -

      ROOT_PANEL

      -
      public static final Insets ROOT_PANEL
      -
      The default insets of a root panel, providing 7 pixels around the content on all sides.
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Insets

      -
      public Insets(int top, - int left, - int bottom, - int right)
      -
      Constructs layout insets.
      -
      -
      Parameters:
      -
      top - the top (Y-) inset size
      -
      left - the left (X-) inset size
      -
      bottom - the bottom (Y+) inset size
      -
      right - the right (X+) inset size
      -
      -
      -
    • -
    • -
      -

      Insets

      -
      public Insets(int vertical, - int horizontal)
      -
      Constructs layout insets.
      -
      -
      Parameters:
      -
      vertical - the vertical (Y) size of the insets
      -
      horizontal - the horizontal (X) size of the insets
      -
      -
      -
    • -
    • -
      -

      Insets

      -
      public Insets(int size)
      -
      Constructs layout insets.
      -
      -
      Parameters:
      -
      size - the size of the insets on all sides
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toString

      -
      public final String toString()
      -
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      -
      -
      Specified by:
      -
      toString in class Record
      -
      Returns:
      -
      a string representation of this object
      -
      -
      -
    • -
    • -
      -

      hashCode

      -
      public final int hashCode()
      -
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      -
      -
      Specified by:
      -
      hashCode in class Record
      -
      Returns:
      -
      a hash code value for this object
      -
      -
      -
    • -
    • -
      -

      equals

      -
      public final boolean equals(Object o)
      -
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      -
      -
      Specified by:
      -
      equals in class Record
      -
      Parameters:
      -
      o - the object with which to compare
      -
      Returns:
      -
      true if this object is the same as the o argument; false otherwise.
      -
      -
      -
    • -
    • -
      -

      top

      -
      public int top()
      -
      Returns the value of the top record component.
      -
      -
      Returns:
      -
      the value of the top record component
      -
      -
      -
    • -
    • -
      -

      left

      -
      public int left()
      -
      Returns the value of the left record component.
      -
      -
      Returns:
      -
      the value of the left record component
      -
      -
      -
    • -
    • -
      -

      bottom

      -
      public int bottom()
      -
      Returns the value of the bottom record component.
      -
      -
      Returns:
      -
      the value of the bottom record component
      -
      -
      -
    • -
    • -
      -

      right

      -
      public int right()
      -
      Returns the value of the right record component.
      -
      -
      Returns:
      -
      the value of the right record component
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Insets (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Insets

+
+
java.lang.Object +
java.lang.Record +
io.github.cottonmc.cotton.gui.widget.data.Insets
+
+
+
+
+
Record Components:
+
top - the top (Y-) inset size
+
left - the left (X-) inset size
+
bottom - the bottom (Y+) inset size
+
right - the right (X+) inset size
+
+
+
public record Insets(int top, int left, int bottom, int right) +extends Record
+
The layout insets of a panel. The insets describe how many pixels should be around the panel's contents. + For example, root panels have 7 pixels around their contents, which is set via ROOT_PANEL.
+
+
Since:
+
4.0.0
+
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final Insets
    + +
    +
    Empty layout insets that do not provide any borders around content.
    +
    +
    static final Insets
    + +
    +
    The default insets of a root panel, providing 7 pixels around the content on all sides.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Insets(int size)
    +
    +
    Constructs layout insets.
    +
    +
    Insets(int vertical, + int horizontal)
    +
    +
    Constructs layout insets.
    +
    +
    Insets(int top, + int left, + int bottom, + int right)
    +
    +
    Constructs layout insets.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    + +
    +
    Returns the value of the bottom record component.
    +
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    int
    + +
    +
    Returns the value of the left record component.
    +
    +
    int
    + +
    +
    Returns the value of the right record component.
    +
    +
    int
    +
    top()
    +
    +
    Returns the value of the top record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      NONE

      +
      public static final Insets NONE
      +
      Empty layout insets that do not provide any borders around content.
      +
      +
    • +
    • +
      +

      ROOT_PANEL

      +
      public static final Insets ROOT_PANEL
      +
      The default insets of a root panel, providing 7 pixels around the content on all sides.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Insets

      +
      public Insets(int top, + int left, + int bottom, + int right)
      +
      Constructs layout insets.
      +
      +
      Parameters:
      +
      top - the top (Y-) inset size
      +
      left - the left (X-) inset size
      +
      bottom - the bottom (Y+) inset size
      +
      right - the right (X+) inset size
      +
      +
      +
    • +
    • +
      +

      Insets

      +
      public Insets(int vertical, + int horizontal)
      +
      Constructs layout insets.
      +
      +
      Parameters:
      +
      vertical - the vertical (Y) size of the insets
      +
      horizontal - the horizontal (X) size of the insets
      +
      +
      +
    • +
    • +
      +

      Insets

      +
      public Insets(int size)
      +
      Constructs layout insets.
      +
      +
      Parameters:
      +
      size - the size of the insets on all sides
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      top

      +
      public int top()
      +
      Returns the value of the top record component.
      +
      +
      Returns:
      +
      the value of the top record component
      +
      +
      +
    • +
    • +
      +

      left

      +
      public int left()
      +
      Returns the value of the left record component.
      +
      +
      Returns:
      +
      the value of the left record component
      +
      +
      +
    • +
    • +
      +

      bottom

      +
      public int bottom()
      +
      Returns the value of the bottom record component.
      +
      +
      Returns:
      +
      the value of the bottom record component
      +
      +
      +
    • +
    • +
      +

      right

      +
      public int right()
      +
      Returns the value of the right record component.
      +
      +
      Returns:
      +
      the value of the right record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.Builder.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.Builder.html index 49b36d4..4ddd3a3 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.Builder.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.Builder.html @@ -1,174 +1,175 @@ - - - - -ObservableProperty.Builder (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ObservableProperty.Builder<T>

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder<T>
-
-
-
-
Type Parameters:
-
T - the contained value type
-
-
-
Enclosing class:
-
ObservableProperty<T>
-
-
-
public static final class ObservableProperty.Builder<T> -extends Object
-
A builder for properties.
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - + + + + +ObservableProperty.Builder (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ObservableProperty.Builder<T>

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder<T>
+
+
+
+
Type Parameters:
+
T - the contained value type
+
+
+
Enclosing class:
+
ObservableProperty<T>
+
+
+
public static final class ObservableProperty.Builder<T> +extends Object
+
A builder for properties.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.html index a92fba5..da71c04 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.html @@ -1,338 +1,339 @@ - - - - -ObservableProperty (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ObservableProperty<T>

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.data.ObservableProperty<T>
-
-
-
-
Type Parameters:
-
T - the contained value type
-
-
-
All Implemented Interfaces:
-
ObservableView<T>, Supplier<T>
-
-
-
public final class ObservableProperty<T> -extends Object -implements ObservableView<T>
-
An observable mutable property. Observable properties are containers for values - that can be modified and listened to. - -

The naming convention for ObservableProperty getters follows the convention - <property name>Property. For example, the WWidget.hovered property can be retrieved with - hoveredProperty().

-
-
Since:
-
4.2.0
-
-
-
- -
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      empty

      -
      public static <T> ObservableProperty.Builder<T> empty()
      -
      Creates a "late init" property without an initial value. - The created property will throw an exception if it has not been initialised yet.
      -
      -
      Type Parameters:
      -
      T - the contained value type
      -
      Returns:
      -
      the created empty property builder
      -
      -
      -
    • -
    • -
      -

      of

      -
      public static <T> ObservableProperty.Builder<T> of(T initialValue)
      -
      Creates a property with an initial value.
      -
      -
      Type Parameters:
      -
      T - the contained value type
      -
      Parameters:
      -
      initialValue - the initial value
      -
      Returns:
      -
      the created property
      -
      -
      -
    • -
    • -
      -

      hasValue

      -
      public boolean hasValue()
      -
      Description copied from interface: ObservableView
      -
      Returns whether this property has been set to a value.
      -
      -
      Specified by:
      -
      hasValue in interface ObservableView<T>
      -
      Returns:
      -
      whether this property has been set to a value
      -
      -
      -
    • -
    • -
      -

      get

      -
      public T get()
      -
      Description copied from interface: ObservableView
      -
      Returns the value of this property.
      -
      -
      Specified by:
      -
      get in interface ObservableView<T>
      -
      Specified by:
      -
      get in interface Supplier<T>
      -
      Returns:
      -
      the value of this property
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      set

      -
      public void set(T value)
      -
      Sets this property to a constant value.
      -
      -
      Parameters:
      -
      value - the new value
      -
      Throws:
      -
      NullPointerException - if the value is null and nulls aren't allowed
      -
      -
      -
    • -
    • -
      -

      readOnly

      -
      public ObservableView<T> readOnly()
      -
      Returns a read-only view of this property. - The result is not an instance of ObservableProperty, - and thus can't be mutated.
      -
      -
      Returns:
      -
      an observable view of this property
      -
      -
      -
    • -
    • -
      -

      getName

      -
      public String getName()
      -
      Returns the name of this property.
      -
      -
      Returns:
      -
      the name of this property
      -
      -
      -
    • -
    • -
      -

      addListener

      -
      public void addListener(ObservableView.ChangeListener<? super T> listener)
      -
      Description copied from interface: ObservableView
      -
      Adds a change listener to this property view.
      -
      -
      Specified by:
      -
      addListener in interface ObservableView<T>
      -
      Parameters:
      -
      listener - the added listener
      -
      -
      -
    • -
    • -
      -

      removeListener

      -
      public void removeListener(ObservableView.ChangeListener<? super T> listener)
      -
      Description copied from interface: ObservableView
      -
      Removes a change listener from this property view if present.
      -
      -
      Specified by:
      -
      removeListener in interface ObservableView<T>
      -
      Parameters:
      -
      listener - the removed listener
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ObservableProperty (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ObservableProperty<T>

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.data.ObservableProperty<T>
+
+
+
+
Type Parameters:
+
T - the contained value type
+
+
+
All Implemented Interfaces:
+
ObservableView<T>, Supplier<T>
+
+
+
public final class ObservableProperty<T> +extends Object +implements ObservableView<T>
+
An observable mutable property. Observable properties are containers for values + that can be modified and listened to. + +

The naming convention for ObservableProperty getters follows the convention + <property name>Property. For example, the WWidget.hovered property can be retrieved with + hoveredProperty().

+
+
Since:
+
4.2.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      empty

      +
      public static <T> ObservableProperty.Builder<T> empty()
      +
      Creates a "late init" property without an initial value. + The created property will throw an exception if it has not been initialised yet.
      +
      +
      Type Parameters:
      +
      T - the contained value type
      +
      Returns:
      +
      the created empty property builder
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static <T> ObservableProperty.Builder<T> of(T initialValue)
      +
      Creates a property with an initial value.
      +
      +
      Type Parameters:
      +
      T - the contained value type
      +
      Parameters:
      +
      initialValue - the initial value
      +
      Returns:
      +
      the created property
      +
      +
      +
    • +
    • +
      +

      hasValue

      +
      public boolean hasValue()
      +
      Description copied from interface: ObservableView
      +
      Returns whether this property has been set to a value.
      +
      +
      Specified by:
      +
      hasValue in interface ObservableView<T>
      +
      Returns:
      +
      whether this property has been set to a value
      +
      +
      +
    • +
    • +
      +

      get

      +
      public T get()
      +
      Description copied from interface: ObservableView
      +
      Returns the value of this property.
      +
      +
      Specified by:
      +
      get in interface ObservableView<T>
      +
      Specified by:
      +
      get in interface Supplier<T>
      +
      Returns:
      +
      the value of this property
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      set

      +
      public void set(T value)
      +
      Sets this property to a constant value.
      +
      +
      Parameters:
      +
      value - the new value
      +
      Throws:
      +
      NullPointerException - if the value is null and nulls aren't allowed
      +
      +
      +
    • +
    • +
      +

      readOnly

      +
      public ObservableView<T> readOnly()
      +
      Returns a read-only view of this property. + The result is not an instance of ObservableProperty, + and thus can't be mutated.
      +
      +
      Returns:
      +
      an observable view of this property
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Returns the name of this property.
      +
      +
      Returns:
      +
      the name of this property
      +
      +
      +
    • +
    • +
      +

      addListener

      +
      public void addListener(ObservableView.ChangeListener<? super T> listener)
      +
      Description copied from interface: ObservableView
      +
      Adds a change listener to this property view.
      +
      +
      Specified by:
      +
      addListener in interface ObservableView<T>
      +
      Parameters:
      +
      listener - the added listener
      +
      +
      +
    • +
    • +
      +

      removeListener

      +
      public void removeListener(ObservableView.ChangeListener<? super T> listener)
      +
      Description copied from interface: ObservableView
      +
      Removes a change listener from this property view if present.
      +
      +
      Specified by:
      +
      removeListener in interface ObservableView<T>
      +
      Parameters:
      +
      listener - the removed listener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.ChangeListener.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.ChangeListener.html index 77118b5..55d4408 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.ChangeListener.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.ChangeListener.html @@ -1,152 +1,153 @@ - - - - -ObservableView.ChangeListener (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface ObservableView.ChangeListener<T>

-
-
-
-
Type Parameters:
-
T - the value type listened to
-
-
-
Enclosing interface:
-
ObservableView<T>
-
-
-
Functional Interface:
-
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
-
-
@FunctionalInterface -public static interface ObservableView.ChangeListener<T>
-
A listener for changes in observable views and properties.
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    -
    onPropertyChange(ObservableView<? extends T> property, - T from, - T to)
    -
    -
    Handles a change in an observable property.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      onPropertyChange

      -
      void onPropertyChange(ObservableView<? extends T> property, - @Nullable - T from, - @Nullable - T to)
      -
      Handles a change in an observable property.
      -
      -
      Parameters:
      -
      property - the changed property or view
      -
      from - the previous value, or null if not set before
      -
      to - the new value, or null if cleared
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ObservableView.ChangeListener (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ObservableView.ChangeListener<T>

+
+
+
+
Type Parameters:
+
T - the value type listened to
+
+
+
Enclosing interface:
+
ObservableView<T>
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface ObservableView.ChangeListener<T>
+
A listener for changes in observable views and properties.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onPropertyChange(ObservableView<? extends T> property, + T from, + T to)
    +
    +
    Handles a change in an observable property.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onPropertyChange

      +
      void onPropertyChange(ObservableView<? extends T> property, + @Nullable + T from, + @Nullable + T to)
      +
      Handles a change in an observable property.
      +
      +
      Parameters:
      +
      property - the changed property or view
      +
      from - the previous value, or null if not set before
      +
      to - the new value, or null if cleared
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.html index 750def6..d0b4a0b 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/ObservableView.html @@ -1,256 +1,257 @@ - - - - -ObservableView (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface ObservableView<T>

-
-
-
-
Type Parameters:
-
T - the contained value type
-
-
-
All Superinterfaces:
-
Supplier<T>
-
-
-
All Known Implementing Classes:
-
ObservableProperty
-
-
-
public interface ObservableView<T> -extends Supplier<T>
-
A read-only observable property.
-
-
Since:
-
4.2.0
-
-
-
-
    - -
  • -
    -

    Nested Class Summary

    -
    Nested Classes
    -
    -
    Modifier and Type
    -
    Interface
    -
    Description
    -
    static interface 
    - -
    -
    A listener for changes in observable views and properties.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    - -
    -
    Adds a change listener to this property view.
    -
    -
    default Optional<T>
    - -
    -
    Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
    -
    - -
    get()
    -
    -
    Returns the value of this property.
    -
    -
    default T
    - -
    -
    Returns the value of this property, or null if not initialized.
    -
    -
    boolean
    - -
    -
    Returns whether this property has been set to a value.
    -
    -
    void
    - -
    -
    Removes a change listener from this property view if present.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      hasValue

      -
      boolean hasValue()
      -
      Returns whether this property has been set to a value.
      -
      -
      Returns:
      -
      whether this property has been set to a value
      -
      -
      -
    • -
    • -
      -

      get

      -
      T get()
      -
      Returns the value of this property.
      -
      -
      Specified by:
      -
      get in interface Supplier<T>
      -
      Returns:
      -
      the value of this property
      -
      Throws:
      -
      IllegalStateException - if not initialized
      -
      See Also:
      -
      - -
      -
      -
      -
    • -
    • -
      -

      getOrNull

      -
      @Nullable -default T getOrNull()
      -
      Returns the value of this property, or null if not initialized.
      -
      -
      Returns:
      -
      the value of this property, or null if not initialized
      -
      -
      -
    • -
    • -
      -

      find

      -
      default Optional<T> find()
      -
      Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
      -
      -
      Returns:
      -
      the nonnull value of this property, or Optional.empty() if null or not initialized
      -
      -
      -
    • -
    • -
      -

      addListener

      -
      void addListener(ObservableView.ChangeListener<? super T> listener)
      -
      Adds a change listener to this property view.
      -
      -
      Parameters:
      -
      listener - the added listener
      -
      -
      -
    • -
    • -
      -

      removeListener

      -
      void removeListener(ObservableView.ChangeListener<? super T> listener)
      -
      Removes a change listener from this property view if present.
      -
      -
      Parameters:
      -
      listener - the removed listener
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ObservableView (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ObservableView<T>

+
+
+
+
Type Parameters:
+
T - the contained value type
+
+
+
All Superinterfaces:
+
Supplier<T>
+
+
+
All Known Implementing Classes:
+
ObservableProperty
+
+
+
public interface ObservableView<T> +extends Supplier<T>
+
A read-only observable property.
+
+
Since:
+
4.2.0
+
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Interface
    +
    Description
    +
    static interface 
    + +
    +
    A listener for changes in observable views and properties.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Adds a change listener to this property view.
    +
    +
    default Optional<T>
    + +
    +
    Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
    +
    + +
    get()
    +
    +
    Returns the value of this property.
    +
    +
    default T
    + +
    +
    Returns the value of this property, or null if not initialized.
    +
    +
    boolean
    + +
    +
    Returns whether this property has been set to a value.
    +
    +
    void
    + +
    +
    Removes a change listener from this property view if present.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      hasValue

      +
      boolean hasValue()
      +
      Returns whether this property has been set to a value.
      +
      +
      Returns:
      +
      whether this property has been set to a value
      +
      +
      +
    • +
    • +
      +

      get

      +
      T get()
      +
      Returns the value of this property.
      +
      +
      Specified by:
      +
      get in interface Supplier<T>
      +
      Returns:
      +
      the value of this property
      +
      Throws:
      +
      IllegalStateException - if not initialized
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getOrNull

      +
      @Nullable +default T getOrNull()
      +
      Returns the value of this property, or null if not initialized.
      +
      +
      Returns:
      +
      the value of this property, or null if not initialized
      +
      +
      +
    • +
    • +
      +

      find

      +
      default Optional<T> find()
      +
      Returns the nonnull value of this property, or Optional.empty() if null or not initialized.
      +
      +
      Returns:
      +
      the nonnull value of this property, or Optional.empty() if null or not initialized
      +
      +
      +
    • +
    • +
      +

      addListener

      +
      void addListener(ObservableView.ChangeListener<? super T> listener)
      +
      Adds a change listener to this property view.
      +
      +
      Parameters:
      +
      listener - the added listener
      +
      +
      +
    • +
    • +
      +

      removeListener

      +
      void removeListener(ObservableView.ChangeListener<? super T> listener)
      +
      Removes a change listener from this property view if present.
      +
      +
      Parameters:
      +
      listener - the removed listener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Rect2i.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Rect2i.html index 7ea24f6..cb41019 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Rect2i.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Rect2i.html @@ -1,299 +1,300 @@ - - - - -Rect2i (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Record Class Rect2i

-
-
java.lang.Object -
java.lang.Record -
io.github.cottonmc.cotton.gui.widget.data.Rect2i
-
-
-
-
-
Record Components:
-
x - the X coordinate
-
y - the Y coordinate
-
width - the horizontal size
-
height - the vertical size
-
-
-
public record Rect2i(int x, int y, int width, int height) -extends Record
-
An immutable, two-dimensional int rectangle consisting of a position and dimensions. - This record can be used to represent rectangles on the screen.
-
-
Since:
-
7.0.0
-
-
-
-
    - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    -
    Rect2i(int x, - int y, - int width, - int height)
    -
    -
    Creates an instance of a Rect2i record class.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    final boolean
    - -
    -
    Indicates whether some other object is "equal to" this one.
    -
    -
    final int
    - -
    -
    Returns a hash code value for this object.
    -
    -
    int
    - -
    -
    Returns the value of the height record component.
    -
    -
    final String
    - -
    -
    Returns a string representation of this record class.
    -
    -
    int
    - -
    -
    Returns the value of the width record component.
    -
    -
    int
    -
    x()
    -
    -
    Returns the value of the x record component.
    -
    -
    int
    -
    y()
    -
    -
    Returns the value of the y record component.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Rect2i

      -
      public Rect2i(int x, - int y, - int width, - int height)
      -
      Creates an instance of a Rect2i record class.
      -
      -
      Parameters:
      -
      x - the value for the x record component
      -
      y - the value for the y record component
      -
      width - the value for the width record component
      -
      height - the value for the height record component
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toString

      -
      public final String toString()
      -
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      -
      -
      Specified by:
      -
      toString in class Record
      -
      Returns:
      -
      a string representation of this object
      -
      -
      -
    • -
    • -
      -

      hashCode

      -
      public final int hashCode()
      -
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      -
      -
      Specified by:
      -
      hashCode in class Record
      -
      Returns:
      -
      a hash code value for this object
      -
      -
      -
    • -
    • -
      -

      equals

      -
      public final boolean equals(Object o)
      -
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      -
      -
      Specified by:
      -
      equals in class Record
      -
      Parameters:
      -
      o - the object with which to compare
      -
      Returns:
      -
      true if this object is the same as the o argument; false otherwise.
      -
      -
      -
    • -
    • -
      -

      x

      -
      public int x()
      -
      Returns the value of the x record component.
      -
      -
      Returns:
      -
      the value of the x record component
      -
      -
      -
    • -
    • -
      -

      y

      -
      public int y()
      -
      Returns the value of the y record component.
      -
      -
      Returns:
      -
      the value of the y record component
      -
      -
      -
    • -
    • -
      -

      width

      -
      public int width()
      -
      Returns the value of the width record component.
      -
      -
      Returns:
      -
      the value of the width record component
      -
      -
      -
    • -
    • -
      -

      height

      -
      public int height()
      -
      Returns the value of the height record component.
      -
      -
      Returns:
      -
      the value of the height record component
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Rect2i (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Rect2i

+
+
java.lang.Object +
java.lang.Record +
io.github.cottonmc.cotton.gui.widget.data.Rect2i
+
+
+
+
+
Record Components:
+
x - the X coordinate
+
y - the Y coordinate
+
width - the horizontal size
+
height - the vertical size
+
+
+
public record Rect2i(int x, int y, int width, int height) +extends Record
+
An immutable, two-dimensional int rectangle consisting of a position and dimensions. + This record can be used to represent rectangles on the screen.
+
+
Since:
+
7.0.0
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Rect2i(int x, + int y, + int width, + int height)
    +
    +
    Creates an instance of a Rect2i record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    int
    + +
    +
    Returns the value of the height record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    int
    + +
    +
    Returns the value of the width record component.
    +
    +
    int
    +
    x()
    +
    +
    Returns the value of the x record component.
    +
    +
    int
    +
    y()
    +
    +
    Returns the value of the y record component.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Rect2i

      +
      public Rect2i(int x, + int y, + int width, + int height)
      +
      Creates an instance of a Rect2i record class.
      +
      +
      Parameters:
      +
      x - the value for the x record component
      +
      y - the value for the y record component
      +
      width - the value for the width record component
      +
      height - the value for the height record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      x

      +
      public int x()
      +
      Returns the value of the x record component.
      +
      +
      Returns:
      +
      the value of the x record component
      +
      +
      +
    • +
    • +
      +

      y

      +
      public int y()
      +
      Returns the value of the y record component.
      +
      +
      Returns:
      +
      the value of the y record component
      +
      +
      +
    • +
    • +
      +

      width

      +
      public int width()
      +
      Returns the value of the width record component.
      +
      +
      Returns:
      +
      the value of the width record component
      +
      +
      +
    • +
    • +
      +

      height

      +
      public int height()
      +
      Returns the value of the height record component.
      +
      +
      Returns:
      +
      the value of the height record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Texture.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Texture.html index a93484c..6ca2f97 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Texture.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Texture.html @@ -1,364 +1,365 @@ - - - - -Texture (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Record Class Texture

-
-
java.lang.Object -
java.lang.Record -
io.github.cottonmc.cotton.gui.widget.data.Texture
-
-
-
-
-
Record Components:
-
image - the image of this texture
-
u1 - the start U-coordinate, between 0 and 1
-
v1 - the start V-coordinate, between 0 and 1
-
u2 - the end U-coordinate, between 0 and 1
-
v2 - the end V-coordinate, between 0 and 1
-
-
-
public record Texture(Identifier image, float u1, float v1, float u2, float v2) -extends Record
-
Represents a texture for a widget.
-
-
Since:
-
3.0.0
-
-
-
-
    - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    - -
    -
    Constructs a new texture that uses the full image.
    -
    -
    Texture(Identifier image, - float u1, - float v1, - float u2, - float v2)
    -
    -
    Constructs a new texture with custom UV values.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    final boolean
    - -
    -
    Indicates whether some other object is "equal to" this one.
    -
    -
    final int
    - -
    -
    Returns a hash code value for this object.
    -
    - - -
    -
    Returns the value of the image record component.
    -
    -
    final String
    - -
    -
    Returns a string representation of this record class.
    -
    -
    float
    -
    u1()
    -
    -
    Returns the value of the u1 record component.
    -
    -
    float
    -
    u2()
    -
    -
    Returns the value of the u2 record component.
    -
    -
    float
    -
    v1()
    -
    -
    Returns the value of the v1 record component.
    -
    -
    float
    -
    v2()
    -
    -
    Returns the value of the v2 record component.
    -
    - -
    withUv(float u1, - float v1, - float u2, - float v2)
    -
    -
    Creates a new texture with different UV values.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Texture

      -
      public Texture(Identifier image)
      -
      Constructs a new texture that uses the full image.
      -
      -
      Parameters:
      -
      image - the image
      -
      Throws:
      -
      NullPointerException - if the image is null
      -
      -
      -
    • -
    • -
      -

      Texture

      -
      public Texture(Identifier image, - float u1, - float v1, - float u2, - float v2)
      -
      Constructs a new texture with custom UV values.
      -
      -
      Parameters:
      -
      image - the image
      -
      u1 - the left U coordinate
      -
      v1 - the top V coordinate
      -
      u2 - the right U coordinate
      -
      v2 - the bottom V coordinate
      -
      Throws:
      -
      NullPointerException - if the image is null
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      withUv

      -
      public Texture withUv(float u1, - float v1, - float u2, - float v2)
      -
      Creates a new texture with different UV values.
      -
      -
      Parameters:
      -
      u1 - the left U coordinate
      -
      v1 - the top V coordinate
      -
      u2 - the right U coordinate
      -
      v2 - the bottom V coordinate
      -
      Returns:
      -
      the created texture
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public final String toString()
      -
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      -
      -
      Specified by:
      -
      toString in class Record
      -
      Returns:
      -
      a string representation of this object
      -
      -
      -
    • -
    • -
      -

      hashCode

      -
      public final int hashCode()
      -
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      -
      -
      Specified by:
      -
      hashCode in class Record
      -
      Returns:
      -
      a hash code value for this object
      -
      -
      -
    • -
    • -
      -

      equals

      -
      public final boolean equals(Object o)
      -
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      -
      -
      Specified by:
      -
      equals in class Record
      -
      Parameters:
      -
      o - the object with which to compare
      -
      Returns:
      -
      true if this object is the same as the o argument; false otherwise.
      -
      -
      -
    • -
    • -
      -

      image

      -
      public Identifier image()
      -
      Returns the value of the image record component.
      -
      -
      Returns:
      -
      the value of the image record component
      -
      -
      -
    • -
    • -
      -

      u1

      -
      public float u1()
      -
      Returns the value of the u1 record component.
      -
      -
      Returns:
      -
      the value of the u1 record component
      -
      -
      -
    • -
    • -
      -

      v1

      -
      public float v1()
      -
      Returns the value of the v1 record component.
      -
      -
      Returns:
      -
      the value of the v1 record component
      -
      -
      -
    • -
    • -
      -

      u2

      -
      public float u2()
      -
      Returns the value of the u2 record component.
      -
      -
      Returns:
      -
      the value of the u2 record component
      -
      -
      -
    • -
    • -
      -

      v2

      -
      public float v2()
      -
      Returns the value of the v2 record component.
      -
      -
      Returns:
      -
      the value of the v2 record component
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Texture (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Texture

+
+
java.lang.Object +
java.lang.Record +
io.github.cottonmc.cotton.gui.widget.data.Texture
+
+
+
+
+
Record Components:
+
image - the image of this texture
+
u1 - the start U-coordinate, between 0 and 1
+
v1 - the start V-coordinate, between 0 and 1
+
u2 - the end U-coordinate, between 0 and 1
+
v2 - the end V-coordinate, between 0 and 1
+
+
+
public record Texture(Identifier image, float u1, float v1, float u2, float v2) +extends Record
+
Represents a texture for a widget.
+
+
Since:
+
3.0.0
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructs a new texture that uses the full image.
    +
    +
    Texture(Identifier image, + float u1, + float v1, + float u2, + float v2)
    +
    +
    Constructs a new texture with custom UV values.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + + +
    +
    Returns the value of the image record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    float
    +
    u1()
    +
    +
    Returns the value of the u1 record component.
    +
    +
    float
    +
    u2()
    +
    +
    Returns the value of the u2 record component.
    +
    +
    float
    +
    v1()
    +
    +
    Returns the value of the v1 record component.
    +
    +
    float
    +
    v2()
    +
    +
    Returns the value of the v2 record component.
    +
    + +
    withUv(float u1, + float v1, + float u2, + float v2)
    +
    +
    Creates a new texture with different UV values.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Texture

      +
      public Texture(Identifier image)
      +
      Constructs a new texture that uses the full image.
      +
      +
      Parameters:
      +
      image - the image
      +
      Throws:
      +
      NullPointerException - if the image is null
      +
      +
      +
    • +
    • +
      +

      Texture

      +
      public Texture(Identifier image, + float u1, + float v1, + float u2, + float v2)
      +
      Constructs a new texture with custom UV values.
      +
      +
      Parameters:
      +
      image - the image
      +
      u1 - the left U coordinate
      +
      v1 - the top V coordinate
      +
      u2 - the right U coordinate
      +
      v2 - the bottom V coordinate
      +
      Throws:
      +
      NullPointerException - if the image is null
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      withUv

      +
      public Texture withUv(float u1, + float v1, + float u2, + float v2)
      +
      Creates a new texture with different UV values.
      +
      +
      Parameters:
      +
      u1 - the left U coordinate
      +
      v1 - the top V coordinate
      +
      u2 - the right U coordinate
      +
      v2 - the bottom V coordinate
      +
      Returns:
      +
      the created texture
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      image

      +
      public Identifier image()
      +
      Returns the value of the image record component.
      +
      +
      Returns:
      +
      the value of the image record component
      +
      +
      +
    • +
    • +
      +

      u1

      +
      public float u1()
      +
      Returns the value of the u1 record component.
      +
      +
      Returns:
      +
      the value of the u1 record component
      +
      +
      +
    • +
    • +
      +

      v1

      +
      public float v1()
      +
      Returns the value of the v1 record component.
      +
      +
      Returns:
      +
      the value of the v1 record component
      +
      +
      +
    • +
    • +
      +

      u2

      +
      public float u2()
      +
      Returns the value of the u2 record component.
      +
      +
      Returns:
      +
      the value of the u2 record component
      +
      +
      +
    • +
    • +
      +

      v2

      +
      public float v2()
      +
      Returns the value of the v2 record component.
      +
      +
      Returns:
      +
      the value of the v2 record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/Vec2i.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/Vec2i.html index e22ca82..0acc57e 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/Vec2i.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/Vec2i.html @@ -1,259 +1,260 @@ - - - - -Vec2i (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Record Class Vec2i

-
-
java.lang.Object -
java.lang.Record -
io.github.cottonmc.cotton.gui.widget.data.Vec2i
-
-
-
-
-
Record Components:
-
x - the horizontal component
-
y - the vertical component
-
-
-
public record Vec2i(int x, int y) -extends Record
-
An immutable, two-dimensional int vector. - This record can be used to represent positions on the screen.
-
-
Since:
-
4.0.0
-
-
-
-
    - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    -
    Vec2i(int x, - int y)
    -
    -
    Creates an instance of a Vec2i record class.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    final boolean
    - -
    -
    Indicates whether some other object is "equal to" this one.
    -
    -
    final int
    - -
    -
    Returns a hash code value for this object.
    -
    -
    final String
    - -
    -
    Returns a string representation of this record class.
    -
    -
    int
    -
    x()
    -
    -
    Returns the value of the x record component.
    -
    -
    int
    -
    y()
    -
    -
    Returns the value of the y record component.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Vec2i

      -
      public Vec2i(int x, - int y)
      -
      Creates an instance of a Vec2i record class.
      -
      -
      Parameters:
      -
      x - the value for the x record component
      -
      y - the value for the y record component
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      toString

      -
      public final String toString()
      -
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      -
      -
      Specified by:
      -
      toString in class Record
      -
      Returns:
      -
      a string representation of this object
      -
      -
      -
    • -
    • -
      -

      hashCode

      -
      public final int hashCode()
      -
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      -
      -
      Specified by:
      -
      hashCode in class Record
      -
      Returns:
      -
      a hash code value for this object
      -
      -
      -
    • -
    • -
      -

      equals

      -
      public final boolean equals(Object o)
      -
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      -
      -
      Specified by:
      -
      equals in class Record
      -
      Parameters:
      -
      o - the object with which to compare
      -
      Returns:
      -
      true if this object is the same as the o argument; false otherwise.
      -
      -
      -
    • -
    • -
      -

      x

      -
      public int x()
      -
      Returns the value of the x record component.
      -
      -
      Returns:
      -
      the value of the x record component
      -
      -
      -
    • -
    • -
      -

      y

      -
      public int y()
      -
      Returns the value of the y record component.
      -
      -
      Returns:
      -
      the value of the y record component
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Vec2i (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Vec2i

+
+
java.lang.Object +
java.lang.Record +
io.github.cottonmc.cotton.gui.widget.data.Vec2i
+
+
+
+
+
Record Components:
+
x - the horizontal component
+
y - the vertical component
+
+
+
public record Vec2i(int x, int y) +extends Record
+
An immutable, two-dimensional int vector. + This record can be used to represent positions on the screen.
+
+
Since:
+
4.0.0
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Vec2i(int x, + int y)
    +
    +
    Creates an instance of a Vec2i record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    int
    +
    x()
    +
    +
    Returns the value of the x record component.
    +
    +
    int
    +
    y()
    +
    +
    Returns the value of the y record component.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Vec2i

      +
      public Vec2i(int x, + int y)
      +
      Creates an instance of a Vec2i record class.
      +
      +
      Parameters:
      +
      x - the value for the x record component
      +
      y - the value for the y record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      x

      +
      public int x()
      +
      Returns the value of the x record component.
      +
      +
      Returns:
      +
      the value of the x record component
      +
      +
      +
    • +
    • +
      +

      y

      +
      public int y()
      +
      Returns the value of the y record component.
      +
      +
      Returns:
      +
      the value of the y record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/VerticalAlignment.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/VerticalAlignment.html index e05ac4b..d2e0bd8 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/VerticalAlignment.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/VerticalAlignment.html @@ -1,224 +1,225 @@ - - - - -VerticalAlignment (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Enum Class VerticalAlignment

-
-
java.lang.Object -
java.lang.Enum<VerticalAlignment> -
io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
-
-
-
-
-
All Implemented Interfaces:
-
Serializable, Comparable<VerticalAlignment>, Constable
-
-
-
public enum VerticalAlignment -extends Enum<VerticalAlignment>
-
-
- -
-
-
    - -
  • -
    -

    Enum Constant Details

    - -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      values

      -
      public static VerticalAlignment[] values()
      -
      Returns an array containing the constants of this enum class, in -the order they are declared.
      -
      -
      Returns:
      -
      an array containing the constants of this enum class, in the order they are declared
      -
      -
      -
    • -
    • -
      -

      valueOf

      -
      public static VerticalAlignment valueOf(String name)
      -
      Returns the enum constant of this class with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this class. (Extraneous whitespace characters are -not permitted.)
      -
      -
      Parameters:
      -
      name - the name of the enum constant to be returned.
      -
      Returns:
      -
      the enum constant with the specified name
      -
      Throws:
      -
      IllegalArgumentException - if this enum class has no constant with the specified name
      -
      NullPointerException - if the argument is null
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +VerticalAlignment (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class VerticalAlignment

+
+
java.lang.Object +
java.lang.Enum<VerticalAlignment> +
io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<VerticalAlignment>, Constable
+
+
+
public enum VerticalAlignment +extends Enum<VerticalAlignment>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static VerticalAlignment[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static VerticalAlignment valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/package-summary.html index 3fd9007..b886bd2 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/package-summary.html @@ -1,159 +1,160 @@ - - - - -io.github.cottonmc.cotton.gui.widget.data (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.widget.data

-
-
-
package io.github.cottonmc.cotton.gui.widget.data
-
-
Data classes used by widgets.
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.data (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.widget.data

+
+
+
package io.github.cottonmc.cotton.gui.widget.data
+
+
Data classes used by widgets.
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/data/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/widget/data/package-tree.html index 3d46101..3101b09 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/data/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/data/package-tree.html @@ -1,111 +1,112 @@ - - - - -io.github.cottonmc.cotton.gui.widget.data Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.data

-Package Hierarchies: - -
-
-

Class Hierarchy

-
    -
  • java.lang.Object -
      -
    • io.github.cottonmc.cotton.gui.widget.data.Color.HSL (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • -
    • io.github.cottonmc.cotton.gui.widget.data.Color.LCH (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • -
    • io.github.cottonmc.cotton.gui.widget.data.Color.RGB (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • -
    • io.github.cottonmc.cotton.gui.widget.data.ObservableProperty<T> (implements io.github.cottonmc.cotton.gui.widget.data.ObservableView<T>)
    • -
    • io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder<T>
    • -
    • java.lang.Record -
        -
      • io.github.cottonmc.cotton.gui.widget.data.Insets
      • -
      • io.github.cottonmc.cotton.gui.widget.data.Rect2i
      • -
      • io.github.cottonmc.cotton.gui.widget.data.Texture
      • -
      • io.github.cottonmc.cotton.gui.widget.data.Vec2i
      • -
      -
    • -
    -
  • -
-
-
-

Interface Hierarchy

- -
-
-

Enum Class Hierarchy

- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.data Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.data

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • io.github.cottonmc.cotton.gui.widget.data.Color.HSL (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • +
    • io.github.cottonmc.cotton.gui.widget.data.Color.LCH (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • +
    • io.github.cottonmc.cotton.gui.widget.data.Color.RGB (implements io.github.cottonmc.cotton.gui.widget.data.Color)
    • +
    • io.github.cottonmc.cotton.gui.widget.data.ObservableProperty<T> (implements io.github.cottonmc.cotton.gui.widget.data.ObservableView<T>)
    • +
    • io.github.cottonmc.cotton.gui.widget.data.ObservableProperty.Builder<T>
    • +
    • java.lang.Record +
        +
      • io.github.cottonmc.cotton.gui.widget.data.Insets
      • +
      • io.github.cottonmc.cotton.gui.widget.data.Rect2i
      • +
      • io.github.cottonmc.cotton.gui.widget.data.Texture
      • +
      • io.github.cottonmc.cotton.gui.widget.data.Vec2i
      • +
      +
    • +
    +
  • +
+
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/Focus.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/Focus.html index 252c95d..ab58436 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/Focus.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/Focus.html @@ -1,282 +1,283 @@ - - - - -Focus (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Record Class Focus<K>

-
-
java.lang.Object -
java.lang.Record -
io.github.cottonmc.cotton.gui.widget.focus.Focus<K>
-
-
-
-
-
Type Parameters:
-
K - the key type
-
Record Components:
-
key - the key
-
area - the focusable area in widget space
-
-
-
public record Focus<K>(K key, Rect2i area) -extends Record
-
A focus is a focusable area in a widget. - -

Foci can also carry a "key", which is a custom data value - used to identify a specific focus. For example, an item slot grid - widget might use K = Integer to identify each individual slot.

-
-
Since:
-
7.0.0
-
-
-
-
    - -
  • -
    -

    Constructor Summary

    -
    Constructors
    -
    -
    Constructor
    -
    Description
    -
    Focus(K key, - Rect2i area)
    -
    -
    Creates an instance of a Focus record class.
    -
    -
    -
    -
  • - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    Returns the value of the area record component.
    -
    -
    final boolean
    - -
    -
    Indicates whether some other object is "equal to" this one.
    -
    -
    final int
    - -
    -
    Returns a hash code value for this object.
    -
    - -
    key()
    -
    -
    Returns the value of the key record component.
    -
    - -
    of(Rect2i area)
    -
    -
    Creates a focus of an area and null data.
    -
    -
    final String
    - -
    -
    Returns a string representation of this record class.
    -
    -
    -
    -
    -
    -

    Methods inherited from class java.lang.Object

    -clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      Focus

      -
      public Focus(K key, - Rect2i area)
      -
      Creates an instance of a Focus record class.
      -
      -
      Parameters:
      -
      key - the value for the key record component
      -
      area - the value for the area record component
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      of

      -
      public static Focus<@Nullable Void> of(Rect2i area)
      -
      Creates a focus of an area and null data.
      -
      -
      Parameters:
      -
      area - the area
      -
      Returns:
      -
      the focus
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public final String toString()
      -
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      -
      -
      Specified by:
      -
      toString in class Record
      -
      Returns:
      -
      a string representation of this object
      -
      -
      -
    • -
    • -
      -

      hashCode

      -
      public final int hashCode()
      -
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      -
      -
      Specified by:
      -
      hashCode in class Record
      -
      Returns:
      -
      a hash code value for this object
      -
      -
      -
    • -
    • -
      -

      equals

      -
      public final boolean equals(Object o)
      -
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      -
      -
      Specified by:
      -
      equals in class Record
      -
      Parameters:
      -
      o - the object with which to compare
      -
      Returns:
      -
      true if this object is the same as the o argument; false otherwise.
      -
      -
      -
    • -
    • -
      -

      key

      -
      public K key()
      -
      Returns the value of the key record component.
      -
      -
      Returns:
      -
      the value of the key record component
      -
      -
      -
    • -
    • -
      -

      area

      -
      public Rect2i area()
      -
      Returns the value of the area record component.
      -
      -
      Returns:
      -
      the value of the area record component
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Focus (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Focus<K>

+
+
java.lang.Object +
java.lang.Record +
io.github.cottonmc.cotton.gui.widget.focus.Focus<K>
+
+
+
+
+
Type Parameters:
+
K - the key type
+
Record Components:
+
key - the key
+
area - the focusable area in widget space
+
+
+
public record Focus<K>(K key, Rect2i area) +extends Record
+
A focus is a focusable area in a widget. + +

Foci can also carry a "key", which is a custom data value + used to identify a specific focus. For example, an item slot grid + widget might use K = Integer to identify each individual slot.

+
+
Since:
+
7.0.0
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Focus(K key, + Rect2i area)
    +
    +
    Creates an instance of a Focus record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns the value of the area record component.
    +
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + +
    key()
    +
    +
    Returns the value of the key record component.
    +
    + +
    of(Rect2i area)
    +
    +
    Creates a focus of an area and null data.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Focus

      +
      public Focus(K key, + Rect2i area)
      +
      Creates an instance of a Focus record class.
      +
      +
      Parameters:
      +
      key - the value for the key record component
      +
      area - the value for the area record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static Focus<@Nullable Void> of(Rect2i area)
      +
      Creates a focus of an area and null data.
      +
      +
      Parameters:
      +
      area - the area
      +
      Returns:
      +
      the focus
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      key

      +
      public K key()
      +
      Returns the value of the key record component.
      +
      +
      Returns:
      +
      the value of the key record component
      +
      +
      +
    • +
    • +
      +

      area

      +
      public Rect2i area()
      +
      Returns the value of the area record component.
      +
      +
      Returns:
      +
      the value of the area record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/FocusModel.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/FocusModel.html index 2b1157d..c7dbc3f 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/FocusModel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/FocusModel.html @@ -1,208 +1,209 @@ - - - - -FocusModel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface FocusModel<K>

-
-
-
-
Type Parameters:
-
K - the focus key type
-
-
-
All Known Implementing Classes:
-
SimpleKeyedFocusModel
-
-
-
public interface FocusModel<K>
-
Manages the state of individual foci in a widget. - Each instance should be specific to one widget.
-
-
Since:
-
7.0.0
-
See Also:
-
- -
-
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    - - -
    -
    Returns a stream of all foci in the target widget.
    -
    -
    boolean
    -
    isFocused(Focus<K> focus)
    -
    -
    Checks if a focus is focused in the target widget.
    -
    -
    void
    -
    setFocused(Focus<K> focus)
    -
    -
    Applies a focus to the target widget.
    -
    -
    static FocusModel<?>
    -
    simple(WWidget widget)
    -
    -
    Creates a simple focus model for a focusable widget.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      isFocused

      -
      boolean isFocused(Focus<K> focus)
      -
      Checks if a focus is focused in the target widget. - If the target widget is not focused itself, none of its foci should have focus.
      -
      -
      Parameters:
      -
      focus - the focus to check
      -
      Returns:
      -
      true if the focus is focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      setFocused

      -
      void setFocused(Focus<K> focus)
      -
      Applies a focus to the target widget. - -

      This method does not need to request the GUI's focus - for the widget; that is the responsibility of the caller.

      -
      -
      Parameters:
      -
      focus - the focus
      -
      -
      -
    • -
    • -
      -

      foci

      -
      Stream<Focus<K>> foci()
      -
      Returns a stream of all foci in the target widget.
      -
      -
      Returns:
      -
      a stream of all foci in the target widget
      -
      -
      -
    • -
    • -
      -

      simple

      -
      static FocusModel<?> simple(WWidget widget)
      -
      Creates a simple focus model for a focusable widget. - The focus model provides the whole widget area as its only focus area.
      -
      -
      Parameters:
      -
      widget - the widget
      -
      Returns:
      -
      the focus model
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +FocusModel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface FocusModel<K>

+
+
+
+
Type Parameters:
+
K - the focus key type
+
+
+
All Known Implementing Classes:
+
SimpleKeyedFocusModel
+
+
+
public interface FocusModel<K>
+
Manages the state of individual foci in a widget. + Each instance should be specific to one widget.
+
+
Since:
+
7.0.0
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns a stream of all foci in the target widget.
    +
    +
    boolean
    +
    isFocused(Focus<K> focus)
    +
    +
    Checks if a focus is focused in the target widget.
    +
    +
    void
    +
    setFocused(Focus<K> focus)
    +
    +
    Applies a focus to the target widget.
    +
    +
    static FocusModel<?>
    +
    simple(WWidget widget)
    +
    +
    Creates a simple focus model for a focusable widget.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isFocused

      +
      boolean isFocused(Focus<K> focus)
      +
      Checks if a focus is focused in the target widget. + If the target widget is not focused itself, none of its foci should have focus.
      +
      +
      Parameters:
      +
      focus - the focus to check
      +
      Returns:
      +
      true if the focus is focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      setFocused

      +
      void setFocused(Focus<K> focus)
      +
      Applies a focus to the target widget. + +

      This method does not need to request the GUI's focus + for the widget; that is the responsibility of the caller.

      +
      +
      Parameters:
      +
      focus - the focus
      +
      +
      +
    • +
    • +
      +

      foci

      +
      Stream<Focus<K>> foci()
      +
      Returns a stream of all foci in the target widget.
      +
      +
      Returns:
      +
      a stream of all foci in the target widget
      +
      +
      +
    • +
    • +
      +

      simple

      +
      static FocusModel<?> simple(WWidget widget)
      +
      Creates a simple focus model for a focusable widget. + The focus model provides the whole widget area as its only focus area.
      +
      +
      Parameters:
      +
      widget - the widget
      +
      Returns:
      +
      the focus model
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.Builder.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.Builder.html index 8079759..833f68a 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.Builder.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.Builder.html @@ -1,211 +1,212 @@ - - - - -SimpleKeyedFocusModel.Builder (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class SimpleKeyedFocusModel.Builder<K>

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder<K>
-
-
-
-
Type Parameters:
-
K - the focus key type
-
-
-
Enclosing class:
-
SimpleKeyedFocusModel<K>
-
-
-
public static final class SimpleKeyedFocusModel.Builder<K> -extends Object
-
A builder for SimpleKeyedFocusModel. - New instances can be obtained using SimpleKeyedFocusModel.builder(). - -

This builder class is reusable – created instances are not - affected by data added to this builder afterwards.

-
-
- -
-
-
    - -
  • -
    -

    Method Details

    - -
    -
  • -
-
- -
-
-
- - + + + + +SimpleKeyedFocusModel.Builder (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SimpleKeyedFocusModel.Builder<K>

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel.Builder<K>
+
+
+
+
Type Parameters:
+
K - the focus key type
+
+
+
Enclosing class:
+
SimpleKeyedFocusModel<K>
+
+
+
public static final class SimpleKeyedFocusModel.Builder<K> +extends Object
+
A builder for SimpleKeyedFocusModel. + New instances can be obtained using SimpleKeyedFocusModel.builder(). + +

This builder class is reusable – created instances are not + affected by data added to this builder afterwards.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.html index 884a41d..465dba4 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/SimpleKeyedFocusModel.html @@ -1,288 +1,289 @@ - - - - -SimpleKeyedFocusModel (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class SimpleKeyedFocusModel<K>

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel<K>
-
-
-
-
Type Parameters:
-
K - the focus key type
-
-
-
All Implemented Interfaces:
-
FocusModel<K>
-
-
-
public final class SimpleKeyedFocusModel<K> -extends Object -implements FocusModel<K>
-
A FocusModel implementation that wraps a List of foci. - New instances can be created with the constructor or the builder.
-
-
Since:
-
7.0.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      SimpleKeyedFocusModel

      -
      public SimpleKeyedFocusModel(List<Focus<K>> foci)
      -
      Constructs a keyed focus model.
      -
      -
      Parameters:
      -
      foci - the foci
      -
      Throws:
      -
      IllegalArgumentException - if there are duplicate keys
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getFocusedKey

      -
      @Nullable -public K getFocusedKey()
      -
      Returns the focused key, or null if not available.
      -
      -
      Returns:
      -
      the focused key, or null if not available
      -
      -
      -
    • -
    • -
      -

      isFocused

      -
      public boolean isFocused(Focus<K> focus)
      -
      Description copied from interface: FocusModel
      -
      Checks if a focus is focused in the target widget. - If the target widget is not focused itself, none of its foci should have focus.
      -
      -
      Specified by:
      -
      isFocused in interface FocusModel<K>
      -
      Parameters:
      -
      focus - the focus to check
      -
      Returns:
      -
      true if the focus is focused, false otherwise
      -
      -
      -
    • -
    • -
      -

      setFocused

      -
      public void setFocused(Focus<K> focus)
      -
      Description copied from interface: FocusModel
      -
      Applies a focus to the target widget. - -

      This method does not need to request the GUI's focus - for the widget; that is the responsibility of the caller.

      -
      -
      Specified by:
      -
      setFocused in interface FocusModel<K>
      -
      Parameters:
      -
      focus - the focus
      -
      -
      -
    • -
    • -
      -

      foci

      -
      public Stream<Focus<K>> foci()
      -
      Description copied from interface: FocusModel
      -
      Returns a stream of all foci in the target widget.
      -
      -
      Specified by:
      -
      foci in interface FocusModel<K>
      -
      Returns:
      -
      a stream of all foci in the target widget
      -
      -
      -
    • -
    • -
      -

      builder

      -
      @Contract("-> new") -public static <K> SimpleKeyedFocusModel.Builder<K> builder()
      -
      Creates a builder for SimpleKeyedFocusModel.
      -
      -
      Type Parameters:
      -
      K - the focus key type
      -
      Returns:
      -
      the builder
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +SimpleKeyedFocusModel (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SimpleKeyedFocusModel<K>

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.focus.SimpleKeyedFocusModel<K>
+
+
+
+
Type Parameters:
+
K - the focus key type
+
+
+
All Implemented Interfaces:
+
FocusModel<K>
+
+
+
public final class SimpleKeyedFocusModel<K> +extends Object +implements FocusModel<K>
+
A FocusModel implementation that wraps a List of foci. + New instances can be created with the constructor or the builder.
+
+
Since:
+
7.0.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SimpleKeyedFocusModel

      +
      public SimpleKeyedFocusModel(List<Focus<K>> foci)
      +
      Constructs a keyed focus model.
      +
      +
      Parameters:
      +
      foci - the foci
      +
      Throws:
      +
      IllegalArgumentException - if there are duplicate keys
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getFocusedKey

      +
      @Nullable +public K getFocusedKey()
      +
      Returns the focused key, or null if not available.
      +
      +
      Returns:
      +
      the focused key, or null if not available
      +
      +
      +
    • +
    • +
      +

      isFocused

      +
      public boolean isFocused(Focus<K> focus)
      +
      Description copied from interface: FocusModel
      +
      Checks if a focus is focused in the target widget. + If the target widget is not focused itself, none of its foci should have focus.
      +
      +
      Specified by:
      +
      isFocused in interface FocusModel<K>
      +
      Parameters:
      +
      focus - the focus to check
      +
      Returns:
      +
      true if the focus is focused, false otherwise
      +
      +
      +
    • +
    • +
      +

      setFocused

      +
      public void setFocused(Focus<K> focus)
      +
      Description copied from interface: FocusModel
      +
      Applies a focus to the target widget. + +

      This method does not need to request the GUI's focus + for the widget; that is the responsibility of the caller.

      +
      +
      Specified by:
      +
      setFocused in interface FocusModel<K>
      +
      Parameters:
      +
      focus - the focus
      +
      +
      +
    • +
    • +
      +

      foci

      +
      public Stream<Focus<K>> foci()
      +
      Description copied from interface: FocusModel
      +
      Returns a stream of all foci in the target widget.
      +
      +
      Specified by:
      +
      foci in interface FocusModel<K>
      +
      Returns:
      +
      a stream of all foci in the target widget
      +
      +
      +
    • +
    • +
      +

      builder

      +
      @Contract("-> new") +public static <K> SimpleKeyedFocusModel.Builder<K> builder()
      +
      Creates a builder for SimpleKeyedFocusModel.
      +
      +
      Type Parameters:
      +
      K - the focus key type
      +
      Returns:
      +
      the builder
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-summary.html index 9e55d2d..b9dd0ed 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-summary.html @@ -1,129 +1,130 @@ - - - - -io.github.cottonmc.cotton.gui.widget.focus (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.widget.focus

-
-
-
package io.github.cottonmc.cotton.gui.widget.focus
-
-
The widget focus API.
-
-
Since:
-
7.0.0
-
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.focus (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.widget.focus

+
+
+
package io.github.cottonmc.cotton.gui.widget.focus
+
+
The widget focus API.
+
+
Since:
+
7.0.0
+
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-tree.html index 8197e69..b927238 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/focus/package-tree.html @@ -1,82 +1,83 @@ - - - - -io.github.cottonmc.cotton.gui.widget.focus Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.focus

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-

Interface Hierarchy

-
    -
  • io.github.cottonmc.cotton.gui.widget.focus.FocusModel<K>
  • -
-
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.focus Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.focus

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+
    +
  • io.github.cottonmc.cotton.gui.widget.focus.FocusModel<K>
  • +
+
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/icon/Icon.html b/libgui/io/github/cottonmc/cotton/gui/widget/icon/Icon.html index dea76ad..f9ed37a 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/icon/Icon.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/icon/Icon.html @@ -1,156 +1,157 @@ - - - - -Icon (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Interface Icon

-
-
-
-
All Known Implementing Classes:
-
ItemIcon, TextureIcon
-
-
-
public interface Icon
-
A square icon for a widget such as a button.
-
-
Since:
-
2.2.0
-
See Also:
-
- -
-
-
-
-
    - -
  • -
    -

    Method Summary

    -
    -
    -
    -
    -
    Modifier and Type
    -
    Method
    -
    Description
    -
    void
    -
    paint(DrawContext context, - int x, - int y, - int size)
    -
    -
    Paints this icon.
    -
    -
    -
    -
    -
    -
  • -
-
-
-
    - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -void paint(DrawContext context, - int x, - int y, - int size)
      -
      Paints this icon.
      -
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate
      -
      y - the Y coordinate
      -
      size - the size of this icon in pixels (size N means a N*N square)
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +Icon (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Icon

+
+
+
+
All Known Implementing Classes:
+
ItemIcon, TextureIcon
+
+
+
public interface Icon
+
A square icon for a widget such as a button.
+
+
Since:
+
2.2.0
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    paint(DrawContext context, + int x, + int y, + int size)
    +
    +
    Paints this icon.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +void paint(DrawContext context, + int x, + int y, + int size)
      +
      Paints this icon.
      +
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate
      +
      y - the Y coordinate
      +
      size - the size of this icon in pixels (size N means a N*N square)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/icon/ItemIcon.html b/libgui/io/github/cottonmc/cotton/gui/widget/icon/ItemIcon.html index b28d048..c067572 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/icon/ItemIcon.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/icon/ItemIcon.html @@ -1,215 +1,216 @@ - - - - -ItemIcon (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class ItemIcon

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
-
-
-
-
All Implemented Interfaces:
-
Icon
-
-
-
public class ItemIcon -extends Object -implements Icon
-
An icon that draws an item stack.
-
-
Since:
-
2.2.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      ItemIcon

      -
      public ItemIcon(ItemStack stack)
      -
      Constructs an item icon.
      -
      -
      Parameters:
      -
      stack - the drawn item stack
      -
      Throws:
      -
      NullPointerException - if the stack is null
      -
      -
      -
    • -
    • -
      -

      ItemIcon

      -
      public ItemIcon(Item item)
      -
      Constructs an item icon with the item's default stack.
      -
      -
      Parameters:
      -
      item - the drawn item
      -
      Throws:
      -
      NullPointerException - if the item is null
      -
      Since:
      -
      3.2.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int size)
      -
      Description copied from interface: Icon
      -
      Paints this icon.
      -
      -
      Specified by:
      -
      paint in interface Icon
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate
      -
      y - the Y coordinate
      -
      size - the size of this icon in pixels (size N means a N*N square)
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +ItemIcon (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ItemIcon

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
+
+
+
+
All Implemented Interfaces:
+
Icon
+
+
+
public class ItemIcon +extends Object +implements Icon
+
An icon that draws an item stack.
+
+
Since:
+
2.2.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ItemIcon

      +
      public ItemIcon(ItemStack stack)
      +
      Constructs an item icon.
      +
      +
      Parameters:
      +
      stack - the drawn item stack
      +
      Throws:
      +
      NullPointerException - if the stack is null
      +
      +
      +
    • +
    • +
      +

      ItemIcon

      +
      public ItemIcon(Item item)
      +
      Constructs an item icon with the item's default stack.
      +
      +
      Parameters:
      +
      item - the drawn item
      +
      Throws:
      +
      NullPointerException - if the item is null
      +
      Since:
      +
      3.2.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int size)
      +
      Description copied from interface: Icon
      +
      Paints this icon.
      +
      +
      Specified by:
      +
      paint in interface Icon
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate
      +
      y - the Y coordinate
      +
      size - the size of this icon in pixels (size N means a N*N square)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.html b/libgui/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.html index a57ffbd..9f600d6 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/icon/TextureIcon.html @@ -1,279 +1,280 @@ - - - - -TextureIcon (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
- -

Class TextureIcon

-
-
java.lang.Object -
io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
-
-
-
-
All Implemented Interfaces:
-
Icon
-
-
-
public class TextureIcon -extends Object -implements Icon
-
An icon that draws a texture.
-
-
Since:
-
2.2.0
-
-
-
- -
-
-
    - -
  • -
    -

    Constructor Details

    -
      -
    • -
      -

      TextureIcon

      -
      public TextureIcon(Identifier texture)
      -
      Constructs a new texture icon.
      -
      -
      Parameters:
      -
      texture - the identifier of the icon texture
      -
      -
      -
    • -
    • -
      -

      TextureIcon

      -
      public TextureIcon(Texture texture)
      -
      Constructs a new texture icon.
      -
      -
      Parameters:
      -
      texture - the identifier of the icon texture
      -
      Since:
      -
      3.0.0
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    -

    Method Details

    -
      -
    • -
      -

      getOpacity

      -
      public float getOpacity()
      -
      Gets the opacity of the texture.
      -
      -
      Returns:
      -
      the opacity
      -
      -
      -
    • -
    • -
      -

      setOpacity

      -
      public TextureIcon setOpacity(float opacity)
      -
      Sets the opacity of the texture.
      -
      -
      Parameters:
      -
      opacity - the new opacity between 0 (fully transparent) and 1 (fully opaque)
      -
      Returns:
      -
      this icon
      -
      -
      -
    • -
    • -
      -

      getColor

      -
      public int getColor()
      -
      Gets the color tint of the texture.
      -
      -
      Returns:
      -
      the color tint
      -
      -
      -
    • -
    • -
      -

      setColor

      -
      public TextureIcon setColor(int color)
      -
      Sets the color tint of the texture.
      -
      -
      Parameters:
      -
      color - the new color tint
      -
      Returns:
      -
      this icon
      -
      -
      -
    • -
    • -
      -

      paint

      -
      @Environment(CLIENT) -public void paint(DrawContext context, - int x, - int y, - int size)
      -
      Description copied from interface: Icon
      -
      Paints this icon.
      -
      -
      Specified by:
      -
      paint in interface Icon
      -
      Parameters:
      -
      context - the draw context
      -
      x - the X coordinate
      -
      y - the Y coordinate
      -
      size - the size of this icon in pixels (size N means a N*N square)
      -
      -
      -
    • -
    -
    -
  • -
-
- -
-
-
- - + + + + +TextureIcon (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TextureIcon

+
+
java.lang.Object +
io.github.cottonmc.cotton.gui.widget.icon.TextureIcon
+
+
+
+
All Implemented Interfaces:
+
Icon
+
+
+
public class TextureIcon +extends Object +implements Icon
+
An icon that draws a texture.
+
+
Since:
+
2.2.0
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TextureIcon

      +
      public TextureIcon(Identifier texture)
      +
      Constructs a new texture icon.
      +
      +
      Parameters:
      +
      texture - the identifier of the icon texture
      +
      +
      +
    • +
    • +
      +

      TextureIcon

      +
      public TextureIcon(Texture texture)
      +
      Constructs a new texture icon.
      +
      +
      Parameters:
      +
      texture - the identifier of the icon texture
      +
      Since:
      +
      3.0.0
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getOpacity

      +
      public float getOpacity()
      +
      Gets the opacity of the texture.
      +
      +
      Returns:
      +
      the opacity
      +
      +
      +
    • +
    • +
      +

      setOpacity

      +
      public TextureIcon setOpacity(float opacity)
      +
      Sets the opacity of the texture.
      +
      +
      Parameters:
      +
      opacity - the new opacity between 0 (fully transparent) and 1 (fully opaque)
      +
      Returns:
      +
      this icon
      +
      +
      +
    • +
    • +
      +

      getColor

      +
      public int getColor()
      +
      Gets the color tint of the texture.
      +
      +
      Returns:
      +
      the color tint
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public TextureIcon setColor(int color)
      +
      Sets the color tint of the texture.
      +
      +
      Parameters:
      +
      color - the new color tint
      +
      Returns:
      +
      this icon
      +
      +
      +
    • +
    • +
      +

      paint

      +
      @Environment(CLIENT) +public void paint(DrawContext context, + int x, + int y, + int size)
      +
      Description copied from interface: Icon
      +
      Paints this icon.
      +
      +
      Specified by:
      +
      paint in interface Icon
      +
      Parameters:
      +
      context - the draw context
      +
      x - the X coordinate
      +
      y - the Y coordinate
      +
      size - the size of this icon in pixels (size N means a N*N square)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-summary.html index f831318..f4c7e95 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-summary.html @@ -1,133 +1,134 @@ - - - - -io.github.cottonmc.cotton.gui.widget.icon (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.widget.icon

-
-
-
package io.github.cottonmc.cotton.gui.widget.icon
-
-
The icon API for displaying various icons on widgets. - -

For example, you can attach an icon to a button: -

- 
- // This is a button with an apple item as the icon:
- WButton button = new WButton(new ItemIcon(new ItemStack(Items.APPLE)), new LiteralText("Apple button"));
- 
- 
-
-
Since:
-
2.2.0
-
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.icon (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.widget.icon

+
+
+
package io.github.cottonmc.cotton.gui.widget.icon
+
+
The icon API for displaying various icons on widgets. + +

For example, you can attach an icon to a button: +

+ 
+ // This is a button with an apple item as the icon:
+ WButton button = new WButton(new ItemIcon(new ItemStack(Items.APPLE)), new LiteralText("Apple button"));
+ 
+ 
+
+
Since:
+
2.2.0
+
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-tree.html index 8267f83..e7830e3 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/icon/package-tree.html @@ -1,77 +1,78 @@ - - - - -io.github.cottonmc.cotton.gui.widget.icon Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.icon

-Package Hierarchies: - -
-
-

Class Hierarchy

-
    -
  • java.lang.Object -
      -
    • io.github.cottonmc.cotton.gui.widget.icon.ItemIcon (implements io.github.cottonmc.cotton.gui.widget.icon.Icon)
    • -
    • io.github.cottonmc.cotton.gui.widget.icon.TextureIcon (implements io.github.cottonmc.cotton.gui.widget.icon.Icon)
    • -
    -
  • -
-
-
-

Interface Hierarchy

-
    -
  • io.github.cottonmc.cotton.gui.widget.icon.Icon
  • -
-
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget.icon Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.widget.icon

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • io.github.cottonmc.cotton.gui.widget.icon.ItemIcon (implements io.github.cottonmc.cotton.gui.widget.icon.Icon)
    • +
    • io.github.cottonmc.cotton.gui.widget.icon.TextureIcon (implements io.github.cottonmc.cotton.gui.widget.icon.Icon)
    • +
    +
  • +
+
+
+

Interface Hierarchy

+
    +
  • io.github.cottonmc.cotton.gui.widget.icon.Icon
  • +
+
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/package-summary.html b/libgui/io/github/cottonmc/cotton/gui/widget/package-summary.html index adf9004..05e0182 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/package-summary.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/package-summary.html @@ -1,248 +1,249 @@ - - - - -io.github.cottonmc.cotton.gui.widget (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Package io.github.cottonmc.cotton.gui.widget

-
-
-
package io.github.cottonmc.cotton.gui.widget
-
-
Widgets for building GUIs.
-
-
- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.github.cottonmc.cotton.gui.widget

+
+
+
package io.github.cottonmc.cotton.gui.widget
+
+
Widgets for building GUIs.
+
+
+ +
+
+
+
+ + diff --git a/libgui/io/github/cottonmc/cotton/gui/widget/package-tree.html b/libgui/io/github/cottonmc/cotton/gui/widget/package-tree.html index fe568b1..7f4d2fb 100644 --- a/libgui/io/github/cottonmc/cotton/gui/widget/package-tree.html +++ b/libgui/io/github/cottonmc/cotton/gui/widget/package-tree.html @@ -1,142 +1,143 @@ - - - - -io.github.cottonmc.cotton.gui.widget Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
-
-

Hierarchy For Package io.github.cottonmc.cotton.gui.widget

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
-
-

Interface Hierarchy

- -
-
-

Enum Class Hierarchy

- -
-
-
-
- - + + + + +io.github.cottonmc.cotton.gui.widget Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.github.cottonmc.cotton.gui.widget

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/jquery-ui.overrides.css b/libgui/jquery-ui.overrides.css index a46bfe7..facf852 100644 --- a/libgui/jquery-ui.overrides.css +++ b/libgui/jquery-ui.overrides.css @@ -1,34 +1,35 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active, -a.ui-button:active, -.ui-button:active, -.ui-button.ui-state-active:hover { - /* Overrides the color of selection used in jQuery UI */ - background: #F8981D; -} +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/libgui/legal/ADDITIONAL_LICENSE_INFO b/libgui/legal/ADDITIONAL_LICENSE_INFO index 3f7e921..ff700cd 100644 --- a/libgui/legal/ADDITIONAL_LICENSE_INFO +++ b/libgui/legal/ADDITIONAL_LICENSE_INFO @@ -1 +1,37 @@ -Please see ..\java.base\ADDITIONAL_LICENSE_INFO + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/libgui/legal/ASSEMBLY_EXCEPTION b/libgui/legal/ASSEMBLY_EXCEPTION index e09f918..065b8d9 100644 --- a/libgui/legal/ASSEMBLY_EXCEPTION +++ b/libgui/legal/ASSEMBLY_EXCEPTION @@ -1 +1,27 @@ -Please see ..\java.base\ASSEMBLY_EXCEPTION + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/libgui/legal/LICENSE b/libgui/legal/LICENSE index 940481e..8b400c7 100644 --- a/libgui/legal/LICENSE +++ b/libgui/legal/LICENSE @@ -1 +1,347 @@ -Please see ..\java.base\LICENSE +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/libgui/legal/jquery.md b/libgui/legal/jquery.md index 8054a34..d468b31 100644 --- a/libgui/legal/jquery.md +++ b/libgui/legal/jquery.md @@ -1,9 +1,9 @@ -## jQuery v3.5.1 +## jQuery v3.6.1 ### jQuery License ``` -jQuery v 3.5.1 -Copyright JS Foundation and other contributors, https://js.foundation/ +jQuery v 3.6.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************** -The jQuery JavaScript Library v3.5.1 also includes Sizzle.js +The jQuery JavaScript Library v3.6.1 also includes Sizzle.js Sizzle.js includes the following license: diff --git a/libgui/member-search-index.js b/libgui/member-search-index.js index 2a56fa8..fefe794 100644 --- a/libgui/member-search-index.js +++ b/libgui/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"add(Focus)","u":"add(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(int, WWidget)","u":"add(int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(int, WWidget, int, int)","u":"add(int,io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"add(K, Rect2i)","u":"add(K,io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"add(OrderedText...)","u":"add(net.minecraft.text.OrderedText...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"add(Text...)","u":"add(net.minecraft.text.Text...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"add(WTabPanel.Tab)","u":"add(io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"add(WWidget, Consumer)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, CottonHud.Positioner)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, CottonHud.Positioner, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"addAll(Collection>)","u":"addAll(java.util.Collection)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"addChangeListener(WItemSlot, WItemSlot.ChangeListener)","u":"addChangeListener(io.github.cottonmc.cotton.gui.widget.WItemSlot,io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addChangeListener(WItemSlot.ChangeListener)","u":"addChangeListener(io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"addElementNarrations(NarrationMessageBuilder)","u":"addElementNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"addElementNarrations(NarrationMessageBuilder)","u":"addElementNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"addListener(ObservableView.ChangeListener)","u":"addListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"addListener(ObservableView.ChangeListener)","u":"addListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"adjustSlider(int, int)","u":"adjustSlider(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"alignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"alignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"anchor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"anchorValue"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"area()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"bar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"bg"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLACK"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLACK_DYE"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"blockInventory"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLUE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLUE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"BOTTOM"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"bottom()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BROWN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"builder()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"Builder(WWidget)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canHover()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"canInsert(ItemStack)","u":"canInsert(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"canPlayerUse(PlayerEntity)","u":"canPlayerUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"canTakeItems(PlayerEntity)","u":"canTakeItems(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"canUse(PlayerEntity)","u":"canUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"canUse(PlayerEntity)","u":"canUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"cellHeight"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"CENTER"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"CENTER"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"charTyped(char, int)","u":"charTyped(char,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"charTyped(char, int)","u":"charTyped(char,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"checkValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"children"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"choose(T, T)","u":"choose(T,T)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"clear()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"CLIENT"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors.Frame","l":"close()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"color"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"colorAtOpacity(int, float)","u":"colorAtOpacity(int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"coloredRect(DrawContext, int, int, int, int, int)","u":"coloredRect(net.minecraft.client.gui.DrawContext,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"configurator"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"configured"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"coordToValueRatio"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"CottonClientScreen(GuiDescription)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"CottonClientScreen(Text, GuiDescription)","u":"%3Cinit%3E(net.minecraft.text.Text,io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"CottonHud()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerEntity)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerEntity, Text)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerEntity,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerInventory)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerInventory, Text)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerInventory,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createColorful(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createColorful(int, float)","u":"createColorful(int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"createInventoryLabel(PlayerInventory)","u":"createInventoryLabel(net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createLightDarkVariants(BackgroundPainter, BackgroundPainter)","u":"createLightDarkVariants(io.github.cottonmc.cotton.gui.client.BackgroundPainter,io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createNinePatch(Identifier)","u":"createNinePatch(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createNinePatch(Texture, Consumer>)","u":"createNinePatch(io.github.cottonmc.cotton.gui.widget.data.Texture,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel(WWidget)","u":"createPlayerInventoryPanel(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"createSlotPeer(Inventory, int, int, int)","u":"createSlotPeer(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"currentFrame"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"currentFrameTime"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"CURSOR_HEIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"CURSOR_PADDING_Y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"CYAN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"DARK_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"darkmodeTitleColor"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"darkTitleColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"data"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"DEFAULT_DARKMODE_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"DEFAULT_DARKMODE_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_FOCUS_IMAGE"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"DEFAULT_ITEM_FILTER"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_OFF_IMAGE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_ON_IMAGE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"DEFAULT_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"DEFAULT_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"description"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"description"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"direction"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"direction"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"DOWN"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"DOWN"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"dragging"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"drawBackground(DrawContext, float, int, int)","u":"drawBackground(net.minecraft.client.gui.DrawContext,float,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int, int, int, int, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"drawForeground(DrawContext, int, int)","u":"drawForeground(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, OrderedText, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, String, HorizontalAlignment, int, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,java.lang.String,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, String, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,java.lang.String,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawStringWithShadow(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int)","u":"drawStringWithShadow(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawStringWithShadow(DrawContext, String, HorizontalAlignment, int, int, int, int)","u":"drawStringWithShadow(net.minecraft.client.gui.DrawContext,java.lang.String,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawTextHover(DrawContext, Style, int, int)","u":"drawTextHover(net.minecraft.client.gui.DrawContext,net.minecraft.text.Style,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"DYE_COLORS"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"empty()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"expandToFit(WWidget)","u":"expandToFit(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"expandToFit(WWidget, Insets)","u":"expandToFit(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"field"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"find()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"fixedHeight"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"foci()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"foci()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"focus"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"focus"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"Focus(K, Rect2i)","u":"%3Cinit%3E(K,io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"focusImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"frames"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"frameTime"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"fullscreen"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"fullscreen"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"get()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"get()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getA()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getAbsoluteX()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getAbsoluteY()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getB()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockInventory(ScreenHandlerContext)","u":"getBlockInventory(net.minecraft.screen.ScreenHandlerContext)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockInventory(ScreenHandlerContext, int)","u":"getBlockInventory(net.minecraft.screen.ScreenHandlerContext,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockPropertyDelegate(ScreenHandlerContext)","u":"getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockPropertyDelegate(ScreenHandlerContext, int)","u":"getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getBottomPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getCardCount()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getCaretPosition(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getChroma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getChroma()"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getCursor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getDarkmodeColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getDarkmodeColor()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"getDescription()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"getDescription()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getDirection()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getDraggingFinishedListener()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"getDuration()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getFilter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFilter()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"getFocusedKey()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFocusedSlot()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getFocusImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFocusModel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getFocusModel()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getG()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getHandlePosition()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getHandleSize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getHost()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHSLSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHSVSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getIconSize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"getInsets()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getInventoryIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"getItems()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabelAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabelUpdater()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"getLastResponder()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"getLastResponder()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getLeftPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getLightness()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getMaxLength()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMaxScrollValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getMaxValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMaxValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getMinValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMovableDistance()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"getName()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getNarrationName()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getNetworkSide()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOffImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getOnClick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOnImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOnToggle()"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"getOpacity()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"getOrNull()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getPacketSender()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getParent()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"getProperties()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"PropertyDelegateHolder","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getR()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getRightPadding()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"getScrollBar()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getSelectedCard()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getSelectedIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getSelectedIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getSelectedTab()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getSelection()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getSpacing()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getStack()"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"getStack(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getSuggestion()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getTabCount()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getTextStyleAt(int, int)","u":"getTextStyleAt(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getTextStyleAt(int, int)","u":"getTextStyleAt(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"getTileHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"getTileWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getTitle()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getToggle()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getTopPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getValueChangeListener()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getWidget()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getWindow()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getX()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getY()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GRAY_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GREEN"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GREEN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"grid"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"handledScreenTick()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"hasValue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"hasValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"height"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"height()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"hit(int, int)","u":"hit(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"hit(int, int)","u":"hit(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"HORIZONTAL"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"horizontalGap"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"horizontallyCentered(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"horizontalScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"host"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"hoveredProperty()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"HSL(float, float, float)","u":"%3Cinit%3E(float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"HSL(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"icon(Icon)","u":"icon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"iconSize"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"IGNORED"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"image()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"init()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"init()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"insets"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"INSTANCE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"interpolate(Color.RGB, double)","u":"interpolate(io.github.cottonmc.cotton.gui.widget.data.Color.RGB,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isActivationKey(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isBigSlot()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LibGui","l":"isDarkMode()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isDarkMode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isDecreasingKey(int, WAbstractSlider.Direction)","u":"isDecreasingKey(int,io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isDragging()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"isEditable()"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"isEmpty()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isEnabled()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"isEnabled()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isFocused()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"isFocused(Focus)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"isFocused(Focus)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isHovered()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isIncreasingKey(int, WAbstractSlider.Direction)","u":"isIncreasingKey(int,io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isInsertingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isInsertingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"isInverted()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isModifiable()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isNarratable()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"isOn"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"isScrollingHorizontally()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"isScrollingVertically()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isTakingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isTakingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isVisible()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isWithinBounds(int, int)","u":"isWithinBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"ItemIcon(Item)","u":"%3Cinit%3E(net.minecraft.item.Item)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"ItemIcon(ItemStack)","u":"%3Cinit%3E(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"ItemSyncedGuiDescription(ScreenHandlerType, int, PlayerInventory, StackReference)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory,net.minecraft.inventory.StackReference)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"key()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"keyPressed(int, int, int)","u":"keyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"keyPressed(int, int, int)","u":"keyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"keyReleased(int, int, int)","u":"keyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"keyReleased(int, int, int)","u":"keyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"label"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"lastFrame"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"lastResponder"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"lastResponder"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"LCH(float, float, float)","u":"%3Cinit%3E(float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"left"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"left()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIGHT_BLUE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIGHT_GRAY_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"LIGHT_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"LightweightGuiDescription()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIME_DYE"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"listeners"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"MAGENTA_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"margin"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"markDirty()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"markDirty()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"max"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"max"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"maxValue"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"maxValue"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"min"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseClicked(double, double, int)","u":"mouseClicked(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseClicked(double, double, int)","u":"mouseClicked(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseDragged(double, double, int, double, double)","u":"mouseDragged(double,double,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseDragged(double, double, int, double, double)","u":"mouseDragged(double,double,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseMoved(double, double)","u":"mouseMoved(double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseMoved(double, double)","u":"mouseMoved(double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseReleased(double, double, int)","u":"mouseReleased(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseReleased(double, double, int)","u":"mouseReleased(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseScrolled(double, double, double)","u":"mouseScrolled(double,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseScrolled(double, double, double)","u":"mouseScrolled(double,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"multiplyColor(int, float)","u":"multiplyColor(int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"name(String)","u":"name(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"NinePatchBackgroundPainter(NinePatch)","u":"%3Cinit%3E(juuxel.libninepatch.NinePatch)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"NONE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"nonnull()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"of(boolean)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"of(int, int)","u":"of(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"of(Inventory, int)","u":"of(net.minecraft.inventory.Inventory,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"of(Inventory, int, int, int)","u":"of(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"of(Rect2i)","u":"of(io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"of(SyncedGuiDescription, NetworkSide)","u":"of(io.github.cottonmc.cotton.gui.SyncedGuiDescription,io.github.cottonmc.cotton.gui.networking.NetworkSide)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"of(T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"offImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"ofPlayerStorage(Inventory)","u":"ofPlayerStorage(net.minecraft.inventory.Inventory)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onCharTyped(char)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onCharTyped(char)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"onClosed(PlayerEntity)","u":"onClosed(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onDirectionalKey(int, int)","u":"onDirectionalKey(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onFocusGained()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onFocusGained()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onFocusLost()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onFocusLost()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onKeyReleased(int, int, int)","u":"onKeyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onKeyReleased(int, int, int)","u":"onKeyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking.MessageReceiver","l":"onMessage(PacketByteBuf)","u":"onMessage(net.minecraft.network.PacketByteBuf)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onMouseMove(int, int)","u":"onMouseMove(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseMove(int, int)","u":"onMouseMove(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView.ChangeListener","l":"onPropertyChange(ObservableView, T, T)","u":"onPropertyChange(io.github.cottonmc.cotton.gui.widget.data.ObservableView,T,T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot.ChangeListener","l":"onStackChanged(WItemSlot, Inventory, int, ItemStack)","u":"onStackChanged(io.github.cottonmc.cotton.gui.widget.WItemSlot,net.minecraft.inventory.Inventory,int,net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onToggle"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onToggle(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onValueChanged(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"onValueChanged(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"opaqueRgb(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"ORANGE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"outputOf(Inventory, int)","u":"outputOf(net.minecraft.inventory.Inventory,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"owner"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"ownerStack"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"Icon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WClippedPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"paintBackground(DrawContext, int, int, WWidget)","u":"paintBackground(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"paintBackground(DrawContext, int, int, WWidget)","u":"paintBackground(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"paintFrame(DrawContext, int, int, Texture)","u":"paintFrame(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"paintFrame(DrawContext, int, int, Texture)","u":"paintFrame(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"parent"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"PINK_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"pixelsToValues(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"playerInventory"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors","l":"pop()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"PROCESSED"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"properties"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"propertyDelegate"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"propertyDelegate"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"PURPLE_DYE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors","l":"push(int, int, int, int)","u":"push(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"quickMove(PlayerEntity, int)","u":"quickMove(net.minecraft.entity.player.PlayerEntity,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"readOnly()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"receive(Identifier, ScreenNetworking.MessageReceiver)","u":"receive(net.minecraft.util.Identifier,io.github.cottonmc.cotton.gui.networking.ScreenNetworking.MessageReceiver)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"Rect2i(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"RED"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"RED_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"releaseFocus()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"remove(WWidget)","u":"remove(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"remove(WWidget)","u":"remove(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"removed()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"removed()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"removeListener(ObservableView.ChangeListener)","u":"removeListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"removeListener(ObservableView.ChangeListener)","u":"removeListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"removeStack(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"removeStack(int, int)","u":"removeStack(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"render(DrawContext, int, int, float)","u":"render(net.minecraft.client.gui.DrawContext,int,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"render(DrawContext, int, int, float)","u":"render(net.minecraft.client.gui.DrawContext,int,int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderBox(DrawContext, int, int)","u":"renderBox(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderCursor(DrawContext, int, int, String)","u":"renderCursor(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderSelection(DrawContext, int, int, String)","u":"renderSelection(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderSuggestion(DrawContext, int, int)","u":"renderSuggestion(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderText(DrawContext, int, int, String)","u":"renderText(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderTextField(DrawContext, int, int)","u":"renderTextField(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"renderTooltip(DrawContext, int, int, int, int)","u":"renderTooltip(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"reposition(int, int)","u":"reposition(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"reposition(int, int)","u":"reposition(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"reposition(WWidget, int, int)","u":"reposition(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"requestFocus()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"rgb(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int, int, int)","u":"%3Cinit%3E(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"rgb(int, int, int, int)","u":"rgb(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"right()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"ROOT_PANEL"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"rootPanel"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"rootPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"scrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"scrollCursorIntoView()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"send(Identifier, Consumer)","u":"send(net.minecraft.util.Identifier,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"SERVER"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"set(T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setAlignment(HorizontalAlignment)","u":"setAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setAlignment(HorizontalAlignment)","u":"setAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setAxis(Axis)","u":"setAxis(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setBottomPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setChangedListener(Consumer)","u":"setChangedListener(java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setCursorPos(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setDirection(WAbstractSlider.Direction)","u":"setDirection(io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setDisabledColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setDraggingFinishedListener(IntConsumer)","u":"setDraggingFinishedListener(java.util.function.IntConsumer)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"setDuration(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setEditable(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setEnabled(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setEnabledColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setFilter(Predicate)","u":"setFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setFilter(Predicate)","u":"setFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"setFocused(Focus)","u":"setFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"setFocused(Focus)","u":"setFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setFocusImage(Texture)","u":"setFocusImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setFrames(Identifier...)","u":"setFrames(net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setFrames(Texture...)","u":"setFrames(io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"setGaps(int, int)","u":"setGaps(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setHovered(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setIcon(Icon)","u":"setIcon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setIcon(Icon)","u":"setIcon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setIconSize(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setImage(Identifier)","u":"setImage(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setImage(Texture)","u":"setImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setInsertingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setInsertingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"setItems(List)","u":"setItems(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabelAlignment(HorizontalAlignment)","u":"setLabelAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabelUpdater(WLabeledSlider.LabelUpdater)","u":"setLabelUpdater(io.github.cottonmc.cotton.gui.widget.WLabeledSlider.LabelUpdater)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"setLastResponder(WWidget)","u":"setLastResponder(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"setLastResponder(WWidget)","u":"setLastResponder(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setLeftPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"setListItemHeight(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setLocation(int, int)","u":"setLocation(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setMaxLength(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setMaxValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setMaxValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setMinValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setModifiable(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOffImage(Texture)","u":"setOffImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setOnClick(Runnable)","u":"setOnClick(java.lang.Runnable)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOnImage(Texture)","u":"setOnImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOnToggle(Consumer)","u":"setOnToggle(java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"setOpacity(float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setOpaqueTint(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int, int)","u":"setPadding(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int, int, int, int)","u":"setPadding(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setParent(WPanel)","u":"setParent(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"setPositioner(WWidget, CottonHud.Positioner)","u":"setPositioner(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"setProperties(PropertyDelegate)","u":"setProperties(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setRightPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"setScrollingHorizontally(TriState)","u":"setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"setScrollingVertically(TriState)","u":"setScrollingVertically(net.fabricmc.fabric.api.util.TriState)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSelectedCard(WWidget)","u":"setSelectedCard(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSelectedIndex(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSelectedIndex(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSelectedTab(WTabPanel.Tab)","u":"setSelectedTab(io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setSpacing(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"setStack(int, ItemStack)","u":"setStack(int,net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSuggestion(Text)","u":"setSuggestion(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSuggestionColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setTakingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setTakingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setText(Supplier)","u":"setText(java.util.function.Supplier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setText(Text)","u":"setText(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setText(Text)","u":"setText(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setTextPredicate(Predicate)","u":"setTextPredicate(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileHeight(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileSize(int, int)","u":"setTileSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileWidth(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setTint(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setToggle(boolean)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setTopPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setUv(float, float, float, float)","u":"setUv(float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValue(int, boolean)","u":"setValue(int,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValueChangeListener(IntConsumer)","u":"setValueChangeListener(java.util.function.IntConsumer)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setWindow(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"shouldPause()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"shouldRenderInDarkMode()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"simple(WWidget)","u":"simple(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"SimpleKeyedFocusModel(List>)","u":"%3Cinit%3E(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"singleImage"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"size()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"sliding"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"SLOT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"SLOT_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"spacing"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"streamChildren()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"supplier"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"SyncedGuiDescription(ScreenHandlerType, int, PlayerInventory)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"SyncedGuiDescription(ScreenHandlerType, int, PlayerInventory, Inventory, PropertyDelegate)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory,net.minecraft.inventory.Inventory,net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"TEXT_PADDING_X"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"TEXT_PADDING_Y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"Texture(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"Texture(Identifier, float, float, float, float)","u":"%3Cinit%3E(net.minecraft.util.Identifier,float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedGuiRect(DrawContext, int, int, int, int, Identifier, int)","u":"texturedGuiRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedGuiRect(DrawContext, int, int, int, int, Identifier, int, int, int)","u":"texturedGuiRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,float,float,float,float,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,float,float,float,float,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Texture, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Texture, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture,int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"TextureIcon(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"TextureIcon(Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"THUMB_SIZE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"tint"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"title(Text)","u":"title(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleAlignment"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleAlignment"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleColor"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleColor"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleVisible"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleVisible"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"titleX"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"titleY"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"tooltip(Collection)","u":"tooltip(java.util.Collection)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"tooltip(Text...)","u":"tooltip(net.minecraft.text.Text...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"TooltipBuilder()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"tooltipLabel"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"tooltipTextComponent"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"top"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"TOP"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"top()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors.Frame","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"TRACK_WIDTH"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"u1()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"u2()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"unconfigured"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"UP"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"UP"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider.LabelUpdater","l":"updateLabel(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"updateValueCoordRatios()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"v1()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"v2()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"WAbstractSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"ValidatedSlot(Inventory, int, int, int)","u":"%3Cinit%3E(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"value"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"value"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"valueToCoordRatio"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"VANILLA"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Identifier, Identifier, int, int)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Identifier, Identifier, int, int, WBar.Direction)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Texture, Texture, int, int)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Texture, Texture, int, int, WBar.Direction)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"WBox(Axis)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Icon)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Icon, Text)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.icon.Icon,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"WCardPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WClippedPanel","l":"WClippedPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"WDynamicLabel(Supplier)","u":"%3Cinit%3E(java.util.function.Supplier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"WDynamicLabel(Supplier, int)","u":"%3Cinit%3E(java.util.function.Supplier,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"Vec2i(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"VERTICAL"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"verticalGap"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"verticalScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"WGridPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"WGridPanel(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"WHITE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"WHITE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"width"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"width()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"window"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(ItemStack)","u":"%3Cinit%3E(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(List)","u":"%3Cinit%3E(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(TagKey)","u":"%3Cinit%3E(net.minecraft.registry.tag.TagKey)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"WItemSlot(Inventory, int, int, int, boolean)","u":"%3Cinit%3E(net.minecraft.inventory.Inventory,int,int,int,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withConstantMaximum(Identifier, Identifier, int, int, WBar.Direction)","u":"withConstantMaximum(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withConstantMaximum(Texture, Texture, int, int, WBar.Direction)","u":"withConstantMaximum(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withTooltip(String)","u":"withTooltip(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withTooltip(Text)","u":"withTooltip(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"withUv(float, float, float, float)","u":"withUv(float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"WLabel(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"WLabel(Text, int)","u":"%3Cinit%3E(net.minecraft.text.Text,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Axis, Text)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Text)","u":"%3Cinit%3E(int,int,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"WListPanel(List, Supplier, BiConsumer)","u":"%3Cinit%3E(java.util.List,java.util.function.Supplier,java.util.function.BiConsumer)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"world"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"WPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"WPanelWithInsets()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"WPlainPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory, boolean)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory, WWidget)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"WScrollBar()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"WScrollBar(Axis)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"WScrollPanel(WWidget)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"WSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Identifier, float, float, float, float)","u":"%3Cinit%3E(net.minecraft.util.Identifier,float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(int, Identifier...)","u":"%3Cinit%3E(int,net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(int, Texture...)","u":"%3Cinit%3E(int,io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"WTabPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"WText(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"WText(Text, int)","u":"%3Cinit%3E(net.minecraft.text.Text,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"WTextField()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"WTextField(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, Identifier)","u":"%3Cinit%3E(int,int,net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, int, Identifier...)","u":"%3Cinit%3E(int,int,int,net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, int, Texture...)","u":"%3Cinit%3E(int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, Texture)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Identifier, Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Identifier, Identifier, Text)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Texture, Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Texture, Texture, Text)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"WWidget()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"x"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"x()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"x()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"y()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"y()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"YELLOW_DYE"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"add(Focus)","u":"add(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(int, WWidget)","u":"add(int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(int, WWidget, int, int)","u":"add(int,io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"add(K, Rect2i)","u":"add(K,io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"add(OrderedText...)","u":"add(net.minecraft.text.OrderedText...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"add(Text...)","u":"add(net.minecraft.text.Text...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"add(WTabPanel.Tab)","u":"add(io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(WWidget)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"add(WWidget, Consumer)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, CottonHud.Positioner)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, CottonHud.Positioner, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"add(WWidget, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"add(WWidget, int, int, int, int)","u":"add(io.github.cottonmc.cotton.gui.widget.WWidget,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"addAll(Collection>)","u":"addAll(java.util.Collection)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"addChangeListener(WItemSlot, WItemSlot.ChangeListener)","u":"addChangeListener(io.github.cottonmc.cotton.gui.widget.WItemSlot,io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addChangeListener(WItemSlot.ChangeListener)","u":"addChangeListener(io.github.cottonmc.cotton.gui.widget.WItemSlot.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"addElementNarrations(NarrationMessageBuilder)","u":"addElementNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"addElementNarrations(NarrationMessageBuilder)","u":"addElementNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"addListener(ObservableView.ChangeListener)","u":"addListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"addListener(ObservableView.ChangeListener)","u":"addListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addNarrations(NarrationMessageBuilder)","u":"addNarrations(net.minecraft.client.gui.screen.narration.NarrationMessageBuilder)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addPainters()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"addSlotPeer(ValidatedSlot)","u":"addSlotPeer(io.github.cottonmc.cotton.gui.ValidatedSlot)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"addTooltip(TooltipBuilder)","u":"addTooltip(io.github.cottonmc.cotton.gui.widget.TooltipBuilder)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"adjustSlider(int, int)","u":"adjustSlider(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"alignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"alignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"anchor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"anchorValue"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"area()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"axis"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"bar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"bg"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLACK"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLACK_DYE"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"blockInventory"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLUE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BLUE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"BOTTOM"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"bottom()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"BROWN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"build()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"builder()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"Builder(WWidget)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canHover()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"canInsert(ItemStack)","u":"canInsert(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"canPlayerUse(PlayerEntity)","u":"canPlayerUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"canResize()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"canTakeItems(PlayerEntity)","u":"canTakeItems(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"canUse(PlayerEntity)","u":"canUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"canUse(PlayerEntity)","u":"canUse(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"cellHeight"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"CENTER"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"CENTER"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"charTyped(char, int)","u":"charTyped(char,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"charTyped(char, int)","u":"charTyped(char,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"checkValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"children"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"choose(T, T)","u":"choose(T,T)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"clear()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"CLIENT"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors.Frame","l":"close()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"color"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"color"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"colorAtOpacity(int, float)","u":"colorAtOpacity(int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"coloredRect(DrawContext, int, int, int, int, int)","u":"coloredRect(net.minecraft.client.gui.DrawContext,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"configurator"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"configured"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"coordToValueRatio"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"CottonClientScreen(GuiDescription)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"CottonClientScreen(Text, GuiDescription)","u":"%3Cinit%3E(net.minecraft.text.Text,io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"CottonHud()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerEntity)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerEntity, Text)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerEntity,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerInventory)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"CottonInventoryScreen(T, PlayerInventory, Text)","u":"%3Cinit%3E(T,net.minecraft.entity.player.PlayerInventory,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createColorful(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createColorful(int, float)","u":"createColorful(int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"createInventoryLabel(PlayerInventory)","u":"createInventoryLabel(net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createLightDarkVariants(BackgroundPainter, BackgroundPainter)","u":"createLightDarkVariants(io.github.cottonmc.cotton.gui.client.BackgroundPainter,io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createNinePatch(Identifier)","u":"createNinePatch(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"createNinePatch(Texture, Consumer>)","u":"createNinePatch(io.github.cottonmc.cotton.gui.widget.data.Texture,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"createPlayerInventoryPanel(WWidget)","u":"createPlayerInventoryPanel(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"createSlotPeer(Inventory, int, int, int)","u":"createSlotPeer(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"currentFrame"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"currentFrameTime"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"CURSOR_HEIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"CURSOR_PADDING_Y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"CYAN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"DARK_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"darkmodeColor"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"darkmodeTitleColor"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"darkTitleColor"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"data"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"DEFAULT_DARKMODE_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"DEFAULT_DARKMODE_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_FOCUS_IMAGE"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"DEFAULT_ITEM_FILTER"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_OFF_IMAGE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"DEFAULT_ON_IMAGE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"DEFAULT_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"DEFAULT_TEXT_COLOR"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"description"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"description"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"direction"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"direction"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"disableDarkmode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"DOWN"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"DOWN"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"dragging"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"drawBackground(DrawContext, float, int, int)","u":"drawBackground(net.minecraft.client.gui.DrawContext,float,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawBeveledPanel(DrawContext, int, int, int, int, int, int, int)","u":"drawBeveledPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"drawForeground(DrawContext, int, int)","u":"drawForeground(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawGuiPanel(DrawContext, int, int, int, int, int, int, int, int)","u":"drawGuiPanel(net.minecraft.client.gui.DrawContext,int,int,int,int,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, OrderedText, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, String, HorizontalAlignment, int, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,java.lang.String,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawString(DrawContext, String, int, int, int)","u":"drawString(net.minecraft.client.gui.DrawContext,java.lang.String,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawStringWithShadow(DrawContext, OrderedText, HorizontalAlignment, int, int, int, int)","u":"drawStringWithShadow(net.minecraft.client.gui.DrawContext,net.minecraft.text.OrderedText,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawStringWithShadow(DrawContext, String, HorizontalAlignment, int, int, int, int)","u":"drawStringWithShadow(net.minecraft.client.gui.DrawContext,java.lang.String,io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"drawTextHover(DrawContext, Style, int, int)","u":"drawTextHover(net.minecraft.client.gui.DrawContext,net.minecraft.text.Style,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"DYE_COLORS"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"empty()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"expandToFit(WWidget)","u":"expandToFit(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"expandToFit(WWidget)","u":"expandToFit(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"expandToFit(WWidget, Insets)","u":"expandToFit(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"field"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"find()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"fixedHeight"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"foci()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"foci()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"focus"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"focus"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"Focus(K, Rect2i)","u":"%3Cinit%3E(K,io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"focusImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"frames"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"frameTime"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"fullscreen"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"fullscreen"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"get()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"get()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getA()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getAbsoluteX()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getAbsoluteY()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getAxis()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getB()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"getBackgroundPainter()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockInventory(ScreenHandlerContext)","u":"getBlockInventory(net.minecraft.screen.ScreenHandlerContext)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockInventory(ScreenHandlerContext, int)","u":"getBlockInventory(net.minecraft.screen.ScreenHandlerContext,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockPropertyDelegate(ScreenHandlerContext)","u":"getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getBlockPropertyDelegate(ScreenHandlerContext, int)","u":"getBlockPropertyDelegate(net.minecraft.screen.ScreenHandlerContext,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getBottomPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getCardCount()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getCaretPosition(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getChroma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getChroma()"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getCursor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getDarkmodeColor()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getDarkmodeColor()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"getDescription()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"getDescription()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getDirection()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getDraggingFinishedListener()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"getDuration()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getFilter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFilter()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getFocus()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"getFocusedKey()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFocusedSlot()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getFocusImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getFocusModel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getFocusModel()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getG()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getHandlePosition()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getHandleSize()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getHorizontalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getHost()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHSLSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHSVSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getHue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getIcon()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getIconSize()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getInputFilter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getInputFilter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"getInsets()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getInventoryIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"getItems()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getLabel()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabelAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getLabelUpdater()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"getLastResponder()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"getLastResponder()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getLeftPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getLightness()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getLuma()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getMaxLength()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMaxScrollValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getMaxValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMaxValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getMinValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getMovableDistance()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"getName()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getNarrationName()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getNetworkSide()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOffImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"getOnClick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOnImage()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getOnToggle()"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"getOpacity()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"getOrNull()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getOutputFilter()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getOutputFilter()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getPacketSender()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getParent()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"getProperties()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"PropertyDelegateHolder","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getPropertyDelegate()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getR()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getRightPadding()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getRootPanel()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"getSaturation()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"getScrollBar()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getSelectedCard()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"getSelectedIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getSelectedIndex()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getSelectedTab()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getSelection()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getSpacing()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"getStack()"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"getStack(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getSuggestion()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"getTabCount()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"getText()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getTextStyleAt(int, int)","u":"getTextStyleAt(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getTextStyleAt(int, int)","u":"getTextStyleAt(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"getThumbWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"getTileHeight()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"getTileWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getTitle()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitleAlignment()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitleColor()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"getTitlePos()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"getToggle()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"getTopPadding()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"getValueChangeListener()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"getVerticalAlignment()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab","l":"getWidget()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"getWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getWidth()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"getWindow()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getX()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"getY()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GRAY_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GREEN"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"GREEN_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"grid"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"handledScreenTick()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"hashCode()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"hasValue()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"hasValue()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"height"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"height()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"hit(int, int)","u":"hit(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"hit(int, int)","u":"hit(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"HORIZONTAL"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"horizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"horizontalGap"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"horizontallyCentered(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"horizontalScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"host"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"hotbar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"hoveredProperty()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"HSL(float, float, float)","u":"%3Cinit%3E(float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"HSL(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"icon(Icon)","u":"icon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"iconSize"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"IGNORED"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"image()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"init()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"init()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"insets"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"Insets(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"INSTANCE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"interpolate(Color.RGB, double)","u":"interpolate(io.github.cottonmc.cotton.gui.widget.data.Color.RGB,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"inventory"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isActivationKey(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isBigSlot()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LibGui","l":"isDarkMode()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isDarkMode()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isDecreasingKey(int, WAbstractSlider.Direction)","u":"isDecreasingKey(int,io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isDragging()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"isEditable()"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"isEmpty()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isEnabled()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"isEnabled()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isFocused()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"isFocused(Focus)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"isFocused(Focus)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isFocused(WWidget)","u":"isFocused(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isFullscreen()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isHovered()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isIncreasingKey(int, WAbstractSlider.Direction)","u":"isIncreasingKey(int,io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isInsertingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isInsertingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"isInverted()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isModifiable()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"isMouseInsideBounds(int, int)","u":"isMouseInsideBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isNarratable()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"isOn"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"isScrollingHorizontally()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"isScrollingVertically()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isTakingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"isTakingAllowed()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"isTitleVisible()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"isVisible()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"isWithinBounds(int, int)","u":"isWithinBounds(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"ItemIcon(Item)","u":"%3Cinit%3E(net.minecraft.item.Item)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"ItemIcon(ItemStack)","u":"%3Cinit%3E(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"ItemSyncedGuiDescription(ScreenHandlerType, int, PlayerInventory, StackReference)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory,net.minecraft.inventory.StackReference)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"key()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"keyPressed(int, int, int)","u":"keyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"keyPressed(int, int, int)","u":"keyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"keyReleased(int, int, int)","u":"keyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"keyReleased(int, int, int)","u":"keyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"label"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"label"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"lastFrame"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"lastResponder"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"lastResponder"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"layout()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"LCH(float, float, float)","u":"%3Cinit%3E(float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"left"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"LEFT"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"left()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIGHT_BLUE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIGHT_GRAY_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"LIGHT_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"LightweightGuiDescription()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"LIME_DYE"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"listeners"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"MAGENTA_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"margin"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"markDirty()"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"markDirty()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"max"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"max"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"maxValue"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"maxValue"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"min"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseClicked(double, double, int)","u":"mouseClicked(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseClicked(double, double, int)","u":"mouseClicked(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseDragged(double, double, int, double, double)","u":"mouseDragged(double,double,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseDragged(double, double, int, double, double)","u":"mouseDragged(double,double,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseMoved(double, double)","u":"mouseMoved(double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseMoved(double, double)","u":"mouseMoved(double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseReleased(double, double, int)","u":"mouseReleased(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseReleased(double, double, int)","u":"mouseReleased(double,double,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"mouseScrolled(double, double, double)","u":"mouseScrolled(double,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"mouseScrolled(double, double, double)","u":"mouseScrolled(double,double,double)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"multiplyColor(int, float)","u":"multiplyColor(int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"name(String)","u":"name(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"NinePatchBackgroundPainter(NinePatch)","u":"%3Cinit%3E(juuxel.libninepatch.NinePatch)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"NONE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty.Builder","l":"nonnull()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"of(boolean)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"of(int, int)","u":"of(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"of(Inventory, int)","u":"of(net.minecraft.inventory.Inventory,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"of(Inventory, int, int, int)","u":"of(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"of(Rect2i)","u":"of(io.github.cottonmc.cotton.gui.widget.data.Rect2i)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"of(SyncedGuiDescription, NetworkSide)","u":"of(io.github.cottonmc.cotton.gui.SyncedGuiDescription,io.github.cottonmc.cotton.gui.networking.NetworkSide)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"of(T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"offImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"ofPlayerStorage(Inventory)","u":"ofPlayerStorage(net.minecraft.inventory.Inventory)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onCharTyped(char)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onCharTyped(char)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onClick(int, int, int)","u":"onClick(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"onClosed(PlayerEntity)","u":"onClosed(net.minecraft.entity.player.PlayerEntity)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onDirectionalKey(int, int)","u":"onDirectionalKey(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onFocusGained()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onFocusGained()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onFocusLost()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onFocusLost()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onHidden()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onImage"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onKeyPressed(int, int, int)","u":"onKeyPressed(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onKeyReleased(int, int, int)","u":"onKeyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onKeyReleased(int, int, int)","u":"onKeyReleased(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking.MessageReceiver","l":"onMessage(PacketByteBuf)","u":"onMessage(net.minecraft.network.PacketByteBuf)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseDown(int, int, int)","u":"onMouseDown(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseDrag(int, int, int, double, double)","u":"onMouseDrag(int,int,int,double,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onMouseMove(int, int)","u":"onMouseMove(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseMove(int, int)","u":"onMouseMove(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseScroll(int, int, double)","u":"onMouseScroll(int,int,double)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onMouseUp(int, int, int)","u":"onMouseUp(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView.ChangeListener","l":"onPropertyChange(ObservableView, T, T)","u":"onPropertyChange(io.github.cottonmc.cotton.gui.widget.data.ObservableView,T,T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"onShown()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot.ChangeListener","l":"onStackChanged(WItemSlot, Inventory, int, ItemStack)","u":"onStackChanged(io.github.cottonmc.cotton.gui.widget.WItemSlot,net.minecraft.inventory.Inventory,int,net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onToggle"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"onToggle(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"onValueChanged(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"onValueChanged(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"opaqueRgb(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"ORANGE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"outputOf(Inventory, int)","u":"outputOf(net.minecraft.inventory.Inventory,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"owner"},{"p":"io.github.cottonmc.cotton.gui","c":"ItemSyncedGuiDescription","l":"ownerStack"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"Icon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"ItemIcon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"paint(DrawContext, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WClippedPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"paint(DrawContext, int, int, int, int)","u":"paint(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"paintBackground(DrawContext, int, int, WWidget)","u":"paintBackground(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"paintBackground(DrawContext, int, int, WWidget)","u":"paintBackground(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"paintFrame(DrawContext, int, int, Texture)","u":"paintFrame(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"paintFrame(DrawContext, int, int, Texture)","u":"paintFrame(net.minecraft.client.gui.DrawContext,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"parent"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"PINK_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"pixelsToValues(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"playerInventory"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors","l":"pop()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"PROCESSED"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"properties"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"propertyDelegate"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"propertyDelegate"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"PURPLE_DYE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors","l":"push(int, int, int, int)","u":"push(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"quickMove(PlayerEntity, int)","u":"quickMove(net.minecraft.entity.player.PlayerEntity,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"readOnly()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"receive(Identifier, ScreenNetworking.MessageReceiver)","u":"receive(net.minecraft.util.Identifier,io.github.cottonmc.cotton.gui.networking.ScreenNetworking.MessageReceiver)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"Rect2i(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"RED"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"RED_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"releaseFocus()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"releaseFocus(WWidget)","u":"releaseFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"remove(WWidget)","u":"remove(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"remove(WWidget)","u":"remove(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"removed()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"removed()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"removeListener(ObservableView.ChangeListener)","u":"removeListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableView","l":"removeListener(ObservableView.ChangeListener)","u":"removeListener(io.github.cottonmc.cotton.gui.widget.data.ObservableView.ChangeListener)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"removeStack(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"removeStack(int, int)","u":"removeStack(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"render(DrawContext, int, int, float)","u":"render(net.minecraft.client.gui.DrawContext,int,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"render(DrawContext, int, int, float)","u":"render(net.minecraft.client.gui.DrawContext,int,int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderBox(DrawContext, int, int)","u":"renderBox(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderCursor(DrawContext, int, int, String)","u":"renderCursor(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderSelection(DrawContext, int, int, String)","u":"renderSelection(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderSuggestion(DrawContext, int, int)","u":"renderSuggestion(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderText(DrawContext, int, int, String)","u":"renderText(net.minecraft.client.gui.DrawContext,int,int,java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"renderTextField(DrawContext, int, int)","u":"renderTextField(net.minecraft.client.gui.DrawContext,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"renderTooltip(DrawContext, int, int, int, int)","u":"renderTooltip(net.minecraft.client.gui.DrawContext,int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"reposition(int, int)","u":"reposition(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"reposition(int, int)","u":"reposition(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud.Positioner","l":"reposition(WWidget, int, int)","u":"reposition(io.github.cottonmc.cotton.gui.widget.WWidget,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"requestFocus()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"requestFocus(WWidget)","u":"requestFocus(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"rgb(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int, int, int)","u":"%3Cinit%3E(int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"rgb(int, int, int, int)","u":"rgb(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"RGB(int, int, int, int)","u":"%3Cinit%3E(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"RIGHT"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"right()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"ROOT_PANEL"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"rootPanel"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"rootPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"scrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"scrollCursorIntoView()"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"ScreenNetworking","l":"send(Identifier, Consumer)","u":"send(net.minecraft.util.Identifier,java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"SERVER"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"ObservableProperty","l":"set(T)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setAlignment(HorizontalAlignment)","u":"setAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setAlignment(HorizontalAlignment)","u":"setAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setAxis(Axis)","u":"setAxis(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setBackgroundPainter(BackgroundPainter)","u":"setBackgroundPainter(io.github.cottonmc.cotton.gui.client.BackgroundPainter)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setBottomPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setChangedListener(Consumer)","u":"setChangedListener(java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setColor(int, int)","u":"setColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setCursorPos(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setDarkmodeColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setDirection(WAbstractSlider.Direction)","u":"setDirection(io.github.cottonmc.cotton.gui.widget.WAbstractSlider.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setDisabledColor(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setDraggingFinishedListener(IntConsumer)","u":"setDraggingFinishedListener(java.util.function.IntConsumer)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"setDuration(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setEditable(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setEnabled(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setEnabledColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setFilter(Predicate)","u":"setFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setFilter(Predicate)","u":"setFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"setFocused(Focus)","u":"setFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"setFocused(Focus)","u":"setFocused(io.github.cottonmc.cotton.gui.widget.focus.Focus)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setFocusImage(Texture)","u":"setFocusImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setFrames(Identifier...)","u":"setFrames(net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setFrames(Texture...)","u":"setFrames(io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setFullscreen(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"setGaps(int, int)","u":"setGaps(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setHorizontalAlignment(HorizontalAlignment)","u":"setHorizontalAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setHost(GuiDescription)","u":"setHost(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setHovered(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setIcon(Icon)","u":"setIcon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setIcon(Icon)","u":"setIcon(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setIconSize(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setImage(Identifier)","u":"setImage(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setImage(Texture)","u":"setImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setInputFilter(Predicate)","u":"setInputFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setInputFilter(Predicate)","u":"setInputFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setInsertingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setInsertingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"setInsets(Insets)","u":"setInsets(io.github.cottonmc.cotton.gui.widget.data.Insets)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"setItems(List)","u":"setItems(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setLabel(Text)","u":"setLabel(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabelAlignment(HorizontalAlignment)","u":"setLabelAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setLabelUpdater(WLabeledSlider.LabelUpdater)","u":"setLabelUpdater(io.github.cottonmc.cotton.gui.widget.WLabeledSlider.LabelUpdater)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"setLastResponder(WWidget)","u":"setLastResponder(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"setLastResponder(WWidget)","u":"setLastResponder(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setLeftPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"setListItemHeight(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setLocation(int, int)","u":"setLocation(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setMaxLength(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setMaxValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setMaxValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setMinValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setModifiable(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOffImage(Texture)","u":"setOffImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setOnClick(Runnable)","u":"setOnClick(java.lang.Runnable)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOnImage(Texture)","u":"setOnImage(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setOnToggle(Consumer)","u":"setOnToggle(java.util.function.Consumer)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"setOpacity(float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setOpaqueTint(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setOutputFilter(Predicate)","u":"setOutputFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setOutputFilter(Predicate)","u":"setOutputFilter(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int, int)","u":"setPadding(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setPadding(int, int, int, int)","u":"setPadding(int,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setParent(WPanel)","u":"setParent(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonHud","l":"setPositioner(WWidget, CottonHud.Positioner)","u":"setPositioner(io.github.cottonmc.cotton.gui.widget.WWidget,io.github.cottonmc.cotton.gui.client.CottonHud.Positioner)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"setProperties(PropertyDelegate)","u":"setProperties(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setPropertyDelegate(PropertyDelegate)","u":"setPropertyDelegate(net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setRightPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setRootPanel(WPanel)","u":"setRootPanel(io.github.cottonmc.cotton.gui.widget.WPanel)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"setScrollingHorizontally(TriState)","u":"setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"setScrollingVertically(TriState)","u":"setScrollingVertically(net.fabricmc.fabric.api.util.TriState)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSelectedCard(WWidget)","u":"setSelectedCard(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSelectedIndex(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSelectedIndex(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSelectedTab(WTabPanel.Tab)","u":"setSelectedTab(io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"setSize(int, int)","u":"setSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setSpacing(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"setStack(int, ItemStack)","u":"setStack(int,net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSuggestion(Text)","u":"setSuggestion(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setSuggestionColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setTakingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"setTakingAllowed(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"setText(Supplier)","u":"setText(java.util.function.Supplier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setText(Text)","u":"setText(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setText(Text)","u":"setText(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"setTextPredicate(Predicate)","u":"setTextPredicate(java.util.function.Predicate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileHeight(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileSize(int, int)","u":"setTileSize(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"setTileWidth(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setTint(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleAlignment(HorizontalAlignment)","u":"setTitleAlignment(io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleColor(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleColor(int, int)","u":"setTitleColor(int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitlePos(Vec2i)","u":"setTitlePos(io.github.cottonmc.cotton.gui.widget.data.Vec2i)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"GuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"setTitleVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"setToggle(boolean)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"NinePatchBackgroundPainter","l":"setTopPadding(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"setUv(float, float, float, float)","u":"setUv(float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setValue(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValue(int, boolean)","u":"setValue(int,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"setValueChangeListener(IntConsumer)","u":"setValueChangeListener(java.util.function.IntConsumer)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"setVerticalAlignment(VerticalAlignment)","u":"setVerticalAlignment(io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"setVisible(boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"setWindow(int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonInventoryScreen","l":"shouldPause()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"shouldRenderInDarkMode()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"FocusModel","l":"simple(WWidget)","u":"simple(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"SimpleKeyedFocusModel","l":"SimpleKeyedFocusModel(List>)","u":"%3Cinit%3E(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"singleImage"},{"p":"io.github.cottonmc.cotton.gui","c":"EmptyInventory","l":"size()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"sliding"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"SLOT"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"SLOT_TEXTURE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"spacing"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"streamChildren()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"supplier"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"SyncedGuiDescription(ScreenHandlerType, int, PlayerInventory)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"SyncedGuiDescription(ScreenHandlerType, int, PlayerInventory, Inventory, PropertyDelegate)","u":"%3Cinit%3E(net.minecraft.screen.ScreenHandlerType,int,net.minecraft.entity.player.PlayerInventory,net.minecraft.inventory.Inventory,net.minecraft.screen.PropertyDelegate)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"text"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"TEXT_PADDING_X"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"TEXT_PADDING_Y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"Texture(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"Texture(Identifier, float, float, float, float)","u":"%3Cinit%3E(net.minecraft.util.Identifier,float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedGuiRect(DrawContext, int, int, int, int, Identifier, int)","u":"texturedGuiRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedGuiRect(DrawContext, int, int, int, int, Identifier, int, int, int)","u":"texturedGuiRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,float,float,float,float,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, float, float, float, float, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,float,float,float,float,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Identifier, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,net.minecraft.util.Identifier,int,float)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Texture, int)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture,int)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"ScreenDrawing","l":"texturedRect(DrawContext, int, int, int, int, Texture, int, float)","u":"texturedRect(net.minecraft.client.gui.DrawContext,int,int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture,int,float)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"TextureIcon(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","c":"TextureIcon","l":"TextureIcon(Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"THUMB_SIZE"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"tick()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"tint"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"title(Text)","u":"title(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleAlignment"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleAlignment"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleColor"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleColor"},{"p":"io.github.cottonmc.cotton.gui.client","c":"LightweightGuiDescription","l":"titleVisible"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"titleVisible"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"titleX"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"titleY"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"tooltip(Collection)","u":"tooltip(java.util.Collection)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel.Tab.Builder","l":"tooltip(Text...)","u":"tooltip(net.minecraft.text.Text...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"TooltipBuilder","l":"TooltipBuilder()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"tooltipLabel"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"tooltipTextComponent"},{"p":"io.github.cottonmc.cotton.gui.client","c":"CottonClientScreen","l":"top"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"TOP"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"top()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.HSL","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.LCH","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color.RGB","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"toRgb()"},{"p":"io.github.cottonmc.cotton.gui.client","c":"Scissors.Frame","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Insets","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","c":"Focus","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"toString()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"TRACK_WIDTH"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"u1()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"u2()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"unconfigured"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"UP"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"UP"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider.LabelUpdater","l":"updateLabel(int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"updateValueCoordRatios()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"v1()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"v2()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"validate(GuiDescription)","u":"validate(io.github.cottonmc.cotton.gui.GuiDescription)"},{"p":"io.github.cottonmc.cotton.gui","c":"ValidatedSlot","l":"ValidatedSlot(Inventory, int, int, int)","u":"%3Cinit%3E(net.minecraft.inventory.Inventory,int,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"value"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"value"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.networking","c":"NetworkSide","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"HorizontalAlignment","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"InputResult","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"VerticalAlignment","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider.Direction","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar.Direction","l":"values()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"valueToCoordRatio"},{"p":"io.github.cottonmc.cotton.gui.client","c":"BackgroundPainter","l":"VANILLA"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"Vec2i(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Axis","l":"VERTICAL"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"verticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"verticalGap"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"verticalScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WAbstractSlider","l":"WAbstractSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Identifier, Identifier, int, int)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Identifier, Identifier, int, int, WBar.Direction)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Texture, Texture, int, int)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"WBar(Texture, Texture, int, int, WBar.Direction)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBox","l":"WBox(Axis)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Icon)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.icon.Icon)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Icon, Text)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.icon.Icon,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WButton","l":"WButton(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WCardPanel","l":"WCardPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WClippedPanel","l":"WClippedPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"WDynamicLabel(Supplier)","u":"%3Cinit%3E(java.util.function.Supplier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WDynamicLabel","l":"WDynamicLabel(Supplier, int)","u":"%3Cinit%3E(java.util.function.Supplier,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"WGridPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WGridPanel","l":"WGridPanel(int)","u":"%3Cinit%3E(int)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"WHITE"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"WHITE_DYE"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"width"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"width()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"window"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(ItemStack)","u":"%3Cinit%3E(net.minecraft.item.ItemStack)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(List)","u":"%3Cinit%3E(java.util.List)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItem","l":"WItem(TagKey)","u":"%3Cinit%3E(net.minecraft.registry.tag.TagKey)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WItemSlot","l":"WItemSlot(Inventory, int, int, int, boolean)","u":"%3Cinit%3E(net.minecraft.inventory.Inventory,int,int,int,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withConstantMaximum(Identifier, Identifier, int, int, WBar.Direction)","u":"withConstantMaximum(net.minecraft.util.Identifier,net.minecraft.util.Identifier,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withConstantMaximum(Texture, Texture, int, int, WBar.Direction)","u":"withConstantMaximum(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,int,int,io.github.cottonmc.cotton.gui.widget.WBar.Direction)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withTooltip(String)","u":"withTooltip(java.lang.String)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WBar","l":"withTooltip(Text)","u":"withTooltip(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Texture","l":"withUv(float, float, float, float)","u":"withUv(float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"WLabel(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabel","l":"WLabel(Text, int)","u":"%3Cinit%3E(net.minecraft.text.Text,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Axis, Text)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WLabeledSlider","l":"WLabeledSlider(int, int, Text)","u":"%3Cinit%3E(int,int,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WListPanel","l":"WListPanel(List, Supplier, BiConsumer)","u":"%3Cinit%3E(java.util.List,java.util.function.Supplier,java.util.function.BiConsumer)"},{"p":"io.github.cottonmc.cotton.gui","c":"SyncedGuiDescription","l":"world"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanel","l":"WPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPanelWithInsets","l":"WPanelWithInsets()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlainPanel","l":"WPlainPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory, boolean)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory,boolean)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WPlayerInvPanel","l":"WPlayerInvPanel(PlayerInventory, WWidget)","u":"%3Cinit%3E(net.minecraft.entity.player.PlayerInventory,io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"WScrollBar()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollBar","l":"WScrollBar(Axis)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WScrollPanel","l":"WScrollPanel(WWidget)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.WWidget)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSlider","l":"WSlider(int, int, Axis)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Axis)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Identifier, float, float, float, float)","u":"%3Cinit%3E(net.minecraft.util.Identifier,float,float,float,float)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(int, Identifier...)","u":"%3Cinit%3E(int,net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(int, Texture...)","u":"%3Cinit%3E(int,io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WSprite","l":"WSprite(Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTabPanel","l":"WTabPanel()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"WText(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WText","l":"WText(Text, int)","u":"%3Cinit%3E(net.minecraft.text.Text,int)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"WTextField()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTextField","l":"WTextField(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, Identifier)","u":"%3Cinit%3E(int,int,net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, int, Identifier...)","u":"%3Cinit%3E(int,int,int,net.minecraft.util.Identifier...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, int, Texture...)","u":"%3Cinit%3E(int,int,int,io.github.cottonmc.cotton.gui.widget.data.Texture...)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WTiledSprite","l":"WTiledSprite(int, int, Texture)","u":"%3Cinit%3E(int,int,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Identifier, Identifier)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Identifier, Identifier, Text)","u":"%3Cinit%3E(net.minecraft.util.Identifier,net.minecraft.util.Identifier,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Text)","u":"%3Cinit%3E(net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Texture, Texture)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WToggleButton","l":"WToggleButton(Texture, Texture, Text)","u":"%3Cinit%3E(io.github.cottonmc.cotton.gui.widget.data.Texture,io.github.cottonmc.cotton.gui.widget.data.Texture,net.minecraft.text.Text)"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"WWidget()","u":"%3Cinit%3E()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"x"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"x()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"x()"},{"p":"io.github.cottonmc.cotton.gui.widget","c":"WWidget","l":"y"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Rect2i","l":"y()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Vec2i","l":"y()"},{"p":"io.github.cottonmc.cotton.gui.widget.data","c":"Color","l":"YELLOW_DYE"}];updateSearchResults(); \ No newline at end of file diff --git a/libgui/overview-summary.html b/libgui/overview-summary.html index c334e1e..1e8bbd2 100644 --- a/libgui/overview-summary.html +++ b/libgui/overview-summary.html @@ -1,25 +1,25 @@ - - - - -LibGui 8.0.0+1.20 API - - - - - - - - - - -
- -

index.html

-
- - + + + + +LibGui 8.1.0+1.20.1 API + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/libgui/overview-tree.html b/libgui/overview-tree.html index 037ae86..4767c18 100644 --- a/libgui/overview-tree.html +++ b/libgui/overview-tree.html @@ -1,222 +1,223 @@ - - - - -Class Hierarchy (LibGui 8.0.0+1.20 API) - - - - - - - - - - - - - - -
- -
-
- -
-

Class Hierarchy

- -
-
-

Interface Hierarchy

- -
-
-

Enum Class Hierarchy

- -
-
-
-
- - + + + + +Class Hierarchy (LibGui 8.1.0+1.20.1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/libgui/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/libgui/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index 34abd18..0000000 Binary files a/libgui/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/libgui/script-dir/images/ui-bg_glass_65_dadada_1x400.png deleted file mode 100644 index f058a93..0000000 Binary files a/libgui/script-dir/images/ui-bg_glass_65_dadada_1x400.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/libgui/script-dir/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 2ce04c1..0000000 Binary files a/libgui/script-dir/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/libgui/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index a90afb8..0000000 Binary files a/libgui/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/libgui/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index dbe091f..0000000 Binary files a/libgui/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/libgui/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 5dc3593..0000000 Binary files a/libgui/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-icons_222222_256x240.png b/libgui/script-dir/images/ui-icons_222222_256x240.png deleted file mode 100644 index e723e17..0000000 Binary files a/libgui/script-dir/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-icons_2e83ff_256x240.png b/libgui/script-dir/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 1f5f497..0000000 Binary files a/libgui/script-dir/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-icons_454545_256x240.png b/libgui/script-dir/images/ui-icons_454545_256x240.png deleted file mode 100644 index 618f5b0..0000000 Binary files a/libgui/script-dir/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-icons_888888_256x240.png b/libgui/script-dir/images/ui-icons_888888_256x240.png deleted file mode 100644 index ee5e33f..0000000 Binary files a/libgui/script-dir/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/libgui/script-dir/images/ui-icons_cd0a0a_256x240.png b/libgui/script-dir/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 7e8ebc1..0000000 Binary files a/libgui/script-dir/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/libgui/script-dir/jquery-3.5.1.min.js b/libgui/script-dir/jquery-3.5.1.min.js deleted file mode 100644 index b061403..0000000 --- a/libgui/script-dir/jquery-3.5.1.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";x.ui=x.ui||{};x.ui.version="1.13.1";var n,i=0,l=Array.prototype.hasOwnProperty,a=Array.prototype.slice;x.cleanData=(n=x.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");n(t)}),x.widget=function(t,i,e){var s,n,o,l={},a=t.split(".")[0],r=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[r.toLowerCase()]=function(t){return!!x.data(t,r)},x[a]=x[a]||{},s=x[a][t],n=x[a][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},x.extend(n,s,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(o=new i).options=x.widget.extend({},o.options),x.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}l[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=x.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},l,{constructor:n,namespace:a,widgetName:t,widgetFullName:r}),s?(x.each(s._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),x.widget.bridge(t,n),n},x.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
      "),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
        ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
        ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
        ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
        ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/libgui/script-dir/jquery-ui.structure.min.css b/libgui/script-dir/jquery-ui.structure.min.css deleted file mode 100644 index e880892..0000000 --- a/libgui/script-dir/jquery-ui.structure.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2018-12-06 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/libgui/script.js b/libgui/script.js index ccac782..864989c 100644 --- a/libgui/script.js +++ b/libgui/script.js @@ -1,132 +1,132 @@ -/* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -var moduleSearchIndex; -var packageSearchIndex; -var typeSearchIndex; -var memberSearchIndex; -var tagSearchIndex; -function loadScripts(doc, tag) { - createElem(doc, tag, 'search.js'); - - createElem(doc, tag, 'module-search-index.js'); - createElem(doc, tag, 'package-search-index.js'); - createElem(doc, tag, 'type-search-index.js'); - createElem(doc, tag, 'member-search-index.js'); - createElem(doc, tag, 'tag-search-index.js'); -} - -function createElem(doc, tag, path) { - var script = doc.createElement(tag); - var scriptElement = doc.getElementsByTagName(tag)[0]; - script.src = pathtoroot + path; - scriptElement.parentNode.insertBefore(script, scriptElement); -} - -function show(tableId, selected, columns) { - if (tableId !== selected) { - document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') - .forEach(function(elem) { - elem.style.display = 'none'; - }); - } - document.querySelectorAll('div.' + selected) - .forEach(function(elem, index) { - elem.style.display = ''; - var isEvenRow = index % (columns * 2) < columns; - elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); - elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); - }); - updateTabs(tableId, selected); -} - -function updateTabs(tableId, selected) { - document.querySelector('div#' + tableId +' .summary-table') - .setAttribute('aria-labelledby', selected); - document.querySelectorAll('button[id^="' + tableId + '"]') - .forEach(function(tab, index) { - if (selected === tab.id || (tableId === selected && index === 0)) { - tab.className = activeTableTab; - tab.setAttribute('aria-selected', true); - tab.setAttribute('tabindex',0); - } else { - tab.className = tableTab; - tab.setAttribute('aria-selected', false); - tab.setAttribute('tabindex',-1); - } - }); -} - -function switchTab(e) { - var selected = document.querySelector('[aria-selected=true]'); - if (selected) { - if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { - // left or up arrow key pressed: move focus to previous tab - selected.previousSibling.click(); - selected.previousSibling.focus(); - e.preventDefault(); - } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { - // right or down arrow key pressed: move focus to next tab - selected.nextSibling.click(); - selected.nextSibling.focus(); - e.preventDefault(); - } - } -} - -var updateSearchResults = function() {}; - -function indexFilesLoaded() { - return moduleSearchIndex - && packageSearchIndex - && typeSearchIndex - && memberSearchIndex - && tagSearchIndex; -} - -// Workaround for scroll position not being included in browser history (8249133) -document.addEventListener("DOMContentLoaded", function(e) { - var contentDiv = document.querySelector("div.flex-content"); - window.addEventListener("popstate", function(e) { - if (e.state !== null) { - contentDiv.scrollTop = e.state; - } - }); - window.addEventListener("hashchange", function(e) { - history.replaceState(contentDiv.scrollTop, document.title); - }); - contentDiv.addEventListener("scroll", function(e) { - var timeoutID; - if (!timeoutID) { - timeoutID = setTimeout(function() { - history.replaceState(contentDiv.scrollTop, document.title); - timeoutID = null; - }, 100); - } - }); - if (!location.hash) { - history.replaceState(contentDiv.scrollTop, document.title); - } -}); +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/libgui/search.js b/libgui/search.js index 3f826c7..db3b2f4 100644 --- a/libgui/search.js +++ b/libgui/search.js @@ -1,354 +1,354 @@ -/* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -var noResult = {l: "No results found"}; -var loading = {l: "Loading search index..."}; -var catModules = "Modules"; -var catPackages = "Packages"; -var catTypes = "Classes and Interfaces"; -var catMembers = "Members"; -var catSearchTags = "Search Tags"; -var highlight = "$&"; -var searchPattern = ""; -var fallbackPattern = ""; -var RANKING_THRESHOLD = 2; -var NO_MATCH = 0xffff; -var MIN_RESULTS = 3; -var MAX_RESULTS = 500; -var UNNAMED = ""; -function escapeHtml(str) { - return str.replace(//g, ">"); -} -function getHighlightedText(item, matcher, fallbackMatcher) { - var escapedItem = escapeHtml(item); - var highlighted = escapedItem.replace(matcher, highlight); - if (highlighted === escapedItem) { - highlighted = escapedItem.replace(fallbackMatcher, highlight) - } - return highlighted; -} -function getURLPrefix(ui) { - var urlPrefix=""; - var slash = "/"; - if (ui.item.category === catModules) { - return ui.item.l + slash; - } else if (ui.item.category === catPackages && ui.item.m) { - return ui.item.m + slash; - } else if (ui.item.category === catTypes || ui.item.category === catMembers) { - if (ui.item.m) { - urlPrefix = ui.item.m + slash; - } else { - $.each(packageSearchIndex, function(index, item) { - if (item.m && ui.item.p === item.l) { - urlPrefix = item.m + slash; - } - }); - } - } - return urlPrefix; -} -function createSearchPattern(term) { - var pattern = ""; - var isWordToken = false; - term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { - if (index > 0) { - // whitespace between identifiers is significant - pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; - } - var tokens = w.split(/(?=[A-Z,.()<>[\/])/); - for (var i = 0; i < tokens.length; i++) { - var s = tokens[i]; - if (s === "") { - continue; - } - pattern += $.ui.autocomplete.escapeRegex(s); - isWordToken = /\w$/.test(s); - if (isWordToken) { - pattern += "([a-z0-9_$<>\\[\\]]*?)"; - } - } - }); - return pattern; -} -function createMatcher(pattern, flags) { - var isCamelCase = /[A-Z]/.test(pattern); - return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); -} -var watermark = 'Search'; -$(function() { - var search = $("#search-input"); - var reset = $("#reset-button"); - search.val(''); - search.prop("disabled", false); - reset.prop("disabled", false); - search.val(watermark).addClass('watermark'); - search.blur(function() { - if ($(this).val().length === 0) { - $(this).val(watermark).addClass('watermark'); - } - }); - search.on('click keydown paste', function() { - if ($(this).val() === watermark) { - $(this).val('').removeClass('watermark'); - } - }); - reset.click(function() { - search.val('').focus(); - }); - search.focus()[0].setSelectionRange(0, 0); -}); -$.widget("custom.catcomplete", $.ui.autocomplete, { - _create: function() { - this._super(); - this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); - }, - _renderMenu: function(ul, items) { - var rMenu = this; - var currentCategory = ""; - rMenu.menu.bindings = $(); - $.each(items, function(index, item) { - var li; - if (item.category && item.category !== currentCategory) { - ul.append("
      • " + item.category + "
      • "); - currentCategory = item.category; - } - li = rMenu._renderItemData(ul, item); - if (item.category) { - li.attr("aria-label", item.category + " : " + item.l); - li.attr("class", "result-item"); - } else { - li.attr("aria-label", item.l); - li.attr("class", "result-item"); - } - }); - }, - _renderItem: function(ul, item) { - var label = ""; - var matcher = createMatcher(escapeHtml(searchPattern), "g"); - var fallbackMatcher = new RegExp(fallbackPattern, "gi") - if (item.category === catModules) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catPackages) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catTypes) { - label = (item.p && item.p !== UNNAMED) - ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) - : getHighlightedText(item.l, matcher, fallbackMatcher); - } else if (item.category === catMembers) { - label = (item.p && item.p !== UNNAMED) - ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) - : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); - } else if (item.category === catSearchTags) { - label = getHighlightedText(item.l, matcher, fallbackMatcher); - } else { - label = item.l; - } - var li = $("
      • ").appendTo(ul); - var div = $("
        ").appendTo(li); - if (item.category === catSearchTags && item.h) { - if (item.d) { - div.html(label + " (" + item.h + ")
        " - + item.d + "
        "); - } else { - div.html(label + " (" + item.h + ")"); - } - } else { - if (item.m) { - div.html(item.m + "/" + label); - } else { - div.html(label); - } - } - return li; - } -}); -function rankMatch(match, category) { - if (!match) { - return NO_MATCH; - } - var index = match.index; - var input = match.input; - var leftBoundaryMatch = 2; - var periferalMatch = 0; - // make sure match is anchored on a left word boundary - if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { - leftBoundaryMatch = 0; - } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { - leftBoundaryMatch = 1; - } - var matchEnd = index + match[0].length; - var leftParen = input.indexOf("("); - var endOfName = leftParen > -1 ? leftParen : input.length; - // exclude peripheral matches - if (category !== catModules && category !== catSearchTags) { - var delim = category === catPackages ? "/" : "."; - if (leftParen > -1 && leftParen < index) { - periferalMatch += 2; - } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { - periferalMatch += 2; - } - } - var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match - for (var i = 1; i < match.length; i++) { - // lower ranking if parts of the name are missing - if (match[i]) - delta += match[i].length; - } - if (category === catTypes) { - // lower ranking if a type name contains unmatched camel-case parts - if (/[A-Z]/.test(input.substring(matchEnd))) - delta += 5; - if (/[A-Z]/.test(input.substring(0, index))) - delta += 5; - } - return leftBoundaryMatch + periferalMatch + (delta / 200); - -} -function doSearch(request, response) { - var result = []; - searchPattern = createSearchPattern(request.term); - fallbackPattern = createSearchPattern(request.term.toLowerCase()); - if (searchPattern === "") { - return this.close(); - } - var camelCaseMatcher = createMatcher(searchPattern, ""); - var fallbackMatcher = new RegExp(fallbackPattern, "i"); - - function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { - if (indexArray) { - var newResults = []; - $.each(indexArray, function (i, item) { - item.category = category; - var ranking = rankMatch(matcher.exec(nameFunc(item)), category); - if (ranking < RANKING_THRESHOLD) { - newResults.push({ranking: ranking, item: item}); - } - return newResults.length <= MAX_RESULTS; - }); - return newResults.sort(function(e1, e2) { - return e1.ranking - e2.ranking; - }).map(function(e) { - return e.item; - }); - } - return []; - } - function searchIndex(indexArray, category, nameFunc) { - var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); - result = result.concat(primaryResults); - if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { - var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); - result = result.concat(secondaryResults.filter(function (item) { - return primaryResults.indexOf(item) === -1; - })); - } - } - - searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); - searchIndex(packageSearchIndex, catPackages, function(item) { - return (item.m && request.term.indexOf("/") > -1) - ? (item.m + "/" + item.l) : item.l; - }); - searchIndex(typeSearchIndex, catTypes, function(item) { - return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; - }); - searchIndex(memberSearchIndex, catMembers, function(item) { - return request.term.indexOf(".") > -1 - ? item.p + "." + item.c + "." + item.l : item.l; - }); - searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); - - if (!indexFilesLoaded()) { - updateSearchResults = function() { - doSearch(request, response); - } - result.unshift(loading); - } else { - updateSearchResults = function() {}; - } - response(result); -} -$(function() { - $("#search-input").catcomplete({ - minLength: 1, - delay: 300, - source: doSearch, - response: function(event, ui) { - if (!ui.content.length) { - ui.content.push(noResult); - } else { - $("#search-input").empty(); - } - }, - autoFocus: true, - focus: function(event, ui) { - return false; - }, - position: { - collision: "flip" - }, - select: function(event, ui) { - if (ui.item.category) { - var url = getURLPrefix(ui); - if (ui.item.category === catModules) { - url += "module-summary.html"; - } else if (ui.item.category === catPackages) { - if (ui.item.u) { - url = ui.item.u; - } else { - url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; - } - } else if (ui.item.category === catTypes) { - if (ui.item.u) { - url = ui.item.u; - } else if (ui.item.p === UNNAMED) { - url += ui.item.l + ".html"; - } else { - url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; - } - } else if (ui.item.category === catMembers) { - if (ui.item.p === UNNAMED) { - url += ui.item.c + ".html" + "#"; - } else { - url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; - } - if (ui.item.u) { - url += ui.item.u; - } else { - url += ui.item.l; - } - } else if (ui.item.category === catSearchTags) { - url += ui.item.u; - } - if (top !== window) { - parent.classFrame.location = pathtoroot + url; - } else { - window.location.href = pathtoroot + url; - } - $("#search-input").focus(); - } - } - }); -}); +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
      • " + item.category + "
      • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
      • ").appendTo(ul); + var div = $("
        ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
        " + + item.d + "
        "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/libgui/stylesheet.css b/libgui/stylesheet.css index 8133b9b..4a576bd 100644 --- a/libgui/stylesheet.css +++ b/libgui/stylesheet.css @@ -1,865 +1,869 @@ -/* - * Javadoc style sheet - */ - -@import url('resources/fonts/dejavu.css'); - -/* - * Styles for individual HTML elements. - * - * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular - * HTML element throughout the page. - */ - -body { - background-color:#ffffff; - color:#353833; - font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size:14px; - margin:0; - padding:0; - height:100%; - width:100%; -} -iframe { - margin:0; - padding:0; - height:100%; - width:100%; - overflow-y:scroll; - border:none; -} -a:link, a:visited { - text-decoration:none; - color:#4A6782; -} -a[href]:hover, a[href]:focus { - text-decoration:none; - color:#bb7a2a; -} -a[name] { - color:#353833; -} -pre { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; -} -h1 { - font-size:20px; -} -h2 { - font-size:18px; -} -h3 { - font-size:16px; -} -h4 { - font-size:15px; -} -h5 { - font-size:14px; -} -h6 { - font-size:13px; -} -ul { - list-style-type:disc; -} -code, tt { - font-family:'DejaVu Sans Mono', monospace; -} -:not(h1, h2, h3, h4, h5, h6) > code, -:not(h1, h2, h3, h4, h5, h6) > tt { - font-size:14px; - padding-top:4px; - margin-top:8px; - line-height:1.4em; -} -dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - padding-top:4px; -} -.summary-table dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - vertical-align:top; - padding-top:4px; -} -sup { - font-size:8px; -} -button { - font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size: 14px; -} -/* - * Styles for HTML generated by javadoc. - * - * These are style classes that are used by the standard doclet to generate HTML documentation. - */ - -/* - * Styles for document title and copyright. - */ -.clear { - clear:both; - height:0; - overflow:hidden; -} -.about-language { - float:right; - padding:0 21px 8px 8px; - font-size:11px; - margin-top:-9px; - height:2.9em; -} -.legal-copy { - margin-left:.5em; -} -.tab { - background-color:#0066FF; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* - * Styles for navigation bar. - */ -@media screen { - .flex-box { - position:fixed; - display:flex; - flex-direction:column; - height: 100%; - width: 100%; - } - .flex-header { - flex: 0 0 auto; - } - .flex-content { - flex: 1 1 auto; - overflow-y: auto; - } -} -.top-nav { - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - min-height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.sub-nav { - background-color:#dee3e9; - float:left; - width:100%; - overflow:hidden; - font-size:12px; -} -.sub-nav div { - clear:left; - float:left; - padding:0 0 5px 6px; - text-transform:uppercase; -} -.sub-nav .nav-list { - padding-top:5px; -} -ul.nav-list { - display:block; - margin:0 25px 0 0; - padding:0; -} -ul.sub-nav-list { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.nav-list li { - list-style:none; - float:left; - padding: 5px 6px; - text-transform:uppercase; -} -.sub-nav .nav-list-search { - float:right; - margin:0 0 0 0; - padding:5px 6px; - clear:none; -} -.nav-list-search label { - position:relative; - right:-16px; -} -ul.sub-nav-list li { - list-style:none; - float:left; - padding-top:10px; -} -.top-nav a:link, .top-nav a:active, .top-nav a:visited { - color:#FFFFFF; - text-decoration:none; - text-transform:uppercase; -} -.top-nav a:hover { - text-decoration:none; - color:#bb7a2a; - text-transform:uppercase; -} -.nav-bar-cell1-rev { - background-color:#F8981D; - color:#253441; - margin: auto 5px; -} -.skip-nav { - position:absolute; - top:auto; - left:-9999px; - overflow:hidden; -} -/* - * Hide navigation links and search box in print layout - */ -@media print { - ul.nav-list, div.sub-nav { - display:none; - } -} -/* - * Styles for page header and footer. - */ -.title { - color:#2c4557; - margin:10px 0; -} -.sub-title { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 15px 0; - padding:0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:13px; -} -/* - * Styles for headings. - */ -body.class-declaration-page .summary h2, -body.class-declaration-page .details h2, -body.class-use-page h2, -body.module-declaration-page .block-list h2 { - font-style: italic; - padding:0; - margin:15px 0; -} -body.class-declaration-page .summary h3, -body.class-declaration-page .details h3, -body.class-declaration-page .summary .inherited-list h2 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -/* - * Styles for page layout containers. - */ -main { - clear:both; - padding:10px 20px; - position:relative; -} -dl.notes > dt { - font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -dl.notes > dd { - margin:5px 10px 10px 0; - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; -} -dl.name-value > dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -dl.name-value > dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* - * Styles for lists. - */ -li.circle { - list-style:circle; -} -ul.horizontal li { - display:inline; - font-size:0.9em; -} -div.inheritance { - margin:0; - padding:0; -} -div.inheritance div.inheritance { - margin-left:2em; -} -ul.block-list, -ul.details-list, -ul.member-list, -ul.summary-list { - margin:10px 0 10px 0; - padding:0; -} -ul.block-list > li, -ul.details-list > li, -ul.member-list > li, -ul.summary-list > li { - list-style:none; - margin-bottom:15px; - line-height:1.4; -} -.summary-table dl, .summary-table dl dt, .summary-table dl dd { - margin-top:0; - margin-bottom:1px; -} -ul.see-list, ul.see-list-long { - padding-left: 0; - list-style: none; -} -ul.see-list li { - display: inline; -} -ul.see-list li:not(:last-child):after, -ul.see-list-long li:not(:last-child):after { - content: ", "; - white-space: pre-wrap; -} -/* - * Styles for tables. - */ -.summary-table, .details-table { - width:100%; - border-spacing:0; - border-left:1px solid #EEE; - border-right:1px solid #EEE; - border-bottom:1px solid #EEE; - padding:0; -} -.caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#253441; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0; - padding-top:10px; - padding-left:1px; - margin:0; - white-space:pre; -} -.caption a:link, .caption a:visited { - color:#1f389c; -} -.caption a:hover, -.caption a:active { - color:#FFFFFF; -} -.caption span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - padding-bottom:7px; - display:inline-block; - float:left; - background-color:#F8981D; - border: none; - height:16px; -} -div.table-tabs { - padding:10px 0 0 1px; - margin:0; -} -div.table-tabs > button { - border: none; - cursor: pointer; - padding: 5px 12px 7px 12px; - font-weight: bold; - margin-right: 3px; -} -div.table-tabs > button.active-table-tab { - background: #F8981D; - color: #253441; -} -div.table-tabs > button.table-tab { - background: #4D7A97; - color: #FFFFFF; -} -.two-column-summary { - display: grid; - grid-template-columns: minmax(15%, max-content) minmax(15%, auto); -} -.three-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); -} -.four-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); -} -@media screen and (max-width: 600px) { - .two-column-summary { - display: grid; - grid-template-columns: 1fr; - } -} -@media screen and (max-width: 800px) { - .three-column-summary { - display: grid; - grid-template-columns: minmax(10%, max-content) minmax(25%, auto); - } - .three-column-summary .col-last { - grid-column-end: span 2; - } -} -@media screen and (max-width: 1000px) { - .four-column-summary { - display: grid; - grid-template-columns: minmax(15%, max-content) minmax(15%, auto); - } -} -.summary-table > div, .details-table > div { - text-align:left; - padding: 8px 3px 3px 7px; -} -.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { - vertical-align:top; - padding-right:0; - padding-top:8px; - padding-bottom:3px; -} -.table-header { - background:#dee3e9; - font-weight: bold; -} -.col-first, .col-first { - font-size:13px; -} -.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { - font-size:13px; -} -.col-first, .col-second, .col-constructor-name { - vertical-align:top; - overflow: auto; -} -.col-last { - white-space:normal; -} -.col-first a:link, .col-first a:visited, -.col-second a:link, .col-second a:visited, -.col-first a:link, .col-first a:visited, -.col-second a:link, .col-second a:visited, -.col-constructor-name a:link, .col-constructor-name a:visited, -.col-summary-item-name a:link, .col-summary-item-name a:visited, -.constant-values-container a:link, .constant-values-container a:visited, -.all-classes-container a:link, .all-classes-container a:visited, -.all-packages-container a:link, .all-packages-container a:visited { - font-weight:bold; -} -.table-sub-heading-color { - background-color:#EEEEFF; -} -.even-row-color, .even-row-color .table-header { - background-color:#FFFFFF; -} -.odd-row-color, .odd-row-color .table-header { - background-color:#EEEEEF; -} -/* - * Styles for contents. - */ -.deprecated-content { - margin:0; - padding:10px 0; -} -div.block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; -} -.col-last div { - padding-top:0; -} -.col-last a { - padding-bottom:3px; -} -.module-signature, -.package-signature, -.type-signature, -.member-signature { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - margin:14px 0; - white-space: pre-wrap; -} -.module-signature, -.package-signature, -.type-signature { - margin-top: 0; -} -.member-signature .type-parameters-long, -.member-signature .parameters, -.member-signature .exceptions { - display: inline-block; - vertical-align: top; - white-space: pre; -} -.member-signature .type-parameters { - white-space: normal; -} -/* - * Styles for formatting effect. - */ -.source-line-no { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:10px; -} -.block { - display:block; - margin:0 10px 5px 0; - color:#474747; -} -.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, -.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, -.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { - font-weight:bold; -} -.deprecation-comment, .help-footnote, .preview-comment { - font-style:italic; -} -.deprecation-block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; - border-style:solid; - border-width:thin; - border-radius:10px; - padding:10px; - margin-bottom:10px; - margin-right:10px; - display:inline-block; -} -.preview-block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; - border-style:solid; - border-width:thin; - border-radius:10px; - padding:10px; - margin-bottom:10px; - margin-right:10px; - display:inline-block; -} -div.block div.deprecation-comment { - font-style:normal; -} -/* - * Styles specific to HTML5 elements. - */ -main, nav, header, footer, section { - display:block; -} -/* - * Styles for javadoc search. - */ -.ui-autocomplete-category { - font-weight:bold; - font-size:15px; - padding:7px 0 7px 3px; - background-color:#4D7A97; - color:#FFFFFF; -} -.result-item { - font-size:13px; -} -.ui-autocomplete { - max-height:85%; - max-width:65%; - overflow-y:scroll; - overflow-x:scroll; - white-space:nowrap; - box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); -} -ul.ui-autocomplete { - position:fixed; - z-index:999999; -} -ul.ui-autocomplete li { - float:left; - clear:both; - width:100%; -} -.result-highlight { - font-weight:bold; -} -#search-input { - background-image:url('resources/glass.png'); - background-size:13px; - background-repeat:no-repeat; - background-position:2px 3px; - padding-left:20px; - position:relative; - right:-18px; - width:400px; -} -#reset-button { - background-color: rgb(255,255,255); - background-image:url('resources/x.png'); - background-position:center; - background-repeat:no-repeat; - background-size:12px; - border:0 none; - width:16px; - height:16px; - position:relative; - left:-4px; - top:-4px; - font-size:0px; -} -.watermark { - color:#545454; -} -.search-tag-desc-result { - font-style:italic; - font-size:11px; -} -.search-tag-holder-result { - font-style:italic; - font-size:12px; -} -.search-tag-result:target { - background-color:yellow; -} -.module-graph span { - display:none; - position:absolute; -} -.module-graph:hover span { - display:block; - margin: -100px 0 0 100px; - z-index: 1; -} -.inherited-list { - margin: 10px 0 10px 0; -} -section.class-description { - line-height: 1.4; -} -.summary section[class$="-summary"], .details section[class$="-details"], -.class-uses .detail, .serialized-class-details { - padding: 0px 20px 5px 10px; - border: 1px solid #ededed; - background-color: #f8f8f8; -} -.inherited-list, section[class$="-details"] .detail { - padding:0 0 5px 8px; - background-color:#ffffff; - border:none; -} -.vertical-separator { - padding: 0 5px; -} -ul.help-section-list { - margin: 0; -} -ul.help-subtoc > li { - display: inline-block; - padding-right: 5px; - font-size: smaller; -} -ul.help-subtoc > li::before { - content: "\2022" ; - padding-right:2px; -} -span.help-note { - font-style: italic; -} -/* - * Indicator icon for external links. - */ -main a[href*="://"]::after { - content:""; - display:inline-block; - background-image:url('data:image/svg+xml; utf8, \ - \ - \ - '); - background-size:100% 100%; - width:7px; - height:7px; - margin-left:2px; - margin-bottom:4px; -} -main a[href*="://"]:hover::after, -main a[href*="://"]:focus::after { - background-image:url('data:image/svg+xml; utf8, \ - \ - \ - '); -} - -/* - * Styles for user-provided tables. - * - * borderless: - * No borders, vertical margins, styled caption. - * This style is provided for use with existing doc comments. - * In general, borderless tables should not be used for layout purposes. - * - * plain: - * Plain borders around table and cells, vertical margins, styled caption. - * Best for small tables or for complex tables for tables with cells that span - * rows and columns, when the "striped" style does not work well. - * - * striped: - * Borders around the table and vertical borders between cells, striped rows, - * vertical margins, styled caption. - * Best for tables that have a header row, and a body containing a series of simple rows. - */ - -table.borderless, -table.plain, -table.striped { - margin-top: 10px; - margin-bottom: 10px; -} -table.borderless > caption, -table.plain > caption, -table.striped > caption { - font-weight: bold; - font-size: smaller; -} -table.borderless th, table.borderless td, -table.plain th, table.plain td, -table.striped th, table.striped td { - padding: 2px 5px; -} -table.borderless, -table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, -table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { - border: none; -} -table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { - background-color: transparent; -} -table.plain { - border-collapse: collapse; - border: 1px solid black; -} -table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { - background-color: transparent; -} -table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, -table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { - border: 1px solid black; -} -table.striped { - border-collapse: collapse; - border: 1px solid black; -} -table.striped > thead { - background-color: #E3E3E3; -} -table.striped > thead > tr > th, table.striped > thead > tr > td { - border: 1px solid black; -} -table.striped > tbody > tr:nth-child(even) { - background-color: #EEE -} -table.striped > tbody > tr:nth-child(odd) { - background-color: #FFF -} -table.striped > tbody > tr > th, table.striped > tbody > tr > td { - border-left: 1px solid black; - border-right: 1px solid black; -} -table.striped > tbody > tr > th { - font-weight: normal; -} -/** - * Tweak font sizes and paddings for small screens. - */ -@media screen and (max-width: 1050px) { - #search-input { - width: 300px; - } -} -@media screen and (max-width: 800px) { - #search-input { - width: 200px; - } - .top-nav, - .bottom-nav { - font-size: 11px; - padding-top: 6px; - } - .sub-nav { - font-size: 11px; - } - .about-language { - padding-right: 16px; - } - ul.nav-list li, - .sub-nav .nav-list-search { - padding: 6px; - } - ul.sub-nav-list li { - padding-top: 5px; - } - main { - padding: 10px; - } - .summary section[class$="-summary"], .details section[class$="-details"], - .class-uses .detail, .serialized-class-details { - padding: 0 8px 5px 8px; - } - body { - -webkit-text-size-adjust: none; - } -} -@media screen and (max-width: 500px) { - #search-input { - width: 150px; - } - .top-nav, - .bottom-nav { - font-size: 10px; - } - .sub-nav { - font-size: 10px; - } - .about-language { - font-size: 10px; - padding-right: 12px; - } -} +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; + background-color: #FFFFFF; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/libgui/type-search-index.js b/libgui/type-search-index.js index 10ba602..63ed217 100644 --- a/libgui/type-search-index.js +++ b/libgui/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Axis"},{"p":"io.github.cottonmc.cotton.gui.client","l":"BackgroundPainter"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableProperty.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"SimpleKeyedFocusModel.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel.Tab.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableView.ChangeListener"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItemSlot.ChangeListener"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonClientScreen"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonHud"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonInventoryScreen"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WAbstractSlider.Direction"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBar.Direction"},{"p":"io.github.cottonmc.cotton.gui","l":"EmptyInventory"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"Focus"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"FocusModel"},{"p":"io.github.cottonmc.cotton.gui.client","l":"Scissors.Frame"},{"p":"io.github.cottonmc.cotton.gui","l":"GuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"HorizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.HSL"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"Icon"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"InputResult"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Insets"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"ItemIcon"},{"p":"io.github.cottonmc.cotton.gui","l":"ItemSyncedGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabeledSlider.LabelUpdater"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.LCH"},{"p":"io.github.cottonmc.cotton.gui.client","l":"LibGui"},{"p":"io.github.cottonmc.cotton.gui.client","l":"LightweightGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"ScreenNetworking.MessageReceiver"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"NetworkSide"},{"p":"io.github.cottonmc.cotton.gui.client","l":"NinePatchBackgroundPainter"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableProperty"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableView"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonHud.Positioner"},{"p":"io.github.cottonmc.cotton.gui","l":"PropertyDelegateHolder"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Rect2i"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.RGB"},{"p":"io.github.cottonmc.cotton.gui.client","l":"Scissors"},{"p":"io.github.cottonmc.cotton.gui.client","l":"ScreenDrawing"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"ScreenNetworking"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"SimpleKeyedFocusModel"},{"p":"io.github.cottonmc.cotton.gui","l":"SyncedGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel.Tab"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Texture"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"TextureIcon"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"TooltipBuilder"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WAbstractSlider"},{"p":"io.github.cottonmc.cotton.gui","l":"ValidatedSlot"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBar"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBox"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WButton"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WCardPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WClippedPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WDynamicLabel"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Vec2i"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"VerticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WGridPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItem"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItemSlot"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabeledSlider"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WListPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPanelWithInsets"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPlainPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPlayerInvPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WScrollPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WSlider"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WSprite"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WText"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTextField"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTiledSprite"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WToggleButton"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WWidget"}];updateSearchResults(); \ No newline at end of file +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Axis"},{"p":"io.github.cottonmc.cotton.gui.client","l":"BackgroundPainter"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableProperty.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"SimpleKeyedFocusModel.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel.Tab.Builder"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableView.ChangeListener"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItemSlot.ChangeListener"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonClientScreen"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonHud"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonInventoryScreen"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WAbstractSlider.Direction"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBar.Direction"},{"p":"io.github.cottonmc.cotton.gui","l":"EmptyInventory"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"Focus"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"FocusModel"},{"p":"io.github.cottonmc.cotton.gui.client","l":"Scissors.Frame"},{"p":"io.github.cottonmc.cotton.gui","l":"GuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"HorizontalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.HSL"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"Icon"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"InputResult"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Insets"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"ItemIcon"},{"p":"io.github.cottonmc.cotton.gui","l":"ItemSyncedGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabeledSlider.LabelUpdater"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.LCH"},{"p":"io.github.cottonmc.cotton.gui.client","l":"LibGui"},{"p":"io.github.cottonmc.cotton.gui.client","l":"LightweightGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"ScreenNetworking.MessageReceiver"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"NetworkSide"},{"p":"io.github.cottonmc.cotton.gui.client","l":"NinePatchBackgroundPainter"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableProperty"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"ObservableView"},{"p":"io.github.cottonmc.cotton.gui.client","l":"CottonHud.Positioner"},{"p":"io.github.cottonmc.cotton.gui","l":"PropertyDelegateHolder"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Rect2i"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Color.RGB"},{"p":"io.github.cottonmc.cotton.gui.client","l":"Scissors"},{"p":"io.github.cottonmc.cotton.gui.client","l":"ScreenDrawing"},{"p":"io.github.cottonmc.cotton.gui.networking","l":"ScreenNetworking"},{"p":"io.github.cottonmc.cotton.gui.widget.focus","l":"SimpleKeyedFocusModel"},{"p":"io.github.cottonmc.cotton.gui","l":"SyncedGuiDescription"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel.Tab"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Texture"},{"p":"io.github.cottonmc.cotton.gui.widget.icon","l":"TextureIcon"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"TooltipBuilder"},{"p":"io.github.cottonmc.cotton.gui","l":"ValidatedSlot"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"Vec2i"},{"p":"io.github.cottonmc.cotton.gui.widget.data","l":"VerticalAlignment"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WAbstractSlider"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBar"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WBox"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WButton"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WCardPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WClippedPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WDynamicLabel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WGridPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItem"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WItemSlot"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WLabeledSlider"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WListPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPanelWithInsets"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPlainPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WPlayerInvPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WScrollBar"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WScrollPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WSlider"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WSprite"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTabPanel"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WText"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTextField"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WTiledSprite"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WToggleButton"},{"p":"io.github.cottonmc.cotton.gui.widget","l":"WWidget"}];updateSearchResults(); \ No newline at end of file