MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetCurrentIndex

Function SetCurrentIndex

editor/ObjectDialog.cpp:351–371  ·  view source on GitHub ↗

Sets the current index of the given type

Source from the content-addressed store, hash-verified

349
350// Sets the current index of the given type
351void SetCurrentIndex(int index) {
352 switch (D3EditState.current_obj_type) {
353 case OBJ_ROBOT:
354 D3EditState.current_robot = index;
355 break;
356 case OBJ_POWERUP:
357 D3EditState.current_powerup = index;
358 break;
359 case OBJ_CLUTTER:
360 D3EditState.current_clutter = index;
361 break;
362 case OBJ_BUILDING:
363 D3EditState.current_building = index;
364 break;
365 case OBJ_PLAYER:
366 current_player = index;
367 break;
368 default:
369 Int3();
370 }
371}
372
373// Returns the current index of the given type
374int GetCurrentIndex() {

Callers 12

FindNextMethod · 0.85
ReplaceSelectedMethod · 0.85
ReplaceAllMethod · 0.85
GetCurrentIndexFunction · 0.85
InitObjIDComboBoxMethod · 0.85
OnSelchangeComboObjIDMethod · 0.85
FindNextMethod · 0.85
ReplaceSelectedMethod · 0.85
ReplaceAllMethod · 0.85
SetCurrentItemMethod · 0.85
OnDrawMethod · 0.85
OnKeyDownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected