- new tool sprites
- when clicking the order icon next to a character, the character is selected in the command menu
This commit is contained in:
@@ -216,6 +216,15 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectCharacter(Character character)
|
||||
{
|
||||
var characterButton = frame.FindChild(character) as GUIButton;
|
||||
|
||||
if (characterButton == null) return;
|
||||
|
||||
characterButton.Selected = true;
|
||||
}
|
||||
|
||||
private bool SetOrder(GUIButton button, object userData)
|
||||
{
|
||||
Order order = userData as Order;
|
||||
|
||||
@@ -106,6 +106,14 @@ namespace Barotrauma
|
||||
{
|
||||
GameMain.GameSession.CrewManager.commander.ToggleGUIFrame();
|
||||
|
||||
int orderIndex = orderListBox.children.IndexOf(component);
|
||||
if (orderIndex<0 || orderIndex >= listBox.children.Count) return false;
|
||||
|
||||
var characterFrame = listBox.children[orderIndex];
|
||||
if (characterFrame == null) return false;
|
||||
|
||||
GameMain.GameSession.CrewManager.commander.SelectCharacter(characterFrame.UserData as Character);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user