public Button(IButtonContainer container, Resource.ResourceManager content, string downImage, string hoverImage, string upImage, string disabledImage, string clickedSound, string tooltip) { _downImage = content.Load <Graphics.TextureResource>(downImage); _hoverImage = content.Load <Graphics.TextureResource>(hoverImage); _upImage = content.Load <Graphics.TextureResource>(upImage); if (string.IsNullOrEmpty(disabledImage) == false) { _disabledImage = content.Load <Graphics.TextureResource>(disabledImage); } if (string.IsNullOrEmpty(clickedSound) == false) { _clickedSound = content.Load <Sound.AudioEngine.SoundEffect>(clickedSound); } _tooltip = tooltip; if (tooltip != null) { _tooltipFont = Gui.Font.Load(content.Load <Gui.FontSpec>("F_TOOLTIP.FON")); } _container = container; _enabled = true; }
public Dropdown(IButtonContainer container, Resource.ResourceManager globalContent, int width, string arrowDownSprite, string arrowHoverSprite, string arrowUpSprite) { _container = container; _downArrow = new Button(this, globalContent, arrowDownSprite, arrowHoverSprite, arrowUpSprite, null, null); _font = Gk3Main.Gui.Font.Load(globalContent.Load <FontSpec>("F_ARIAL_T8")); _top = globalContent.Load <Graphics.TextureResource>("RC_BOX_TOP"); _side = globalContent.Load <Graphics.TextureResource>("RC_BOX_SIDE"); _blCorner = globalContent.Load <Graphics.TextureResource>("RC_BOX_CORNER_BL"); _brCorner = globalContent.Load <Graphics.TextureResource>("RC_BOX_CORNER_BR"); _tlCorner = globalContent.Load <Graphics.TextureResource>("RC_BOX_CORNER_TL"); _trCorner = globalContent.Load <Graphics.TextureResource>("RC_BOX_CORNER_TR"); _dropdownBackground = globalContent.Load <Graphics.TextureResource>("OPTSC"); _downArrow.OnClick += new EventHandler(_downArrow_OnClick); _width = width; }
public Button(IButtonContainer container, Resource.ResourceManager content, string downImage, string hoverImage, string upImage, string disabledImage, string clickedSound) { _downImage = content.Load <Graphics.TextureResource>(downImage); _hoverImage = content.Load <Graphics.TextureResource>(hoverImage); _upImage = content.Load <Graphics.TextureResource>(upImage); if (string.IsNullOrEmpty(disabledImage) == false) { _disabledImage = content.Load <Graphics.TextureResource>(disabledImage); } if (string.IsNullOrEmpty(clickedSound) == false) { _clickedSound = content.Load <Sound.AudioEngine.SoundEffect>(clickedSound); } _container = container; _enabled = true; }