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

Function UpdateArrows

src/gui/widget_click.c:921–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921static void UpdateArrows(bool save, bool force)
922{
923 static uint16 previousIndex = 0;
924 Widget *w;
925
926 if (!force && s_savegameIndexBase == previousIndex) return;
927
928 previousIndex = s_savegameIndexBase;
929
930 w = &g_table_windowWidgets[8];
931 if (s_savegameIndexBase >= 5) {
932 GUI_Widget_MakeVisible(w);
933 } else {
934 GUI_Widget_MakeInvisible(w);
935 GUI_Widget_Undraw(w, 233);
936 }
937
938 w = &g_table_windowWidgets[7];
939 if (s_savegameCountOnDisk - (save ? 0 : 1) > s_savegameIndexBase) {
940 GUI_Widget_MakeVisible(w);
941 } else {
942 GUI_Widget_MakeInvisible(w);
943 GUI_Widget_Undraw(w, 233);
944 }
945}
946
947/**
948 * Handles Click event for "Save Game" or "Load Game" button.

Callers 1

Calls 3

GUI_Widget_MakeVisibleFunction · 0.85
GUI_Widget_MakeInvisibleFunction · 0.85
GUI_Widget_UndrawFunction · 0.85

Tested by

no test coverage detected