예제 #1
0
파일: CMod.cs 프로젝트: krypt-lynx/RWLayout
        /// <summary>
        /// Override this method to construct settings Gui in it.
        /// </summary>
        public virtual void ConstructGui()
        {
            if (SettingsView != null)
            {
                Gui.Embed(Gui.AddElement(SettingsView));
            }

            string footerText = FooterText();

            if (footerText != null)
            {
                var footer = Gui.AddElement(new CLabel
                {
                    Title         = footerText,
                    TextAlignment = TextAnchor.LowerRight,
                    Color         = new Color(1, 1, 1, 0.5f),
                    Font          = GameFont.Tiny
                });

                Gui.AddConstraints(
                    footer.top ^ Gui.bottom + 3,
                    footer.width ^ footer.intrinsicWidth,
                    footer.right ^ Gui.right,
                    footer.height ^ footer.intrinsicHeight);
            }
        }