private void initContent() { m_uiTopInfos = new UiMainTopInfos(this); m_frame.NxOverlay.Add(m_uiTopInfos); m_uiMainMenu = new UiMainMenu(this); m_frame.NxOverlay.Add(m_uiMainMenu); //Desactivate unavailable buttons //m_menuPanel.setActive(NxMainPanelMenuButton.MenuButtonType.Improve, false); m_uiMainMenu.setActive(UiMainMenuButton.MenuButtonType.Trade, false); m_uiPlayerInfos = new UiMainPlayerInfos(this); m_frame.NxOverlay.Add(m_uiPlayerInfos); m_searchPanel = new UiSearch2(this); m_frame.NxOverlay.Add(m_searchPanel); m_uiImprove = new UiImprove(this); m_frame.NxOverlay.Add(m_uiImprove); m_frame.NxOverlay.Add(m_UiRadio = new UiMainRadio(Width / 2, Height - (UiMainRadio.Height + 50), this)); }
public UiSearchResult(UiSearch2 _search, UiImprove _uiImprove = null) : base(_search != null ? _search.Menu.frame.NxOverlay : _uiImprove.Menu.frame.NxOverlay) { m_UiSearch = _search; m_UiImprove = _uiImprove; RelativeChildPos = true; //Title m_title = new NxSimpleText(0, 0, "Search result...", EDColors.ORANGE, 24, NxFonts.EuroCapital); Add(m_title); int _by = 0; width = NxMenu.Width; height = NxMenu.Height - y; //Bookmark buttons //Tips for materials //Title _by += 40; //Loading m_loading = new NxLoading(NxMenu.Width / 2, 500); Add(m_loading); //Message m_messageInfo = new NxSimpleText(10, height - 160, "", Color.CadetBlue, 20); Add(m_messageInfo); //results m_results = new UiSearchResultLine[MAX_LINE_RESULT]; for (int i = 0; i < m_results.Length; i++) { m_results[i] = new UiSearchResultLine(this) { x = 0, y = _by, width = NxMenu.Width, height = 30 }; _by += m_results[i].height + 2; m_results[i].onClick += OnClickResult; Add(m_results[i]); } MoveCursorToFirst(); m_BtnSave = new NxButton(width / 2 + 5, height - 135, width / 2 - 10, 35, "Save search", Menu); m_BtnSave.ColorBack = EDColors.getColor(EDColors.GREEN, 0.1f); m_BtnSave.ColorBackSelected = EDColors.getColor(EDColors.GREEN, 0.8f); m_BtnSave.onClick += onSaveClicked; Add(m_BtnSave); m_BtnDelete = new NxButton(5, height - 135, width / 2 - 10, 35, "Delete search", Menu); m_BtnDelete.ColorBack = EDColors.getColor(EDColors.RED, 0.1f); m_BtnDelete.ColorBackSelected = EDColors.getColor(EDColors.RED, 0.8f); m_BtnDelete.onClick += onDeleteClicked; Add(m_BtnDelete); }