Jump to content

Recommended Posts

                var PButtons = (new PButton("DirectionButton" + i.ToString())
                {
                    ToolTip = "Select direction " + directions,
                    Margin = new RectOffset(5, 15, 5, 15),
                    Color = mColor,
                    Sprite = arrowSprite_inact,
                }
                );
                panel.AddChild(PButtons, new GridComponentSpec(rows[1], columns[1]));
                buttonObjects.Add(PButtons.Build());

This is the code for the new button.

        private void Refresh()
        {
          var img = buttonObjects.GetComponent<KButton>().fgImage.overrideSprite; 
          img = arrowSprite_act;
          Debug.Log("act:" + buttonObjects.name + ", sprite :" + img.ToString());
  
        }

The above is the refresh code.

But it cannot refresh the new image.

PLZ HELP

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...