Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serious building issues due to merging without passing CI 😅 #238

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
200ef6d
Update CMakeLists.txt
k0T0z Aug 13, 2024
d845773
Update and rename keybindingpreferences.cpp to KeyBindingPreferences.cpp
k0T0z Aug 13, 2024
c6cf99b
Update and rename keybindingpreferences.h to KeyBindingPreferences.h
k0T0z Aug 13, 2024
b40da6f
Update CMakeLists.txt
k0T0z Aug 13, 2024
266f820
Fix RoomEditor.cpp
k0T0z Aug 13, 2024
9cc6a5c
Fix RoomEditor.h
k0T0z Aug 13, 2024
79e6637
Update PreferencesDialog.cpp
k0T0z Aug 13, 2024
87bd824
moved the modern way of including protobuf
k0T0z Aug 16, 2024
44bdcb5
fix the server plugin sources are added twice
k0T0z Aug 16, 2024
dca1efa
added commented code for people who will build grpc from scratch and …
k0T0z Aug 17, 2024
eff3918
fix search paths
k0T0z Aug 19, 2024
a8989ee
Add Robert changes to Editors/RoomEditor.cpp
k0T0z Aug 19, 2024
016a05f
fix entitiesListView not exist
k0T0z Aug 19, 2024
3ef991e
add the ability to move the built libraries to ENIGMA root submodule
k0T0z Aug 22, 2024
fc9a84a
fix the debug postfix character with the copying custom command
k0T0z Aug 22, 2024
ebc4031
fix the debug postfix character with the copying custom command
k0T0z Aug 22, 2024
dac3f6f
few improvements
k0T0z Aug 23, 2024
b8796cc
add nodeeditor submodule and linking algorithms
k0T0z Aug 23, 2024
b01c765
Full fix and improve for CMake build system
k0T0z Aug 23, 2024
5ec507b
fixed emake server error and multiple improvements
k0T0z Aug 24, 2024
df42346
Move files to a new dir as requested by Josh
k0T0z Aug 25, 2024
30858d8
delete old files
k0T0z Aug 25, 2024
4fd4a90
Removed nodeeditor package
k0T0z Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Dialogs")
set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/" "${CMAKE_CURRENT_SOURCE_DIR}/Dialogs" "${CMAKE_CURRENT_SOURCE_DIR}/Editors")

