Exemplo n.º 1
0
 /// <summary>Returns SpriteViewWidget inserted in a window</summary>
 public static Window CreateWindow(Sprite sprite)
 {
     Gtk.Window window = new Window(WindowType.Popup);
     SpriteViewWidget widget = new SpriteViewWidget(sprite);
     window.SetSizeRequest( (int)sprite.Width, (int)sprite.Height);
     window.Add(widget);
     window.ShowAll();
     return window;
 }
Exemplo n.º 2
0
    /// <summary>Returns SpriteViewWidget inserted in a window</summary>
    public static Window CreateWindow(Sprite sprite)
    {
        Gtk.Window       window = new Window(WindowType.Popup);
        SpriteViewWidget widget = new SpriteViewWidget(sprite);

        window.SetSizeRequest((int)sprite.Width, (int)sprite.Height);
        window.Add(widget);
        window.ShowAll();
        return(window);
    }
Exemplo n.º 3
0
    private void OnDragBegin(object o, DragBeginArgs args)
    {
        if (SelectedObjectNr > -1)
        {
            draggedID     = SelectedObjectNr;
            draggedBadguy = badguys[SelectedObjectNr];
            Gtk.Drag.SetIconWidget(args.Context, SpriteViewWidget.CreateWindow(badguySprites[draggedBadguy]), -15, -15);

            dragging = true;
        }
        //update heigth
        SetSizeRequest(-1, ROW_HEIGHT * ((badguys.Count - 1) / TILES_PER_ROW + 1));
        LogManager.Log(LogLevel.Debug, "Dragstart of " + draggedBadguy);
    }
Exemplo n.º 4
0
 private void OnDragBegin(object o, DragBeginArgs args)
 {
     Gtk.Drag.SetIconWidget(args.Context, SpriteViewWidget.CreateWindow(gameObjectSprites[SelectedObjectNr]), -15, -15);
     LogManager.Log(LogLevel.Debug, "Dragstart");
 }