Beispiel #1
0
        public TextWindow(int w, int h, Vector2 pos, WindowSkin loadedSkin)
            : base()
        {
            CreateWindow(w, h, pos, loadedSkin);

            _strings = new List<string>();
        }
Beispiel #2
0
 public override void ChangeSkin(WindowSkin newSkin)
 {
     base.ChangeSkin(newSkin);
     SetText(_text);
 }
Beispiel #3
0
        protected void CreateWindow(int width, int height, Vector2 pos, WindowSkin loadedSkin)
        {
            if (loadedSkin != null)
                skin = loadedSkin;
            else
                skin = WindowSkin.Default;

            // Normally changing the width and height will cause the content area to get re-calculated; however we'll disable that
            // until the window is fully created. This means that the call to CalcContentArea is absolutely required in this method.
            Width = width;
            Height = height;
            ScreenPos = pos;

            _backOpacity = 128;

            BadWindowSize = false;

            Padding = DEFAULT_WINDOW_PADDING;
            LineSpacing = DEFAULT_WINDOW_LINE_SPACING;

            CalcContentArea();

            Created = true;
        }
Beispiel #4
0
 public BaseWindow(int w, int h, Vector2 pos, WindowSkin loadedSkin)
 {
     CreateWindow(w, h, pos, loadedSkin);
 }
Beispiel #5
0
 public virtual void ChangeSkin(WindowSkin newSkin)
 {
     skin = newSkin;
     PrepareWindow();
     CalcContentArea();
 }