Пример #1
0
        public ItemInventory(ItemScreen ui, UiSkinComponent skin, Texture2D texture, int x, int y, int width, int height, float sourceScale) : base(texture, x, y, width, height, sourceScale)
        {
            _itemui       = ui;
            TopRect       = new UiRectangle(this, skin.GetSkin("test"), PanelExt.SizeToBounds(Bounds, 0f, 0f, 1f, 0.1f), 0.5f);
            TopRect.Color = Microsoft.Xna.Framework.Color.Silver;


            _itemText = new TextPanel(this, ui.ParantMenu.StandardFont, "Item", TextSortMode.LEFT)
            {
                Color    = Color.Black,
                Position = PanelExt.PositionToBounds(TopRect.Bounds, 0.05f, 0.5f)
            };


            PanelGrid = new GridPanel(this, 4, 4, PanelExt.SizeToBounds(Bounds, 0f, 0.1f, 1f, 0.9f), 10, 10);
            for (int i = 0; i < 16; i++)
            {
                PanelGrid.AddGridChilde(new UiRectangle(skin.GetSkin("item"), new Rectangle(0, 0, 100, 100), 2)
                {
                    PanelCode = i
                });
            }

            _exit = new ImagePanel(this, "UI\\exit");
            _exit.SetPosition(PanelExt.PositionToBounds(Bounds, 0.95f, 0.05f));
            _exit.Scale = 1.5f;
            _exit.Recalculate();

            SelectOnEvent += ItemPanel_SelectOnEvent;
        }
Пример #2
0
        public PlayUI(Data data, Screen parant) : base(data, parant)
        {
            StandardFont = ContentExt.Content.Load <SpriteFont>("Font\\Noto");
            UISkin       = new UiSkinComponent();
            UISkin.AddSkin(new MKC_UISkin(UISkin));

            Status   = new StatusScreen(data, this);
            Item     = new ItemScreen(data, this);
            UICamera = new SimpleCamera();
        }
Пример #3
0
 public UiSkin(UiSkinComponent component)
 {
     _component = component;
 }
Пример #4
0
 public MKC_UISkin(UiSkinComponent component) : base(component)
 {
     AddSkin("test");
     AddSkin("item");
 }