five-on-it / apps/client/src/gui/panel / PanelPointing
Class: PanelPointing
Defined in: apps/client/src/gui/panel.ts:99
The pointer over the panels, as game-ui.ts hands it every pointer event of the scene: the topmost panel covering the point answers it (the last made is drawn on top, as the GUI's own picking took the topmost), the others hear it as one elsewhere (a press there gives their field's keys back, and their lit button goes dark); the cursor is the one the answering panel wants. When a panel is rebuilt, moved or hidden under a still pointer, what lies under it is looked at again (changed), so the lit button and the cursor follow.
Constructors
Constructor
new PanelPointing(
panels,setCursor):PanelPointing
Defined in: apps/client/src/gui/panel.ts:105
Parameters
panels
readonly GuiPanel[]
setCursor
(cursor) => void
Returns
PanelPointing
Methods
changed()
changed():
void
Defined in: apps/client/src/gui/panel.ts:128
A panel changed under the pointer: what lies under it is looked at again.
Returns
void
point()
point(
event):void
Defined in: apps/client/src/gui/panel.ts:111
A pointer event, answered by the topmost panel covering its point.
Parameters
event
Returns
void