Esempio n. 1
0
        public async Task <ICheckBox> GetCheckBoxAsync(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 = await _graphics.LoadAnimationFromFilesAsync(files : new[] { notCheckedPath });

            IAnimation notCheckedHovered = await _graphics.LoadAnimationFromFilesAsync(files : new[] { notCheckedHoveredPath });

            IAnimation @checked = await _graphics.LoadAnimationFromFilesAsync(files : new[] { checkedPath });

            IAnimation checkedHovered = await _graphics.LoadAnimationFromFilesAsync(files : new[] { checkedHoveredPath });

            return(GetCheckBox(id, notChecked, notCheckedHovered, @checked, checkedHovered, x, y, parent, text, config, addToUi, width, height, isCheckButton));
        }
Esempio n. 2
0
        public async Task <IButton> GetButtonAsync(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 = await _graphics.LoadAnimationFromFilesAsync(files : new[] { idleImagePath });

            IAnimation hovered = await _graphics.LoadAnimationFromFilesAsync(files : new[] { hoveredImagePath });

            IAnimation pushed = await _graphics.LoadAnimationFromFilesAsync(files : new[] { pushedImagePath });

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