Esempio n. 1
0
        public ICheckBox GetCheckBox(string id, string notCheckedPath, string notCheckedHoveredPath, string checkedPath, string checkedHoveredPath,
                                     float x, float y, IObject parent = null, string text = "", ITextConfig config = null, bool addToUi = true, float width = -1F, float height = -1F, bool isCheckButton = false)
        {
            IAnimation notChecked        = _graphics.LoadAnimationFromFiles(files: new[] { notCheckedPath });
            IAnimation notCheckedHovered = _graphics.LoadAnimationFromFiles(files: new[] { notCheckedHoveredPath });
            IAnimation @checked          = _graphics.LoadAnimationFromFiles(files: new[] { checkedPath });
            IAnimation checkedHovered    = _graphics.LoadAnimationFromFiles(files: new[] { checkedHoveredPath });

            return(GetCheckBox(id, notChecked, notCheckedHovered, @checked, checkedHovered, x, y, parent, text, config, addToUi, width, height, isCheckButton));
        }
Esempio n. 2
0
        public IButton GetButton(string id, string idleImagePath, string hoveredImagePath, string pushedImagePath,
                                 float x, float y, IObject parent = null, string text = "", ITextConfig config = null, bool addToUi = true,
                                 float width = -1f, float height = -1f)
        {
            IAnimation idle    = _graphics.LoadAnimationFromFiles(files: new[] { idleImagePath });
            IAnimation hovered = _graphics.LoadAnimationFromFiles(files: new[] { hoveredImagePath });
            IAnimation pushed  = _graphics.LoadAnimationFromFiles(files: new[] { pushedImagePath });

            return(GetButton(id, idle, hovered, pushed, x, y, parent, text, config, addToUi, width, height));
        }