Beispiel #1
0
        public override void Start()
        {
            LoadResources();

            m_changesWindow           = GetUIView().AddUIComponent(typeof(UIChangesWindow)) as UIChangesWindow;
            m_changesWindow.isVisible = false;

            name    = "MoveIt";
            tooltip = Str.baseUI_MoveItButton_Tooltip + " " + ModInfo.version;

            normalFgSprite  = "MoveIt";
            hoveredFgSprite = "MoveIt_hover";

            playAudioEvents = true;

            size = new Vector2(43, 49);

            if (savedX.value == -1000)
            {
                absolutePosition = new Vector2(BulldoserButton.absolutePosition.x - width - 5, BulldoserButton.parent.absolutePosition.y);
            }
            else
            {
                absolutePosition = new Vector2(savedX.value, savedY.value);
            }
        }
Beispiel #2
0
        public override void Start()
        {
            LoadResources();

            m_changesWindow           = GetUIView().AddUIComponent(typeof(UIChangesWindow)) as UIChangesWindow;
            m_changesWindow.isVisible = false;

            UIComponent bulldoserButton = GetUIView().FindUIComponent <UIComponent>("MarqueeBulldozer");

            if (bulldoserButton == null)
            {
                bulldoserButton = GetUIView().FindUIComponent <UIComponent>("BulldozerButton");
            }

            name    = "MoveIt";
            tooltip = "Move It! " + ModInfo.version;

            normalFgSprite  = "MoveIt";
            hoveredFgSprite = "MoveIt_hover";

            playAudioEvents = true;

            size = new Vector2(43, 49);

            if (savedX.value == -1000)
            {
                absolutePosition = new Vector2(bulldoserButton.absolutePosition.x - width - 5, bulldoserButton.parent.absolutePosition.y);
            }
            else
            {
                absolutePosition = new Vector2(savedX.value, savedY.value);
            }
        }
        public override void Start()
        {
            atlas            = UIUtils.GetAtlas("Ingame");
            backgroundSprite = "GenericPanelWhite";

            size      = new Vector2(500, 300);
            padding   = new RectOffset(10, 10, 10, 10);
            textColor = new Color32(0, 0, 0, 255);
            textScale = 0.9f;

            wordWrap   = true;
            autoHeight = true;

            instance = this;
            text     = m_blurb;
        }