Souly13
Recruit
Hey Community,
I try to implement a Button on the clan-screen, nearly like the "Leave Kingdom" button. Add this button is not the problem, but add the functionality I cant figure out. In the prefab there is the line for the leave kingdom button:
Here you have the attribut: Command.Click="ExecuteLeaveKingdom". Two questions for that
1. Where can I find that function? (ExecuteLeaveKingdom)
2. If I want to implement an own function, how I do this? If I use the prefab and my SubModule.dll, it is hard to me to understand, where the XML-File know, where to find my function and the origin functions. Or is it not important and I can create a function "clickMe" in my class and call that function in the prefab-xml anyway?
Maybe i lost my understanding for this, so Im glad for tips
I try to implement a Button on the clan-screen, nearly like the "Leave Kingdom" button. Add this button is not the problem, but add the functionality I cant figure out. In the prefab there is the line for the leave kingdom button:
XML:
<!--Leave Kingdom Button-->
<ButtonWidget Id="LeaveKingdomButton" DoNotPassEventsToChildren="true" WidthSizePolicy="Fixed" HeightSizePolicy="Fixed" SuggestedWidth="!CancelButton.Width" SuggestedHeight="!CancelButton.Height" HorizontalAlignment="Right" MarginRight="290" Brush="Popup.Delete.Button" Command.Click="ExecuteLeaveKingdom" IsVisible="@ClanIsInAKingdom">
<Children>
<TextWidget WidthSizePolicy="StretchToParent" HeightSizePolicy="StretchToParent" Brush="Popup.Button.Text" Text="@LeaveKingdomText" />
</Children>
</ButtonWidget>
Here you have the attribut: Command.Click="ExecuteLeaveKingdom". Two questions for that
1. Where can I find that function? (ExecuteLeaveKingdom)
2. If I want to implement an own function, how I do this? If I use the prefab and my SubModule.dll, it is hard to me to understand, where the XML-File know, where to find my function and the origin functions. Or is it not important and I can create a function "clickMe" in my class and call that function in the prefab-xml anyway?
Maybe i lost my understanding for this, so Im glad for tips