Ejemplo n.º 1
0
        public void Awake()
        {
            m_container                     = transform.gameObject.AddComponent <UIPanel>();
            m_container.width               = transform.parent.gameObject.GetComponent <UIComponent>().width;
            m_container.height              = 30;
            m_container.autoLayout          = true;
            m_container.autoLayoutDirection = LayoutDirection.Horizontal;
            m_container.autoLayoutPadding   = new RectOffset(2, 2, 2, 2);
            m_container.wrapLayout          = false;
            m_container.name                = "AzimuthEditorTitle";

            CreateTitleLabel(out UILabel m_cityId, "CityId", "#", 30);
            CreateTitleLabel(out UILabel m_azimuthInput, "StartAzimuth", Locale.Get("K45_ADR_AZIMUTH_GRADOS_TITLE"), 50);
            CreateTitleLabel(out UILabel m_direction, "Direction", Locale.Get("K45_ADR_DIRECTION_TITLE"), 60);
            CreateTitleLabel(out UILabel m_generatedName, "GenName", Locale.Get("K45_ADR_GEN_NAME_TITLE"), 150);

            KlyteMonoUtils.CreateUIElement(out UIButton add, m_container.transform, "RegenName");
            add.textScale = 1f;
            add.width     = 30;
            add.height    = 30;
            add.tooltip   = Locale.Get("K45_ADR_ADD_REG_CITY");
            KlyteMonoUtils.InitButton(add, true, "ButtonMenu");
            add.isVisible   = true;
            add.text        = "+";
            add.eventClick += (component, eventParam) => AdrNeighborhoodExtension.SetAzimuth(99, 0);
        }
Ejemplo n.º 2
0
 private void SaveAzimuthConfig(int idx, ushort value) => AdrNeighborhoodExtension.SetAzimuth(idx, value);
Ejemplo n.º 3
0
        public void Awake()
        {
            m_container                     = GetComponent <UIPanel>();
            m_container.width               = m_container.parent.width;
            m_container.height              = 30;
            m_container.autoLayout          = true;
            m_container.autoLayoutDirection = LayoutDirection.Horizontal;
            m_container.autoLayoutPadding   = new RectOffset(2, 2, 2, 2);
            m_container.wrapLayout          = false;
            m_container.name                = "AzimuthEditorTitle";



            CreateTitleLabel(out UILabel m_cityId, "CityId", "#", 30);
            CreateTitleLabel(out UILabel m_azimuthInput, "StartAzimuth", Locale.Get("K45_ADR_AZIMUTH_GRADOS_TITLE"), 50);
            CreateTitleLabel(out UILabel m_direction, "Direction", Locale.Get("K45_ADR_DIRECTION_TITLE"), 60);
            CreateTitleLabel(out UILabel m_generatedName, "GenName", Locale.Get("K45_ADR_GEN_NAME_TITLE"), m_container.width - 247.5f);

            DefaultEditorUILib.AddButtonInEditorRow(m_generatedName, CommonsSpriteNames.K45_Plus, () => AdrNeighborhoodExtension.SetAzimuth(99, 0), "K45_ADR_ADD_REG_CITY", false, 30);
        }