# Include ENIGMA things
set(ENIGMA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Submodules/enigma-dev)
Expand Down Expand Up @@ -87,6 +87,7 @@ set(RGM_SOURCES
Dialogs/EventArgumentsDialog.cpp
Dialogs/TimelineChangeMoment.cpp
Dialogs/PreferencesDialog.cpp
Dialogs/KeyBindingPreferences.cpp
Utils/ProtoManip.cpp
Utils/FieldPath.cpp
MainWindow.cpp
Expand Down Expand Up @@ -146,6 +147,7 @@ set(RGM_HEADERS
Dialogs/PreferencesDialog.h
Dialogs/PreferencesKeys.h
Dialogs/TimelineChangeMoment.h
Dialogs/KeyBindingPreferences.h
Utils/SafeCasts.h
Utils/ProtoManip.h
Utils/FieldPath.h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "KeybindingPreferences.h"
#include "KeyBindingPreferences.h"

#include "ui_MainWindow.h"
#include "ui_SpriteEditor.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Dialogs/PreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "ui_PreferencesDialog.h"

#include "PreferencesKeys.h"
#include "KeybindingPreferences.h"
#include "KeyBindingPreferences.h"
#include "main.h"
#include "Components/Logger.h"

Expand Down
70 changes: 37 additions & 33 deletions Editors/RoomEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ RoomEditor::RoomEditor(MessageModel* model, QWidget* parent) : BaseEditor(model,
_ui->objectSelectButton->setMenu(objMenu);
_ui->objectSelectButton->setPopupMode(QToolButton::MenuButtonPopup);

auto objects = treeProxy
->match(treeProxy->index(0, 0), TreeModel::UserRoles::TypeCaseRole,
TypeCase::kObject, 1, Qt::MatchRecursive);
if (!objects.empty()) {
QModelIndex firstObjIdx = objects.first();
QString firstObj = firstObjIdx.data(Qt::DisplayRole).toString();
_ui->objectSelectButton->setIcon(firstObjIdx.data(Qt::DecorationRole).value<QIcon>());
_ui->currentObject->setText(firstObj);
}
// auto objects = treeProxy
// ->match(treeProxy->index(0, 0), TreeModel::UserRoles::TypeCaseRole,
// TypeCase::kObject, 1, Qt::MatchRecursive);
// if (!objects.empty()) {
// QModelIndex firstObjIdx = objects.first();
// QString firstObj = firstObjIdx.data(Qt::DisplayRole).toString();
// _ui->objectSelectButton->setIcon(firstObjIdx.data(Qt::DecorationRole).value<QIcon>());
// _ui->currentObject->setText(firstObj);
// }

connect(objMenu, &QMenuView::triggered, [=](const QModelIndex &index) {
_ui->currentObject->setText(treeProxy->data(index, Qt::DisplayRole).toString());
Expand All @@ -116,9 +116,9 @@ RoomEditor::RoomEditor(MessageModel* model, QWidget* parent) : BaseEditor(model,

// This updates all the model views in the event of a sprite is changed
connect(MainWindow::resourceMap, &ResourceModelMap::DataChanged, this, [this]() {
_ui->instancesListView->reset();
_ui->tilesListView->reset();
_ui->layersPropertiesView->reset();
// _ui->instancesListView->reset();
k0T0z marked this conversation as resolved.
Show resolved Hide resolved
_ui->layersListView->reset();
_ui->propertiesView->reset();
});

RoomEditor::RebindSubModels();
Expand All @@ -133,35 +133,35 @@ void RoomEditor::RebindSubModels() {
RepeatedMessageModel* im = _roomModel->GetSubModel<RepeatedMessageModel*>(Room::kInstancesFieldNumber);
RepeatedSortFilterProxyModel* imp = new RepeatedSortFilterProxyModel(this);
imp->SetSourceModel(im);
_ui->instancesListView->setModel(imp);
// _ui->instancesListView->setModel(imp);

for (int c = 0; c < im->columnCount(); ++c) {
if (c != im->FieldToColumn(Room::Instance::kNameFieldNumber) &&
c != im->FieldToColumn(Room::Instance::kObjectTypeFieldNumber) &&
c != im->FieldToColumn(Room::Instance::kIdFieldNumber))
_ui->instancesListView->hideColumn(c);
else
_ui->instancesListView->resizeColumnToContents(c);
}
// for (int c = 0; c < im->columnCount(); ++c) {
// if (c != im->FieldToColumn(Room::Instance::kNameFieldNumber) &&
// c != im->FieldToColumn(Room::Instance::kObjectTypeFieldNumber) &&
// c != im->FieldToColumn(Room::Instance::kIdFieldNumber))
// _ui->instancesListView->hideColumn(c);
// else
// _ui->instancesListView->resizeColumnToContents(c);
// }

_ui->instancesListView->header()->swapSections(im->FieldToColumn(Room::Instance::kNameFieldNumber),
im->FieldToColumn(Room::Instance::kObjectTypeFieldNumber));
// _ui->instancesListView->header()->swapSections(im->FieldToColumn(Room::Instance::kNameFieldNumber),
// im->FieldToColumn(Room::Instance::kObjectTypeFieldNumber));

RepeatedMessageModel* tm = _roomModel->GetSubModel<RepeatedMessageModel*>(Room::kTilesFieldNumber);
RepeatedSortFilterProxyModel* tmp = new RepeatedSortFilterProxyModel(this);
tmp->SetSourceModel(tm);
_ui->tilesListView->setModel(tmp);
_ui->layersListView->setModel(tmp);

for (int c = 0; c < tm->columnCount(); ++c) {
if (c != tm->FieldToColumn(Room::Tile::kBackgroundNameFieldNumber) &&
c != tm->FieldToColumn(Room::Tile::kIdFieldNumber) && c != tm->FieldToColumn(Room::Tile::kDepthFieldNumber) &&
c != tm->FieldToColumn(Room::Tile::kNameFieldNumber))
_ui->tilesListView->hideColumn(c);
_ui->layersListView->hideColumn(c);
else
_ui->tilesListView->resizeColumnToContents(c);
_ui->layersListView->resizeColumnToContents(c);
}

_ui->tilesListView->header()->swapSections(tm->FieldToColumn(Room::Tile::kNameFieldNumber),
_ui->layersListView->header()->swapSections(tm->FieldToColumn(Room::Tile::kNameFieldNumber),
tm->FieldToColumn(Room::Tile::kBackgroundNameFieldNumber));

RepeatedMessageModel* vm = _roomModel->GetSubModel<RepeatedMessageModel*>(Room::kViewsFieldNumber);
Expand All @@ -170,19 +170,19 @@ void RoomEditor::RebindSubModels() {
connect(_ui->elementsListView->selectionModel(), &QItemSelectionModel::selectionChanged,
[=](const QItemSelection& selected, const QItemSelection& /*deselected*/) {
if (selected.empty()) return;
_ui->tilesListView->clearSelection();
_ui->layersListView->clearSelection();
auto selectedIndex = selected.indexes().first();
auto currentInstanceModel = imp->GetSubModel(selectedIndex.row());
_ui->layersPropertiesView->setModel(currentInstanceModel);
_ui->propertiesView->setModel(currentInstanceModel);
});

connect(_ui->tilesListView->selectionModel(), &QItemSelectionModel::selectionChanged,
connect(_ui->layersListView->selectionModel(), &QItemSelectionModel::selectionChanged,
[=](const QItemSelection& selected, const QItemSelection& /*deselected*/) {
if (selected.empty()) return;
_ui->instancesListView->clearSelection();
// _ui->instancesListView->clearSelection();
auto selectedIndex = selected.indexes().first();
auto currentInstanceModel = tmp->GetSubModel(selectedIndex.row());
_ui->layersPropertiesView->setModel(currentInstanceModel);
_ui->propertiesView->setModel(currentInstanceModel);
});

BaseEditor::RebindSubModels();
Expand All @@ -201,7 +201,7 @@ void RoomEditor::MousePressed(Qt::MouseButton button) {
if (button == Qt::MouseButton::LeftButton) {
auto index = layerElements->rowCount();
layerElements->insertRow(index);
layerElements->SetData(_ui->currentObject->text(), index, Room::Instance::kObjectTypeFieldNumber);
// layerElements->SetData(_ui->currentObject->text(), index, Room::Instance::kObjectTypeFieldNumber);
}
}

Expand All @@ -218,3 +218,7 @@ void RoomEditor::on_actionZoom_triggered() { _ui->roomPreviewBackground->ResetZo
void RoomEditor::on_actionShowHideGrid_triggered() {
_ui->roomPreviewBackground->SetGridVisible(_ui->actionShowHideGrid->isChecked());
}

void RoomEditor::updateCursorPositionLabel(const QPoint& pos) {

}
6 changes: 6 additions & 0 deletions Editors/RoomEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class RoomEditor : public BaseEditor {

void setZoom(qreal zoom);

void MouseMoved(int x, int y);

void MousePressed(Qt::MouseButton button);

void MouseReleased(Qt::MouseButton button);

public slots:
void RebindSubModels() override;

Expand Down
Loading