Enum Class InsideRegion
- All Implemented Interfaces:
Serializable, Comparable<InsideRegion>, Constable
This names the vocabulary, not the reference. The reference is
decided by the call site: a HUD panel is placed against the game window, and so
is a standalone screen's chrome. One enum serves both. (Before 5.0.0 this was
two identical enums, HudRegion and ScreenRegion.)
Every host resolves these spots
through RegionMath.resolveInside(InsideRegion, int, int, int, int, int, RegionMath.Insets); what differs per context is only its
RegionMath.Insets: the HUD sits RegionConstants.EDGE_INSET in and
drops CENTER below the crosshair by
RegionConstants.CENTER_CROSSHAIR_CLEARANCE, a vanilla screen uses the same
inset without the crosshair, and a standalone screen's chrome sits
RegionConstants.SCREEN_EDGE_MARGIN in and never hides for overflow.
Stacking order among siblings on one spot is the panel's
PanelPosition.priority(int).
Its counterpart is OutsideRegion, the thirteen placements
outside a rectangle. The two are shaped differently and do not merge.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCentered horizontally and vertically. -
Method Summary
Modifier and TypeMethodDescriptionstatic InsideRegionReturns the enum constant of this class with the specified name.static InsideRegion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
-
TOP_CENTER
-
TOP_RIGHT
-
LEFT_CENTER
-
CENTER
Centered horizontally and vertically. Flows down (injection path). -
RIGHT_CENTER
-
BOTTOM_LEFT
-
BOTTOM_CENTER
-
BOTTOM_RIGHT
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-