Пример #1
0
 public void ShowChat()
 {
     if (!IsChatVisible())
     {
         KeyHandler.GetKBState();
         TheGameScreen.AddChild(ChatMenu);
         FixMouse();
     }
 }
Пример #2
0
 /// <summary>
 /// NOTE: Do not call this without good reason, let's not annoy players!
 /// </summary>
 public void CloseChat()
 {
     if (IsChatVisible())
     {
         KeyHandler.GetKBState();
         TheGameScreen.RemoveChild(ChatMenu);
         WVis = false;
         FixMouse();
     }
 }
Пример #3
0
 private void SetCurrent(UIGroup menu)
 {
     if (CInvMenu == menu)
     {
         return;
     }
     if (CInvMenu != null)
     {
         TheGameScreen.RemoveChild(CInvMenu);
     }
     CInvMenu = menu;
     if (menu != null)
     {
         TheGameScreen.AddChild(menu);
     }
 }
Пример #4
0
 void GenerateItemDescriptors()
 {
     UI_Inv_Displayname = new UILabel("^B<Display name>", FontSets.SlightlyBigger, UIAnchor.CENTER_LEFT, () => 20 + ItemsListSize, () => 0, () => Window.Width - (20 + ItemsListSize));
     UI_Inv_Description = new UILabel("^B<Description>", FontSets.Standard, UIAnchor.TOP_LEFT, () => 20 + ItemsListSize,
                                      () => (int)(UI_Inv_Displayname.GetY() + UI_Inv_Displayname.GetHeight()), () => (int)TheGameScreen.GetWidth() - (20 + ItemsListSize));
     UI_Inv_Detail = new UILabel("^B<Detail>", FontSets.Standard, UIAnchor.TOP_LEFT, () => 20 + ItemsListSize,
                                 () => (int)(UI_Inv_Description.GetY() + UI_Inv_Description.GetHeight()), () => (int)TheGameScreen.GetWidth() - (20 + ItemsListSize));
     UI_Inv_Description.BColor = "^r^7^i";
     UI_Inv_Detail.BColor      = "^r^7^l";
     InventoryMenu.AddChild(UI_Inv_Displayname);
     InventoryMenu.AddChild(UI_Inv_Description);
     InventoryMenu.AddChild(UI_Inv_Detail);
 }
Пример #5
0
 public bool IsChatVisible()
 {
     return(TheGameScreen.HasChild(ChatMenu));
 }