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

Function LTable_SetSelectedTo

src/LWidgets.c:577–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577void LTable_SetSelectedTo(struct LTable* w, int index) {
578 if (!w->rowsCount) return;
579 if (index >= w->rowsCount) index = w->rowsCount - 1;
580 if (index < 0) index = 0;
581
582 String_Copy(w->selectedHash, &LTable_Get(index)->hash);
583 LTable_ShowSelected(w);
584 w->OnSelectedChanged();
585}
586
587void LTable_RowClick(struct LTable* w, int row) {
588 cc_uint64 now;

Callers 2

LTable_RowClickFunction · 0.85
LTable_KeyDownFunction · 0.85

Calls 2

String_CopyFunction · 0.85
LTable_ShowSelectedFunction · 0.85

Tested by

no test coverage detected