MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LTable_RowClick

Function LTable_RowClick

src/LWidgets.c:587–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587void LTable_RowClick(struct LTable* w, int row) {
588 cc_uint64 now;
589 LTable_SetSelectedTo(w, row);
590 now = Stopwatch_Measure();
591
592 /* double click on row to join */
593 if (Stopwatch_ElapsedMS(w->_lastClick, now) < 1000 && row == w->_lastRow) {
594 Launcher_ConnectToServer(&LTable_Get(row)->hash);
595 }
596
597 w->_lastRow = LTable_GetSelectedIndex(w);
598 w->_lastClick = now;
599}
600
601cc_bool LTable_HandlesKey(int key, struct InputDevice* device) {
602 return key == device->upButton || key == device->pageUpButton ||

Callers 1

LTable_RowsClickFunction · 0.85

Calls 5

LTable_SetSelectedToFunction · 0.85
Stopwatch_ElapsedMSFunction · 0.85
Launcher_ConnectToServerFunction · 0.85
LTable_GetSelectedIndexFunction · 0.85
Stopwatch_MeasureFunction · 0.70

Tested by

no test coverage detected