public class HUDPanel extends DraggableContainer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HUDPanel.HUDRenderer
Proxy for a
Renderer, doesn't display container, when GUI is off. |
| Modifier and Type | Field and Description |
|---|---|
protected FixedComponent |
component
The HUD component.
|
protected Toggleable |
guiOpen
Whether GUI is open.
|
attachPoint, bodyDrag, dragging, position, widthchildHeight, container, containerHeight, open, scroll, scrollPosition, toggledescription, renderer, title| Constructor and Description |
|---|
HUDPanel(FixedComponent component,
Renderer renderer,
Toggleable open,
Animation animation,
Toggleable guiOpen,
int minBorder)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Rectangle |
getClipRect(Context context,
int height)
Disable clipping, if container fully open.
|
java.awt.Point |
getPosition(Interface inter)
Gets position from child component.
|
int |
getWidth(Interface inter)
Get the child component width.
|
void |
handleButton(Context context,
int button)
Mask out input, if GUI is turned off.
|
void |
handleScroll(Context context,
int diff)
Mask out input, if GUI is turned off.
|
void |
loadConfig(Interface inter,
PanelConfig config)
Loads the component state
|
void |
saveConfig(Interface inter,
PanelConfig config)
Saves the component state
|
void |
setPosition(Interface inter,
java.awt.Point position)
Sets position of child component.
|
handleFocusaddComponent, enter, exit, getContainerOffset, getHeight, getRenderHeight, getScrollHeight, getSubContext, handleKey, isActive, isOn, render, togglegetTitle, hasFocus, releaseFocus, updateFocusprotected Toggleable guiOpen
protected FixedComponent component
public HUDPanel(FixedComponent component, Renderer renderer, Toggleable open, Animation animation, Toggleable guiOpen, int minBorder)
component - the componentrenderer - the renderer for this containeropen - toggleable indicating whether the container is open or closedanimation - the animation for opening and closing this containerguiOpen - whether to accept input and render container itself or notminBorder - the minimum border for the containerpublic void handleButton(Context context, int button)
handleButton in interface ComponenthandleButton in class DraggableContainercontext - the Context for the componentbutton - the button that changed its stateInterface.LBUTTON,
Interface.RBUTTONpublic void handleScroll(Context context, int diff)
handleScroll in interface ComponenthandleScroll in class CollapsibleContainercontext - the Context for the componentdiff - the amount by which the wheel was movedpublic java.awt.Point getPosition(Interface inter)
getPosition in interface FixedComponentgetPosition in class DraggableContainerinter - current interfacepublic void setPosition(Interface inter, java.awt.Point position)
setPosition in interface FixedComponentsetPosition in class DraggableContainerinter - current interfaceposition - new positionpublic int getWidth(Interface inter)
getWidth in interface FixedComponentgetWidth in class DraggableContainerinter - current interfaceprotected java.awt.Rectangle getClipRect(Context context, int height)
getClipRect in class CollapsibleContainercontext - the context for this componentheight - the height of the containerpublic void saveConfig(Interface inter, PanelConfig config)
FixedComponentsaveConfig in interface FixedComponentsaveConfig in class DraggableContainerinter - current interfaceconfig - configuration to usepublic void loadConfig(Interface inter, PanelConfig config)
FixedComponentloadConfig in interface FixedComponentloadConfig in class DraggableContainerinter - current interfaceconfig - configuration to use