summaryrefslogtreecommitdiffstats
path: root/SidebarView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SidebarView.cpp')
-rw-r--r--SidebarView.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/SidebarView.cpp b/SidebarView.cpp
index 99eae25..1246126 100644
--- a/SidebarView.cpp
+++ b/SidebarView.cpp
@@ -1,29 +1,30 @@
#include "SidebarView.h"
#include "PlayerStart.h"
+#include "ToolSelector.h"
void SidebarView::spinButtonChanged(GtkWidget *spinbutton, SidebarView *view) {
- if(!view->editor->getSelectedObject())
+ if(!view->editManager->getSelectedObject())
return;
- if(view->editor->getSelectedObject()->isOfType("Room")) {
+ if(view->editManager->getSelectedObject()->isOfType("Room")) {
if(spinbutton == view->spinButtonHeight)
- ((Room*)view->editor->getSelectedObject())->setHeight(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
+ ((Room*)view->editManager->getSelectedObject())->setHeight(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
}
- else if(view->editor->getSelectedObject()->isOfType("PlayerStart")) {
+ else if(view->editManager->getSelectedObject()->isOfType("PlayerStart")) {
if(spinbutton == view->spinButtonX)
- ((PlayerStart*)view->editor->getSelectedObject())->setX(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
+ ((PlayerStart*)view->editManager->getSelectedObject())->setX(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
else if(spinbutton == view->spinButtonY)
- ((PlayerStart*)view->editor->getSelectedObject())->setY(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
+ ((PlayerStart*)view->editManager->getSelectedObject())->setY(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
else if(spinbutton == view->spinButtonZ)
- ((PlayerStart*)view->editor->getSelectedObject())->setZ(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
+ ((PlayerStart*)view->editManager->getSelectedObject())->setZ(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
}
- view->editor->redraw();
+ view->editManager->redraw();
}
-SidebarView::SidebarView(EditManager *editor) {
- this->editor = editor;
+SidebarView::SidebarView(EditManager *editManager) {
+ this->editManager = editManager;
sidebar = gtk_vbox_new(FALSE, 0);
g_object_ref_sink(G_OBJECT(sidebar));
@@ -154,9 +155,9 @@ void SidebarView::update() {
gtk_widget_hide(tableRoomData);
gtk_widget_hide(tablePlayerStart);
- if(editor->getSelectedObject()) {
- if(editor->getSelectedObject()->isOfType("Room")) {
- Room *room = (Room*)editor->getSelectedObject();
+ if(editManager->getSelectedObject()) {
+ if(editManager->getSelectedObject()->isOfType("Room")) {
+ Room *room = (Room*)editManager->getSelectedObject();
gtk_label_set_markup(GTK_LABEL(labelType), "<b>Room info:</b>");
@@ -177,8 +178,8 @@ void SidebarView::update() {
gtk_widget_show(tableRoomData);
}
- else if(editor->getSelectedObject()->isOfType("PlayerStart")) {
- PlayerStart *playerStart = (PlayerStart*)editor->getSelectedObject();
+ else if(editManager->getSelectedObject()->isOfType("PlayerStart")) {
+ PlayerStart *playerStart = (PlayerStart*)editManager->getSelectedObject();
gtk_label_set_markup(GTK_LABEL(labelType), "<b>Player start:</b>");