(svn r13114) -Codechange: use InvalidateData instead of direct window access to modify the state of the statusbar from outside the statusbar.

This commit is contained in:
rubidium
2008-05-16 07:08:04 +00:00
parent 7c7a4de3e5
commit 7491b792e2
8 changed files with 55 additions and 17 deletions

View File

@@ -30,6 +30,7 @@
#include "core/endian_func.hpp"
#include "vehicle_base.h"
#include "autoreplace_base.h"
#include "statusbar_gui.h"
#include <list>
#include "table/strings.h"
@@ -1493,7 +1494,7 @@ static void SaveFileStart()
_fast_forward = 0;
if (_cursor.sprite == SPR_CURSOR_MOUSE) SetMouseCursor(SPR_CURSOR_ZZZ, PAL_NONE);
InvalidateWindowData(WC_STATUS_BAR, 0, true);
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SAVELOAD_START);
_ts.saveinprogress = true;
}
@@ -1504,7 +1505,7 @@ static void SaveFileDone()
_fast_forward = _ts.ff_state;
if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
InvalidateWindowData(WC_STATUS_BAR, 0, false);
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SAVELOAD_FINISH);
_ts.saveinprogress = false;
}