src/gui_actions.cpp

changeset 219
70eb948a2b02
parent 212
79c5205b807c
child 224
805bf9ef9529
equal deleted inserted replaced
218:2a65ad4972a8 219:70eb948a2b02
20 #include <QMessageBox> 20 #include <QMessageBox>
21 #include <QTextEdit> 21 #include <QTextEdit>
22 #include <QBoxLayout> 22 #include <QBoxLayout>
23 #include <QDialogButtonBox> 23 #include <QDialogButtonBox>
24 #include <QPushButton> 24 #include <QPushButton>
25 #include <QInputDialog>
25 26
26 #include "gui.h" 27 #include "gui.h"
27 #include "file.h" 28 #include "file.h"
28 #include "history.h" 29 #include "history.h"
29 #include "configDialog.h" 30 #include "configDialog.h"
424 } 425 }
425 426
426 MAKE_ACTION (modeDraw, "Draw Mode", "mode-draw", "Draw objects into the camera view.", CTRL (2)) { 427 MAKE_ACTION (modeDraw, "Draw Mode", "mode-draw", "Draw objects into the camera view.", CTRL (2)) {
427 g_win->R ()->setEditMode (GL::Draw); 428 g_win->R ()->setEditMode (GL::Draw);
428 } 429 }
430
431 // =========================================================================================================================================
432 MAKE_ACTION (setDrawDepth, "Set Depth Value", "depth-value", "Set the depth coordinate of the current camera.", (0)) {
433 if (g_win->R ()->camera () == GL::Free)
434 return;
435
436 bool ok;
437 double depth = QInputDialog::getDouble (g_win, "Set Draw Depth",
438 fmt ("Depth value for %s Camera:", g_win->R ()->cameraName ()),
439 g_win->R ()->depthValue (), -10000.0f, 10000.0f, 3, &ok);
440
441 if (ok)
442 g_win->R ()->setDepthValue (depth);
443 }

mercurial