Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

c# question

$
0
0

@Mattlekim wrote:

I know this is not technical the correct place but I'm not a member on any other programming forum so am hopping you can help me out. I have the follow code.

 uicomponates.Add(
                new UiFrame("design", ScreenHelper.Size, AnchorState.All)
                {
                    BgColour = Color.Transparent, //dont display the background
                    Componates = new List<UiClass>()
                    {
                        new Button("bntOk", new Vector2(100,50), parent),
                    }
                });

Now what I am trying to do is pass in the uifram class in to the button class where you see the variable 'parent'
Now I know I can do this another way by create the Uiframe. Then create the button and pass uiframe in.
What I am interested in is if there is any way to do it in the above method?

Thank you for any light you can shed on this.

Posts: 5

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 6821