// Use this for initialization void Start () { // create GWEN renderer UnityGwenRenderer gwenRenderer = new UnityGwenRenderer(); // Create GWEN skin //Skin.Simple skin = new Skin.Simple(GwenRenderer); Gwen.Skin.TexturedBase skin = new Gwen.Skin.TexturedBase(gwenRenderer, "DefaultSkin"); // set default font skin.DefaultFont = new Gwen.Font(gwenRenderer, "Arvo-Regular", 10); // Create a Canvas (it's root, on which all other GWEN controls are created) m_Canvas = new Gwen.Control.Canvas(skin); m_Canvas.SetSize(width, height); m_Canvas.ShouldDrawBackground = true; m_Canvas.BackgroundColor = new System.Drawing.Color(255, 150, 170, 170); m_Canvas.KeyboardInputEnabled = true; //win = new Gwen.Control.WindowControl(m_Canvas); //win.SetBounds(50, 50, 300, 300); //win.RenderColor = System.Drawing.Color.White; // Create GWEN input processor m_Input = new Gwen.Input.UnityGwenInput(); m_Input.Initialize(m_Canvas); }
// Use this for initialization void Start() { // create GWEN renderer UnityGwenRenderer gwenRenderer = new UnityGwenRenderer(); // Create GWEN skin //Skin.Simple skin = new Skin.Simple(GwenRenderer); Gwen.Skin.TexturedBase skin = new Gwen.Skin.TexturedBase(gwenRenderer, "DefaultSkin"); // set default font skin.DefaultFont = new Gwen.Font(gwenRenderer, "Arvo-Regular", 10); // Create a Canvas (it's root, on which all other GWEN controls are created) m_Canvas = new Gwen.Control.Canvas(skin); m_Canvas.SetSize(width, height); m_Canvas.ShouldDrawBackground = true; m_Canvas.BackgroundColor = new System.Drawing.Color(255, 150, 170, 170); m_Canvas.KeyboardInputEnabled = true; //win = new Gwen.Control.WindowControl(m_Canvas); //win.SetBounds(50, 50, 300, 300); //win.RenderColor = System.Drawing.Color.White; // Create GWEN input processor m_Input = new Gwen.Input.UnityGwenInput(); m_Input.Initialize(m_Canvas); }