adspartan: mapview: add keybind for the "Set Area ID" option and limit it to the area tool

This commit is contained in:
T1ti
2024-08-31 07:30:10 +02:00
parent 9d8d0a1a4a
commit e6d1ac3259
2 changed files with 4 additions and 2 deletions

View File

@@ -1353,11 +1353,12 @@ void MapView::setupAssistMenu()
assist_menu->addSeparator();
assist_menu->addAction(createTextSeparator("Current ADT"));
assist_menu->addSeparator();
ADD_ACTION_NS ( assist_menu
ADD_ACTION ( assist_menu
, "Set Area ID"
, "F"
, [this]
{
if (_selected_area_id != -1)
if (terrainMode == editing_mode::areaid && _selected_area_id != -1)
{
NOGGIT_ACTION_MGR->beginAction(this, Noggit::ActionFlags::eCHUNKS_AREAID);
_world->setAreaID(_camera.position, _selected_area_id, true);

View File

@@ -137,6 +137,7 @@ namespace Noggit
generate_hotkey_row({FontNoggit::ctrl, FontNoggit::lmb }, "\a+\aPick existing AreaID", flag_layout);
generate_hotkey_row({FontNoggit::shift, FontNoggit::lmb }, "\a+\aPaint selected AreaID", flag_layout);
generate_hotkey_row({ FontNoggit::f }, "\a - Fill current ADT with selected AreaID", flag_layout);
auto ground_widget (new QWidget (this));