nanogui icon indicating copy to clipboard operation
nanogui copied to clipboard

Non-draggable windows

Open cstef7 opened this issue 6 years ago • 2 comments

Is there a way to create a window that cannot be dragged? A window that stays in the same place all the time.

cstef7 avatar Jun 06 '19 15:06 cstef7

You can create a new class like so and use it instead:

class FixedWindow : public nanogui::Window
{
public:
   FixedWindow(nanogui::Widget *parent, const std::string &title = "Untitled")
      : Window(parent, title) {}

   bool mouseDragEvent(const Eigen::Vector2i& /* p */, const Eigen::Vector2i& /* rel */, int /* button */, int /* modifiers*/) { return true; }
};

ermarch avatar Jun 10 '19 08:06 ermarch

possible you find solution here https://github.com/dalerank/nanogui/commit/c939b06fed017819f75ab40f7568f590ba86fe2e

dalerank avatar Oct 02 '19 15:10 dalerank