MCPcopy Create free account
hub / github.com/dborth/fceugx / GetSelected

Method GetSelected

source/gui/gui_window.cpp:247–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247int GuiWindow::GetSelected()
248{
249 // find selected element
250 int found = -1;
251 u32 elemSize = _elements.size();
252 for (u32 i = 0; i < elemSize; ++i)
253 {
254 if(_elements.at(i)->GetState() == STATE_SELECTED)
255 {
256 found = int(i);
257 break;
258 }
259 }
260 return found;
261}
262
263// set element to left/right as selected
264// there's probably a more clever way to do this, but this way works

Callers 2

MoveSelectionHorMethod · 0.95
MoveSelectionVertMethod · 0.95

Calls 2

GetStateMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected