public MenuButton(string id, Vector2 pos, StatusMenuButton status,bool abstractPos, SpriteFont font, Color normal, Color selected, Event onClick, bool normalSelect = true, PosOnScreen posOnScreen = PosOnScreen.TopLeft, bool isDrawable = true) : this(id, pos, status, abstractPos, () => GameEngine.LangCenter.GetString(id), (isSelect) => GameEngine.LangCenter.GetImage(id, !isSelect),() => GameEngine.Config.ResolutionWidth/1920f , font, normal, selected, onClick, normalSelect,posOnScreen,isDrawable) { }
internal SimpleText(NameFunc nameFunc,Vector2 position, PosOnScreen pos, SpriteFont font, Color colorNormal, Color colorSelected, bool isDrawable = true) : base(CreateRectangle(position, font, nameFunc.Invoke()), pos, isDrawable) { Font = font; _nameFunc = nameFunc; ColorNormal = colorNormal; ColorSelected = colorSelected; }
private Item(Rectangle rectangle, PosOnScreen pos, bool isExpandable, bool isDrawable = true) { IsDrawable = isDrawable; IsExpandable = isExpandable; ItemRectangle = rectangle; Pos = pos; ActualHeight = Height; ActualWidth = Width; SetRectangles(); }
internal MenuButton(string id, Vector2 pos, StatusMenuButton status, bool abstractPos, NameFunc text, TextureFunc image, RatioFunc ratioFunc, SpriteFont font, Color normal, Color selected, Event onClick, bool normalSelect = true, PosOnScreen posOnScreen = PosOnScreen.TopLeft, bool isDrawable = true) : base(new Rectangle((int)pos.X, (int)pos.Y, 0, 0),posOnScreen,isDrawable) { Id = id; MiddlePos = (abstractPos) ? Position : pos; Status = status; AbstractPos = abstractPos; Text = text; Image = image; Ratio = ratioFunc; Font = font; ColorNormal = normal; ColorSelected = selected; OnClick = onClick; NormalSelect = normalSelect; UpdateRectangles(); }
public MenuButton(string id, Vector2 pos, SpriteFont font, Color normal, Color selected, Event onClick, bool normalSelect = true, PosOnScreen posOnScreen = PosOnScreen.TopLeft, bool isDrawable = true) : this(id, pos, StatusMenuButton.None,true, font, normal, selected, onClick,normalSelect,posOnScreen, isDrawable) { }
public SimpleText(NameFunc text, Vector2 position, PosOnScreen pos, SpriteFont font, Color colorNormal, bool isDrawable = true) : this(text,position, pos, font, colorNormal, colorNormal,isDrawable) { }
public SimpleText(string text, Vector2 position, PosOnScreen pos, SpriteFont font, Color colorNormal, bool isDrawable = true) : this(() => GameEngine.LangCenter.GetString(text), position, pos, font, colorNormal, colorNormal,isDrawable) { }
protected Item(Rectangle rectangle, PosOnScreen pos, bool isDrawable = true) : this(rectangle, pos, false, isDrawable) { }