예제 #1
0
        void HandleShieldButtonPressEvent(object o, ButtonPressEventArgs args)
        {
            Image shield = Helpers.Misc.OpenImage(this);

            if (shield == null)
            {
                return;
            }

            if (shield != null)
            {
                shield.ScaleInplace(Constants.MAX_SHIELD_ICON_SIZE, Constants.MAX_SHIELD_ICON_SIZE);
                template.Shield   = shield;
                shieldimage.Image = shield;
                Edited            = true;
            }
        }
예제 #2
0
        void HandlePlayerButtonPressEvent(object o, ButtonPressEventArgs args)
        {
            Image newPlayerImage = Helpers.Misc.OpenImage(this);

            if (newPlayerImage == null)
            {
                return;
            }

            newPlayerImage.ScaleInplace(Constants.MAX_PLAYER_ICON_SIZE, Constants.MAX_PLAYER_ICON_SIZE);
            if (newPlayerImage != null && loadedPlayer != null)
            {
                playerimage.Image  = newPlayerImage;
                loadedPlayer.Photo = newPlayerImage;
                Edited             = true;
            }
        }
예제 #3
0
        void HandlePlayerButtonPressEvent(object o, ButtonPressEventArgs args)
        {
            Image player;
            Pixbuf pix = Helpers.Misc.OpenImage (this);

            if (pix == null) {
                return;
            }

            player = new Image (pix);
            player.ScaleInplace (Constants.MAX_PLAYER_ICON_SIZE,
                Constants.MAX_PLAYER_ICON_SIZE);
            if (player != null && loadedPlayer != null) {
                playerimage.Pixbuf = player.Value;
                loadedPlayer.Photo = player;
                teamtagger.Reload ();
                Edited = true;
            }
        }
예제 #4
0
        void HandleShieldButtonPressEvent(object o, ButtonPressEventArgs args)
        {
            Image shield;
            Pixbuf pix = Helpers.Misc.OpenImage (this);

            if (pix == null) {
                return;
            }

            shield = new Image (pix);
            if (shield != null) {
                shield.ScaleInplace (Constants.MAX_SHIELD_ICON_SIZE,
                    Constants.MAX_SHIELD_ICON_SIZE);
                template.Shield = shield;
                shieldimage.Pixbuf = shield.Scale (SHIELD_SIZE, SHIELD_SIZE).Value;
                Edited = true;
            }
        }
예제 #5
0
        void HandleFieldButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            Image background;
            Gdk.Pixbuf pix = Helpers.Misc.OpenImage (this);

            if (pix == null) {
                return;
            }

            background = new Image (pix);
            background.ScaleInplace (Constants.MAX_BACKGROUND_WIDTH,
                Constants.MAX_BACKGROUND_HEIGHT);
            if (o == fieldeventbox) {
                UpdateBackground (background, 0);
            } else if (o == hfieldeventbox) {
                UpdateBackground (background, 1);
            } else if (o == goaleventbox) {
                UpdateBackground (background, 2);
            }
            Edited = true;
        }