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