private int Compare(PlayUserIcon icon1, PlayUserIcon icon2) { int ret; if (icon1.Alpha == 0 && icon2.Alpha == 0) { return(0); } else if (icon1.Alpha == 0) { return(1); } else if (icon2.Alpha == 0) { return(-1); } if (icon1.DisplayScore == icon2.DisplayScore) { ret = icon2.UserPlayState.User.ID - icon1.UserPlayState.User.ID; } else { ret = icon1.DisplayScore - icon2.DisplayScore; } return(ret * -1); }
public void AddSelfUser(UserPlayState selfUserPlayState, ItemManagerComponent itemManager) { var playUserIcon = new PlayUserIcon(device, resourceManager, selfUserPlayState, itemManager) { Position = new SharpDX.Vector2(0, ChildrenCount * ItemHeight) }; iconSprite.AddChild(playUserIcon); }
public void AddUser(UserPlayState userPlayState) { var playUserIcon = new PlayUserIcon(device, resourceManager, userPlayState) { Position = new SharpDX.Vector2(0, ChildrenCount * ItemHeight) }; iconSprite.AddChild(playUserIcon); }
public void DeleteUser(UserPlayState userPlayState) { PlayUserIcon found = null; foreach (PlayUserIcon playUserIcon in iconSprite.Children) { if (playUserIcon.UserPlayState == userPlayState) { found = playUserIcon; break; } } if (found != null) { iconSprite.RemoveChild(found); } }