////////////////

        public OldUIDialog(OldUITheme theme, int initial_width, int initial_height)
        {
            this.IsOpen = false;
            this.Theme  = theme;
            this.InitialContainerWidth  = initial_width;
            this.InitialContainerHeight = initial_height;
        }
Example #2
0
        ////////////////

        public UITextPanelButton(OldUITheme theme, string label, float scale = 1f, bool large = false) : base(label, scale, large)
        {
            this.Theme     = theme;
            this.IsEnabled = true;

            this.SetPadding(5f);

            var self = this;

            theme.ApplyButton(this);
            this.OnMouseOver += delegate(UIMouseEvent evt, UIElement from_elem) {
                if (!self.IsEnabled)
                {
                    return;
                }
                theme.ApplyButtonLit(self);
            };
            this.OnMouseOut += delegate(UIMouseEvent evt, UIElement from_elem) {
                if (!self.IsEnabled)
                {
                    return;
                }
                theme.ApplyButton(self);
            };

            this.RefreshTheme();
        }
 public UIDialog(OldUITheme theme, int initial_width, int initial_height) : base(theme, initial_width, initial_height)
 {
 }
        ////////////////

        public UIPromptDialog(OldUITheme theme, int width, int height, string title, Action confirm, Action cancel = null) : base(theme, width, height)
        {
            this.TitleText     = title;
            this.ConfirmAction = confirm;
            this.CancelAction  = cancel;
        }