public UiSearchResultLine(UiSearchResult _parent) : base(_parent.Parent) { Color = EDColors.getColor(EDColors.ORANGE, 0.1f); RelativeChildPos = true; m_background = new NxRectangle(0, 0, width, height, Color); Add(m_background); Widths = new int[PropertiesCount]; m_props = new NxSimpleText[PropertiesCount]; m_separators = new NxRectangle[PropertiesCount]; for (int i = 0; i < m_separators.Length; i++) { m_separators[i] = new NxRectangle(i * 50, 0, 1, height, Color.Black); Add(m_separators[i]); } for (int i = 0; i < m_props.Length; i++) { m_props[i] = new NxSimpleText(i * 50, 5, "Property " + i.ToString(), Color.Orange, 18) { AutoSize = false }; Add(m_props[i]); } }
/// <summary> /// The button is centered on the position; /// </summary> /// <param name="_parent"></param> public UiMainMenuButton(int _x, int _y, MenuButtonType _type, NxOverlay _parent) : base(_parent) { x = _x; y = _y; m_Type = _type; //background Color = EDColors.getColor(EDColors.ORANGE, 0.2f); m_originRec = new Rectangle(x - (WIDTH / 2), y - (HEIGHT / 2), WIDTH, HEIGHT); m_background = new NxRectangle(m_originRec.X, m_originRec.Y, m_originRec.Width, m_originRec.Height, Color); Add(m_background); //Title m_TopText = new NxSimpleText(x, m_background.y + 5, getMenuTitle(), EDColors.ORANGE, 34, NxFonts.EuroCapital); m_TopText.centerHorizontal = true; Add(m_TopText); //Icon m_Icon = new NxImage(m_background.x + (WIDTH - ICON_SIZE) / 2, m_background.y + 50, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), getIconPath())); Add(m_Icon); //Bottom Text int _botHeight = 80; int _padding = 5; m_BottomText = new NxTextbox(m_background.x + _padding, m_background.y + (HEIGHT - _botHeight) - _padding, WIDTH - _padding * 2, _botHeight, getBottomText(), EDColors.ORANGE, 19); m_BottomText.showBounds = true; m_BottomText.boundColors = EDColors.getColor(EDColors.ORANGE, .5f); Add(m_BottomText); }
public NxMainPanelSearchButton(int _x, int _y, int _width, NxMenu _menu) : base(_menu.frame.NxOverlay) { m_width = _width; x = _x; y = _y; m_background = new NxRectangle(x, y, m_width, Height, EDColors.getColor(EDColors.ORANGE, 0.1f)); Add(m_background); Add(new NxRectangle(x, y, m_width, 1, EDColors.YELLOW)); Add(new NxRectangle(x, y + Height - 1, m_width, 1, EDColors.getColor(EDColors.YELLOW, 0.5f))); searchName = new NxSimpleText(x + (m_width / 2), y + (Height / 2), "empty", EDColors.getColor(EDColors.WHITE, 0.2f)); searchName.centerHorizontal = true; searchName.centerVertical = true; Add(searchName); }
public UiSearchBookmarkCard(NxOverlay _parent) : base(_parent) { RelativeChildPos = true; width = 250; height = 120; m_type = new NxSimpleText(2, 2, "", EDColors.YELLOW, 18, NxFonts.EuroCapital); m_content = new NxSimpleText[10]; for (int i = 0; i < m_content.Length; i++) { m_content[i] = new NxSimpleText(2, 20 + i * 20, "content", EDColors.ORANGE); m_content[i].Color = EDColors.LIGHTBLUE; Add(m_content[i]); m_content[i].isVisible = false; } Add(m_type); }
public UiMainPlayerInfos(NxMenu _menu) : base(_menu.frame.NxOverlay) { x = 0; y = UiMainTopInfos.HEIGHT + 5; m_menu = _menu; NexHudMain.EliteApi.Events.RankEvent += onRankEvent; m_PlayerRank = new NxImage(x, y, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), getImageForRank((int)NexHudMain.EliteApi.Commander.CombatRank, (int)NexHudMain.EliteApi.Commander.TradeRank, (int)NexHudMain.EliteApi.Commander.ExplorationRank))); Add(m_PlayerRank); m_PlayerName = new NxSimpleText(x + 64, y, "CMDR " + NexHudMain.EliteApi.Commander.Commander, EDColors.WHITE, 22); Add(m_PlayerName); m_ShipName = new NxSimpleText(x + 64, y + 24, "Unknow ship", EDColors.ORANGE, 22, NxFonts.EuroCapital); Add(m_ShipName); NexHudMain.EliteApi.Events.SetUserShipNameEvent += Events_SetUserShipNameEvent; m_Balance = new NxSimpleText(m_menu.frame.WindowWidth, y, string.Empty, EDColors.YELLOW, 20); Add(m_Balance); m_Rebuy = new NxSimpleText(m_menu.frame.WindowWidth, y + 24, string.Empty, EDColors.RED, 18); Add(m_Rebuy); NexHudMain.EliteApi.Events.LoadoutEvent += Events_LoadoutEvent; }
public UiMainTopInfos(NxMenu _menu) : base(_menu.frame.NxOverlay) { m_menu = _menu; //Loading & Content; m_Content = new NxGroup(Parent); Add(m_Content); m_Content.isVisible = false; m_Loading = new NxLoading(NxMenu.Width / 2, 30); Add(m_Loading); //Decoration Add(new NxImage(0, 0, NxMenu.Width, HEIGHT * 2, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), "Resources.GradientOrange15p.png"))); Add(new NxRectangle(0, HEIGHT, NxMenu.Width, 1, EDColors.YELLOW)); //* Faction icon *// m_AllegianceLogo = new NxImage(0, 0, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), "Resources.factions.inde64.png")); m_Content.Add(m_AllegianceLogo); //* -- Titles **// //System Name m_SystemName = new NxSimpleText(decal_x, 0, string.Empty, EDColors.ORANGE, 40, NxFonts.EuroCapital); m_Content.Add(m_SystemName); //Controlling Factions m_ControllingFaction = new NxSimpleText(decal_x + 5, 35, string.Empty, EDColors.YELLOW, 20, NxFonts.EuroCapital); m_Content.Add(m_ControllingFaction); //* -- Descriptions **// //Government & Population Column1 = 0; int infoSize = 18; m_GovAndPop = new NxSimpleText(Column1, 2, string.Empty, EDColors.getColor(EDColors.WHITE, 0.5f), infoSize, NxFonts.EuroStile); m_Content.Add(m_GovAndPop); //Economy m_Economy = new NxSimpleText(Column1, 20, string.Empty, EDColors.BLUE, infoSize, NxFonts.EuroStile); m_Content.Add(m_Economy); //Security m_SecurityLabel = new NxSimpleText(Column1, 40, "Security:", EDColors.getColor(EDColors.WHITE, 0.5f), infoSize, NxFonts.EuroStile); m_Content.Add(m_SecurityLabel); m_Security = new NxSimpleText(Column1, 40, string.Empty, EDColors.BLUE, infoSize, NxFonts.EuroStile); m_Content.Add(m_Security); //Threat m_ThreatLabel = new NxSimpleText(Column1, 40, "Threat:", EDColors.getColor(EDColors.WHITE, 0.5f), infoSize, NxFonts.EuroStile); m_Content.Add(m_ThreatLabel); m_Threat = new NxSimpleText(Column1, 40, string.Empty, EDColors.BLUE, infoSize, NxFonts.EuroStile); m_Content.Add(m_Threat); //Traffic m_traffic = new NxSimpleText(0, 40, string.Empty, EDColors.getColor(EDColors.WHITE, 0.5f), infoSize, NxFonts.EuroStile); m_Content.Add(m_traffic); //* -- Column 2 -- *// //reserve m_Reserve = new NxSimpleText(0, 2, string.Empty, EDColors.getColor(EDColors.WHITE, 0.5f), infoSize, NxFonts.EuroStile); m_Content.Add(m_Reserve); //System Value m_SystemValue = new NxSimpleText(0, 20, string.Empty, EDColors.LIGHTBLUE, infoSize, NxFonts.EuroStile); m_Content.Add(m_SystemValue); //System Value Mapped m_SystemValueMapped = new NxSimpleText(0, 40, string.Empty, EDColors.BLUE, infoSize, NxFonts.EuroStile); m_Content.Add(m_SystemValueMapped); }
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); }