| 919 | } |
| 920 | |
| 921 | static 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. |
no test coverage detected