Example #1
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }
Example #2
0
 void on_raiselower_activate(object o, EventArgs e)
 {
     if (raiselower.Active)
     {
         Console.WriteLine("raiselower clicked" + e.ToString() + " " + ((Gtk.RadioButton)o).Name);
         UICommandQueue.GetInstance().Enqueue(new UICommandBrushEffect(UICommandBrushEffect.BrushEffect.RaiseLower));
     }
 }
Example #3
0
 void on_flatten_activate(object o, EventArgs e)
 {
     if (flatten.Active)
     {
         Console.WriteLine("flatten clicked" + e.ToString() + " " + ((Gtk.RadioButton)o).Name);
         UICommandQueue.GetInstance().Enqueue(new UICommandBrushEffect(UICommandBrushEffect.BrushEffect.Flatten));
     }
 }
Example #4
0
 HeightMapPersistence()
 {
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveheightmap", new KeyCommandHandler(SaveHandler));
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("loadheightmap", new KeyCommandHandler(LoadHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdNewHeightMap), new UICommandQueue.UICommandHandler(NewHeightMapHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdOpenHeightMap), new UICommandQueue.UICommandHandler(OpenHeightMapHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdSaveHeightMap), new UICommandQueue.UICommandHandler(SaveHeightMapHandler));
 }
Example #5
0
        HeightEditor() // protected constructor to enforce singleton pattern
        {
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("increaseheight", new KeyCommandHandler(handler_IncreaseHeight));
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("decreaseheight", new KeyCommandHandler(handler_DecreaseHeight));
            RendererFactory.GetInstance().Tick += new TickHandler(renderer_Tick);
            brushsize = Config.GetInstance().HeightEditingDefaultBrushSize;
            speed     = Config.GetInstance().HeightEditingSpeed;

            UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandChangeBrushSize), new UICommandQueue.UICommandHandler(ChangeBrushSize));
            UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandBrushEffect), new UICommandQueue.UICommandHandler(ChangeBrushEffect));
        }
Example #6
0
 public void on_brushsize1_move_slider(object o, EventArgs e)
 {
     Console.WriteLine("New brushsize: " + brushsize.Value.ToString());
     UICommandQueue.GetInstance().Enqueue(new UICommandChangeBrushSize((int)brushsize.Value));
 }
Example #7
0
 SlopeMapPersistence()
 {
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdExportSlopeMap), new UICommandQueue.UICommandHandler(ExportSlopeMapHandler));
 }
Example #8
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }