예제 #1
0
 private void SaveLoadButtonOnEventClicked(UIComponent component, UIMouseEventParameter eventparam)
 {
     if (UISaveWindow.Instance != null)
     {
         UISaveWindow.Export(_fileNameLabel.text);
     }
     else
     {
         UILoadWindow.Close();
         PresetsUtils.Import(_fileNameLabel.text);
     }
 }
예제 #2
0
        public override void Start()
        {
            name                      = $"{Configuration.ResourcePrefix}NetList";
            padding                   = new RectOffset(4, 4, 4, 0);
            size                      = new Vector2(500 - 8 * 2, 200);
            autoLayoutPadding         = new RectOffset(0, 0, 0, 4);
            autoFitChildrenVertically = true;
            autoLayout                = true;
            autoLayoutDirection       = LayoutDirection.Vertical;
            backgroundSprite          = "GenericPanel";
            color                     = Color.black;

            _space      = AddUIComponent <UIPanel>();
            _space.size = new Vector2(1, 1);

            _items = new List <UINetTypeItem>();
            AddItem(null, true);

            PresetsUtils.Import(Configuration.AutoSaveFileName);
        }