MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Widget_SetCurrentWidget

Function Widget_SetCurrentWidget

src/gui/widget.c:953–966  ·  view source on GitHub ↗

* Select a widget as current widget. * @param index %Widget number to select. * @return Index of the previous selected widget. */

Source from the content-addressed store, hash-verified

951 * @return Index of the previous selected widget.
952 */
953uint16 Widget_SetCurrentWidget(uint16 index)
954{
955 uint16 oldIndex = g_curWidgetIndex;
956 g_curWidgetIndex = index;
957
958 g_curWidgetXBase = g_widgetProperties[index].xBase;
959 g_curWidgetYBase = g_widgetProperties[index].yBase;
960 g_curWidgetWidth = g_widgetProperties[index].width;
961 g_curWidgetHeight = g_widgetProperties[index].height;
962 g_curWidgetFGColourBlink = g_widgetProperties[index].fgColourBlink;
963 g_curWidgetFGColourNormal = g_widgetProperties[index].fgColourNormal;
964
965 return oldIndex;
966}
967
968/**
969 * Select a widget as current widget and draw its exterior.

Callers 15

GameCredits_PlayFunction · 0.85
GameLoop_GameCreditsFunction · 0.85
GameLoop_MainFunction · 0.85
OpenDune_InitFunction · 0.85
GUI_DisplayTextFunction · 0.85
GUI_Widget_SetPropertiesFunction · 0.85
GUI_DisplayModalMessageFunction · 0.85
GUI_DrawCreditsFunction · 0.85
GUI_ChangeSelectionTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected