Beispiel #1
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }
Beispiel #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));
     }
 }
Beispiel #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));
     }
 }
Beispiel #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));
 }
Beispiel #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));
        }
Beispiel #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));
 }
Beispiel #7
0
 SlopeMapPersistence()
 {
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdExportSlopeMap), new UICommandQueue.UICommandHandler(ExportSlopeMapHandler));
 }
Beispiel #8
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }