Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }