mirror of https://github.com/OpenRCT2/OpenRCT2.git
Move peep list refreshing to UI module
This commit is contained in:
parent
430bf482f2
commit
7aa2cd7ac5
|
@ -327,6 +327,16 @@ public:
|
|||
window_guest_list_refresh_list();
|
||||
break;
|
||||
|
||||
case INTENT_ACTION_REFRESH_STAFF_LIST:
|
||||
{
|
||||
auto w = window_find_by_class(WC_STAFF_LIST);
|
||||
if (w != NULL)
|
||||
{
|
||||
w->no_list_items = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD:
|
||||
window_tile_inspector_clear_clipboard();
|
||||
break;
|
||||
|
|
|
@ -21,8 +21,10 @@
|
|||
#include "GameAction.h"
|
||||
|
||||
#include "../Cheats.h"
|
||||
#include "../Context.h"
|
||||
#include "../interface/Window.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
|
||||
struct GuestSetNameAction : public GameActionBase<GAME_COMMAND_SET_GUEST_NAME, GameActionResult>
|
||||
|
@ -117,12 +119,8 @@ public:
|
|||
|
||||
gfx_invalidate_screen();
|
||||
|
||||
// Force guest list window refresh
|
||||
rct_window * w = window_find_by_class(WC_GUEST_LIST);
|
||||
if (w != NULL)
|
||||
{
|
||||
w->no_list_items = 0;
|
||||
}
|
||||
auto intent = Intent(INTENT_ACTION_REFRESH_GUEST_LIST);
|
||||
context_broadcast_intent(&intent);
|
||||
|
||||
auto res = std::make_unique<GameActionResult>();
|
||||
res->Position.x = peep->x;
|
||||
|
|
|
@ -21,9 +21,11 @@
|
|||
#include "GameAction.h"
|
||||
|
||||
#include "../Cheats.h"
|
||||
#include "../Context.h"
|
||||
#include "../peep/Staff.h"
|
||||
#include "../interface/Window.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
|
||||
struct StaffSetNameAction : public GameActionBase<GAME_COMMAND_SET_STAFF_NAME, GameActionResult>
|
||||
|
@ -117,12 +119,8 @@ public:
|
|||
|
||||
gfx_invalidate_screen();
|
||||
|
||||
// Force staff list window refresh
|
||||
rct_window * w = window_find_by_class(WC_STAFF_LIST);
|
||||
if (w != NULL)
|
||||
{
|
||||
w->no_list_items = 0;
|
||||
}
|
||||
auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST);
|
||||
context_broadcast_intent(&intent);
|
||||
|
||||
auto res = std::make_unique<GameActionResult>();
|
||||
res->Position.x = peep->x;
|
||||
|
|
|
@ -87,6 +87,7 @@ extern "C" {
|
|||
INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD,
|
||||
INTENT_ACTION_SET_TILE_INSPECTOR_PAGE,
|
||||
INTENT_ACTION_SET_TILE_INSPECTOR_BUTTONS,
|
||||
INTENT_ACTION_REFRESH_STAFF_LIST,
|
||||
};
|
||||
|
||||
Intent *intent_create(rct_windowclass clss);
|
||||
|
|
Loading…
Reference in New Issue