mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 07:13:07 +01:00
Add intents to the TileManager UI
This commit is contained in:
@@ -529,6 +529,12 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case INTENT_ACTION_TILE_MODIFY:
|
||||
{
|
||||
WindowInvalidateByClass(WindowClass::TileInspector);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "TileModifyAction.h"
|
||||
|
||||
#include "../Context.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/TileInspector.h"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
@@ -236,5 +238,12 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const
|
||||
res.Position.y = _loc.y;
|
||||
res.Position.z = TileElementHeight(_loc);
|
||||
|
||||
if (isExecuting)
|
||||
{
|
||||
auto intent = Intent(INTENT_ACTION_TILE_MODIFY);
|
||||
// TODO: add location data to intent.
|
||||
ContextBroadcastIntent(&intent);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ enum IntentAction
|
||||
INTENT_ACTION_TRACK_DESIGN_RESTORE_PROVISIONAL,
|
||||
INTENT_ACTION_SET_MAP_TOOLTIP,
|
||||
INTENT_ACTION_NEW_SCENERY,
|
||||
INTENT_ACTION_TILE_MODIFY,
|
||||
|
||||
INTENT_ACTION_NULL = 255,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user