Ejemplo n.º 1
0
        public Button CreateImageButton(Transform transform, Player player, IMapUI text)
        {
            Button button = UIElements.CreateImageButton(LClass.s.Button(id).Sprite(player), transform, () => { Call(player); }, Sound);

            UIHelper.HoverEnter(button, () => text.ShowPanelMessage(LSys.tem.inputs.GameButtonName(this)),
                                () => text.ShowPanelMessage(""));

            return(button);
        }
Ejemplo n.º 2
0
        public void BuildMenu(Player player, string category, IMapUI text, bool button, Transform transform)
        {
            foreach (GameButton b in GetAllByCategory(category))
            {
                //can use?
                if (!b.req.Check(player) && !LSys.tem.options["showaction"].Bool())
                {
                    continue;
                }

                //create it
                if (button)
                {
                    b.CreateImageTextButton(transform, player);
                }
                else
                {
                    b.CreateImageButton(transform, player, text);
                }
            }
        }