Exemplo n.º 1
0
 public InterfaceObject(MenuFlow menu)
 {
     _menu      = menu;
     _elements  = new List <InterfaceObject>();
     _size      = new Vector2(100f, 100f);
     _container = new FContainer();
 }
Exemplo n.º 2
0
        public ItemContainerVisualizer(MenuFlow menu, ItemContainer itemContainer) : base(menu)
        {
            _itemContainer = itemContainer;

            _itemAmount = new FLabel("font", string.Empty);
            _itemAmount.SetPosition(new Vector2(4f, -4f));

            itemContainer.SignalItemChange += OnItemChanged;
        }
Exemplo n.º 3
0
        public TargetInspector(MenuFlow menu) : base(menu)
        {
            _inspectLabel          = new ShadowedLabel(menu, string.Empty);
            _inspectLabel.position = new Vector2(0f, 10f);

            _bar        = new FSprite("uipixel");
            _bar.scaleY = 4f;

            _barCase = new FSprite("targethealth");
        }
Exemplo n.º 4
0
        public ChatBubble(WorldCamera camera, IPositionable behaviour, string text, MenuFlow menu) : base(menu)
        {
            _camera = camera;

            _behaviour = behaviour;
            _text      = text;
            _duration  = 10f;

            _rect  = new RoundedRect(menu, true);
            _label = new FLabel("font", string.Empty);

            AddElement(_rect);
            AddElement(_label);
        }
Exemplo n.º 5
0
        public ItemInspector(MenuFlow menu) : base(menu)
        {
            _rect      = new RoundedRect(menu, true);
            _rect.size = new Vector2(100f, 20f);

            AddElement(_rect);

            _itemName              = new FLabel("font", string.Empty);
            _itemInformation       = new FLabel("font", string.Empty);
            _itemInformation.scale = 0.3f;

            container.AddChild(_itemName);
            container.AddChild(_itemInformation);

            visible = false;
        }
Exemplo n.º 6
0
        public GeneralButton(MenuFlow menu, string name, Action clickCallback, bool pressAudio = true) : base(menu)
        {
            _rect1 = new RoundedRect(menu);
            _rect2 = new RoundedRect(menu);

            AddElement(_rect1);
            AddElement(_rect2);

            _label = new FLabel("font", name);
            container.AddChild(_label);

            this._clickCallback = clickCallback;
            this._pressAudio    = pressAudio;

            if (_onHoverAudio == null)
            {
                _onHoverAudio = Resources.Load <AudioClip>("SoundEffects/UIMetal3");
                _onPressAudio = Resources.Load <AudioClip>("SoundEffects/UIArp");
            }
        }
Exemplo n.º 7
0
 public ButtonBase(MenuFlow menu) : base(menu)
 {
     hovering = false;
     pressing = false;
 }
Exemplo n.º 8
0
        public RoundedRect(MenuFlow menu, bool solid = false) : base(menu)
        {
            _sliceSprite = new FSliceSprite(solid ? "solidroundedrect" : "roundedrect", 16, 16, 8, 8, 8, 8);

            AddElement(_sliceSprite);
        }
Exemplo n.º 9
0
        public DamageIndicator(WorldCamera camera, IPositionable positionable, Damage damage, MenuFlow menu) : base(menu)
        {
            _camera       = camera;
            _positionable = positionable;

            string text = ((int)damage.amount).ToString();

            _label       = new ShadowedLabel(menu, text);
            _label.scale = Vector2.one * 3f;

            AddElement(_label);

            _time = 0f;

            _colors = new Color[] { Color.white, Color.red, Color.yellow };
        }