Esempio n. 1
0
        public override void Initialize()
        {
            Handler = Scene.FindComponentByType <GUIHandler>();

            bounds = new Rectangle(-0.5f, -0.5f, 1f, 1f);
            UpdateWorldBounds();

            InteractionState = GUIComponentState.None;
            dock             = GUIDock.Centered;
        }
Esempio n. 2
0
        public override void Initialize()
        {
            this.text             = "<TEXT>";
            this.textureHeight    = 128;
            this.font             = new FontFamily("Consolas");
            this.color            = Color.WHITE;
            this.bounds           = new Rectangle(0, 0, 1, 1);
            this.bounds.OnChange += rectangle => RebuildMesh();
            this.dock             = GUIDock.Centered;

            this.noText = false;

            LoadFontAtlas();

            CreateRenderable(ResolveAttributes, AssignUniforms, GraphicsHandler.CreateDefaultShader(1), BuildMesh());
        }