public TopButtonsContainer(ContentManager content) { this.content = content; this.width = 0; menuButtons = new List <InMenuButton>(); hiddenLine = new Image(content, "Menu/Navigator/hiddenLine", Vector2.Zero); backdrop = new Image(content, "Menu/Navigator/backdrop", Vector2.Zero); template = new InMenuButton(content, (int)((width - 18) / 1), () => { }, "No Message"); }
public TopButtonsContainer AddButton(int slots, MyAction action, string name, bool useLanguage = true) { InMenuButton btn = new InMenuButton(content, (int)((width - 18) / slots), action, name); //InMenuButton btn = template.Clone() as InMenuButton; //btn.SetWidth((int)((width - 18) / slots)); //btn.SetAction(action); //btn.SetName(name); if (!useLanguage) { btn.ToggleLanguageManager(); } menuButtons.Add(btn); return(this); }