new add map button shortcut
This commit is contained in:
@@ -236,7 +236,7 @@ void WorldRender::draw (glm::mat4x4 const& model_view
|
||||
_cull_distance= draw_fog ? _skies->fog_distance_end() : _view_distance;
|
||||
|
||||
// Draw verylowres heightmap
|
||||
if (draw_fog && draw_terrain)
|
||||
if (!_world->mapIndex.hasAGlobalWMO() && draw_fog && draw_terrain)
|
||||
{
|
||||
ZoneScopedN("World::draw() : Draw horizon");
|
||||
_horizon_render->draw (model_view, projection, &_world->mapIndex, _skies->color_set[FOG_COLOR], _cull_distance, frustum, camera_pos, display);
|
||||
|
||||
@@ -37,9 +37,13 @@ MapCreationWizard::MapCreationWizard(std::shared_ptr<Project::NoggitProject> pro
|
||||
auto layout = new QHBoxLayout(this);
|
||||
|
||||
// Left side
|
||||
auto layout_left = new QHBoxLayout(this);
|
||||
auto layout_left = new QVBoxLayout(this);
|
||||
layout->addLayout(layout_left);
|
||||
|
||||
auto info_label = new QLabel("Left Click on the grid to add Tiles, Ctrl+click to erase, Shift+Click to add 3x3.");
|
||||
info_label->setWindowIcon(Noggit::Ui::FontAwesomeIcon(Noggit::Ui::FontAwesome::info));
|
||||
layout_left->addWidget(info_label);
|
||||
|
||||
auto scroll_minimap = new QScrollArea(this);
|
||||
|
||||
_minimap_widget = new Noggit::Ui::minimap_widget(this);
|
||||
@@ -108,10 +112,6 @@ MapCreationWizard::MapCreationWizard(std::shared_ptr<Project::NoggitProject> pro
|
||||
|
||||
remove_btn->setAccessibleName("map_wizard_remove_button");
|
||||
|
||||
auto info_label = new QLabel("Left Click on the grid to add Tiles, Ctrl+click to erase, Shift+Click to add 3x3.");
|
||||
info_label->setWindowIcon(Noggit::Ui::FontAwesomeIcon(Noggit::Ui::FontAwesome::info));
|
||||
layout_right->addWidget(info_label);
|
||||
|
||||
_map_settings = new QGroupBox("Map settings", this);
|
||||
layout_right->addWidget(_map_settings);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Noggit
|
||||
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void destroyFakeWorld() { if(_world) delete _world; _world = nullptr; _minimap_widget->world (nullptr); };
|
||||
|
||||
void addNewMap();
|
||||
signals:
|
||||
void map_dbc_updated();
|
||||
|
||||
@@ -148,7 +148,6 @@ namespace Noggit
|
||||
void saveCurrentEntry();
|
||||
void discardChanges();
|
||||
|
||||
void addNewMap();
|
||||
void removeMap();
|
||||
|
||||
};
|
||||
|
||||
@@ -287,6 +287,10 @@ namespace Noggit::Ui::Windows
|
||||
QTabWidget* entry_points_tabs(new QTabWidget(widget));
|
||||
//entry_points_tabs->addTab(_continents_table, "Maps");
|
||||
|
||||
auto add_btn = new QPushButton("Add New Map", this);
|
||||
add_btn->setIcon(Noggit::Ui::FontAwesomeIcon(Noggit::Ui::FontAwesome::plus));
|
||||
add_btn->setAccessibleName("map_wizard_add_button");
|
||||
|
||||
/* set-up widget for seaching etc... through _continents_table */
|
||||
{
|
||||
QWidget* _first_tab = new QWidget(this);
|
||||
@@ -351,8 +355,9 @@ namespace Noggit::Ui::Windows
|
||||
_group_search->setLayout(_group_layout);
|
||||
|
||||
_first_tab_layout->addWidget(_group_search);
|
||||
_first_tab_layout->addSpacing(12);
|
||||
_first_tab_layout->addSpacing(5);
|
||||
_first_tab_layout->addWidget(_continents_table);
|
||||
_first_tab_layout->addWidget(add_btn);
|
||||
|
||||
entry_points_tabs->addTab(_first_tab, tr("Maps"));
|
||||
}
|
||||
@@ -415,14 +420,14 @@ namespace Noggit::Ui::Windows
|
||||
}
|
||||
);
|
||||
|
||||
auto right_side = new QTabWidget(this);
|
||||
_right_side = new QTabWidget(this);
|
||||
|
||||
auto minimap_holder = new QScrollArea(this);
|
||||
minimap_holder->setWidgetResizable(true);
|
||||
minimap_holder->setAlignment(Qt::AlignCenter);
|
||||
minimap_holder->setWidget(_minimap);
|
||||
|
||||
right_side->addTab(minimap_holder, "Enter map");
|
||||
_right_side->addTab(minimap_holder, "Enter map");
|
||||
minimap_holder->setAccessibleName("main_menu_minimap_holder");
|
||||
|
||||
_map_creation_wizard = new Noggit::Ui::Tools::MapCreationWizard::Ui::MapCreationWizard(_project, this);
|
||||
@@ -434,9 +439,16 @@ namespace Noggit::Ui::Windows
|
||||
}
|
||||
);
|
||||
|
||||
right_side->addTab(_map_creation_wizard, "Edit map");
|
||||
_right_side->addTab(_map_creation_wizard, "Edit map");
|
||||
|
||||
layout->addWidget(right_side);
|
||||
layout->addWidget(_right_side);
|
||||
|
||||
connect(add_btn, &QPushButton::clicked
|
||||
, [&]()
|
||||
{
|
||||
_right_side->setCurrentIndex(1);
|
||||
_map_creation_wizard->addNewMap();
|
||||
});
|
||||
|
||||
//setCentralWidget (_stack_widget);
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Noggit::Ui::Windows
|
||||
|
||||
QListWidget* _continents_table;
|
||||
QString _filter_name;
|
||||
QTabWidget* _right_side;
|
||||
|
||||
void applyFilterSearch(const QString& name, int type, int expansion, bool wmo_maps);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user