public MainMenuGuiButtonController(GuiComponent parent, Vector2 offset = new Vector2(), Point size = new Point()) : base(parent, offset, size) { CursorGuiImageComponent = new GuiImageComponent(this, ZeldaGraphics.RightPointFingerCursor, new Point(16, 16)) { LocationOverride = true, IsVisible = false }; _moveSoundEffect = _selectSoundEffect = ZeldaSfx.CursorMove; }
/// <summary> /// A gui button class that should be used as a base for all buttons /// </summary> /// <param name="textBoxConfig">The text that should be shown with the button</param> /// <param name="size">The size of the button</param> /// <param name="parentOffset">The offset of the components parent</param> /// <param name="parent">The parent of this object</param> /// <param name="graphicToLoad">The graphic for this button</param> protected GuiButton(Point size, Vector2 parentOffset, GuiComponent parent, TextBoxConfig textBoxConfig = null, Enum graphicToLoad = null) : base(parentOffset, size, parent) { if (graphicToLoad != null) { _guiImageComponent = new GuiImageComponent(this, graphicToLoad, size, parentOffset); } if (textBoxConfig != null) { _buttonTextComponent = new GuiTextComponent(textBoxConfig, textBoxConfig.FontType); } }
public GuiImage(Enum spriteSheetToLoad, Point size, Vector2 location = new Vector2()) : base(location, size) { _guiImageComponent = new GuiImageComponent(this, spriteSheetToLoad, size); }