~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Wrappers/TestApp.Managed/Test_Gui.cs

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
using System;
2
 
using MyGUI.Managed.Demo;
3
 
using MyGUI.Managed;
4
 
 
5
 
namespace TestApp.Sharp
6
 
{
7
 
    public class Test_Gui
8
 
    {
9
 
        public static void Test()
10
 
        {
11
 
            Button button = Gui.Instance.CreateWidget<Button>("Button", new IntCoord(760, 420, 100, 100), Align.Default, "Main");
12
 
            button.Caption = "Gui";
13
 
 
14
 
            bool focus = InputManager.Instance.KeyFocus;
15
 
            Widget widget = InputManager.Instance.KeyFocusWidget;
16
 
            InputManager.Instance.KeyFocusWidget = button;
17
 
            InputManager.Instance.ResetKeyFocus();
18
 
 
19
 
            InputManager.Instance.AddWidgetModal(button);
20
 
            InputManager.Instance.RemoveWidgetModal(button);
21
 
 
22
 
            LayerManager.Instance.AttachToLayer("Popup", button);
23
 
            LayerManager.Instance.UpWidget(button);
24
 
 
25
 
            Gui.Instance.LoadResource("core_layer.xml");
26
 
 
27
 
            focus = InputManager.Instance.MouseFocus;
28
 
            widget = InputManager.Instance.MouseFocusWidget;
29
 
 
30
 
            Gui.Instance.LoadLayout("Mix.layout");
31
 
        }
32
 
 
33
 
        public static void Update()
34
 
        {
35
 
            string mouse = InputManager.Instance.MouseFocus.ToString() + "(" + (InputManager.Instance.MouseFocusWidget == null ? "null" : InputManager.Instance.MouseFocusWidget.ToString()) + ")";
36
 
            string key = InputManager.Instance.KeyFocus.ToString() + "(" + (InputManager.Instance.KeyFocusWidget == null ? "null" : InputManager.Instance.KeyFocusWidget.ToString()) + ")";
37
 
            Export.DebugOut("GUI: mouse=" + mouse + "   key=" + key);
38
 
        }
39
 
    }
40
 
}