1
0
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:
Michael Bernardi
2023-07-10 22:06:27 +02:00
parent 774bfe8e62
commit d2b6419055
3 changed files with 16 additions and 0 deletions

View File

@@ -529,6 +529,12 @@ public:
break;
}
case INTENT_ACTION_TILE_MODIFY:
{
WindowInvalidateByClass(WindowClass::TileInspector);
break;
}
default:
break;
}

View File

@@ -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;
}

View File

@@ -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,
};