AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() This way you have all that garbled logic inside button widget, and once it works you do not need to touch it ever again. When you create button you set its enum variable to desired call Something like: enum = “start” so get owner get controller, cast to controller, call “event_start”Īnd so on for all types of that enum and function to call Then in buttons on event click you make logic that selects what it needs to call dependig on enum. You can move some functionality to parent or to button or inside interface, but ultimately it will be always same structure, just in different places.īest way would be making events or functions in player controller (or pawn) Your solution was kind of what i am suggesting (only difference that i would use enum). Then that function/event calls selected (by enum) final functionįrom dynamically created buttons, get owner pointer, cast to owner widget class, call that custom event/function Make custom event or function in parent widget, that accepts that enum
0 Comments
Read More
Leave a Reply. |