QcHotbarRadial Class
The radial menu of the hotbar on a pad (decision E-581): held open by a button, the hotbar's slots sit on a circle, the right stick points at one and letting go of the button selects it. More...
| Header: | #include <clientcore/input/QcHotbarRadial.h> |
Public Functions
| void | cancel() |
| std::optional<int> | close() |
| int | highlighted() const |
| bool | isOpen() const |
| void | open(int selectedSlot) |
| bool | point(float x, float y) |
Static Public Members
| const float | pointDeflection |
| std::optional<int> | slotAt(float x, float y, int) |
Detailed Description
Slot 0 is at the top and the others follow clockwise. It opens on the slot in the hand, so letting go without pointing keeps it. State only, without a session or a source.
Member Function Documentation
void QcHotbarRadial::cancel()
Closes without selecting (a screen opened, the pad stopped leading).
std::optional<int> QcHotbarRadial::close()
Closes and returns the slot to select (nullopt when it was closed already).
int QcHotbarRadial::highlighted() const
Returns the highlighted slot while open (-1 while closed).
bool QcHotbarRadial::isOpen() const
Returns whether the menu is open.
void QcHotbarRadial::open(int selectedSlot)
Opens the menu on selectedSlot, the slot in the hand.
bool QcHotbarRadial::point(float x, float y)
The stick points at (x, y), y positive down. Returns whether the highlighted slot changed.
[static] std::optional<int> QcHotbarRadial::slotAt(float x, float y, int)
Returns the slot the direction (x, y) points at among slots slots (slot 0 at the top, clockwise); nullopt inside pointDeflection.
Member Variable Documentation
const float QcHotbarRadial::pointDeflection
A stick pushed less far than this (raw) points at nothing: the last slot stays highlighted.