示例#1
0
        public static SimpleUI InitUI()
        {
            FontSurface fnt = FontSurface.BitmapMonospace("Resources" + "/" + "monkey.png", new Size(6, 14));
            Screen      initialActionChoices = new Screen("Act!", new List <MenuItem>()),
                        attackChoices        = new Screen("Attack!", new List <MenuItem>());
            MenuItem moveItem   = new MenuItem("Move", null, Demo.OnKeyDown_SelectMove, Demo.HighlightMove),
                     attackItem = new MenuItem("Attack", attackChoices, null),
                     waitItem   = new MenuItem("Wait", null, null, Demo.waitAction),
                     lookItem   = new MenuItem("Look", null, Demo.OnKeyDown_LookAround);

            initialActionChoices.menu.Add(moveItem);
            initialActionChoices.menu.Add(attackItem);
            initialActionChoices.menu.Add(waitItem);
            initialActionChoices.menu.Add(lookItem);
            attackChoices.previousScreen = initialActionChoices;
            //attackChoices.menu.Add(new MenuItem("Scorch", null, Demo.OnKeyDown_SelectSkill));
            SimpleUI sui = new SimpleUI(initialActionChoices, fnt);

            sui.allScreens.Add("Act", initialActionChoices);
            sui.allScreens.Add("Attack", attackChoices);
            sui.allMenuItems.Add(moveItem);
            sui.allMenuItems.Add(attackItem);
            sui.allMenuItems.Add(waitItem);
            sui.allMenuItems.Add(lookItem);
            return(sui);
        }
示例#2
0
 public static SimpleUI InitUI()
 {
     FontSurface fnt = FontSurface.BitmapMonospace("Resources" + "/" + "monkey.png", new Size(6, 14));
     Screen initialActionChoices = new Screen("Act!", new List<MenuItem>()),
         attackChoices = new Screen("Attack!", new List<MenuItem>());
     MenuItem moveItem = new MenuItem("Move", null, Demo.OnKeyDown_SelectMove, Demo.HighlightMove),
         attackItem = new MenuItem("Attack", attackChoices, null),
         waitItem = new MenuItem("Wait", null, null, Demo.waitAction),
         lookItem = new MenuItem("Look", null, Demo.OnKeyDown_LookAround);
     initialActionChoices.menu.Add(moveItem);
     initialActionChoices.menu.Add(attackItem);
     initialActionChoices.menu.Add(waitItem);
     initialActionChoices.menu.Add(lookItem);
     attackChoices.previousScreen = initialActionChoices;
     //attackChoices.menu.Add(new MenuItem("Scorch", null, Demo.OnKeyDown_SelectSkill));
     SimpleUI sui = new SimpleUI(initialActionChoices, fnt);
     sui.allScreens.Add("Act", initialActionChoices);
     sui.allScreens.Add("Attack", attackChoices);
     sui.allMenuItems.Add(moveItem);
     sui.allMenuItems.Add(attackItem);
     sui.allMenuItems.Add(waitItem);
     sui.allMenuItems.Add(lookItem);
     return sui;
 }
示例#3
0
 //        public static LinkedAction associatedEvent;
 public static void Init()
 {
     //            associatedEvent = menuEventHandler;
     //endScreen = new Screen("__END_SCREEN__", new List<MenuItem>());
     currentUI = SimpleUI.InitUI();
 }
示例#4
0
 //        public static LinkedAction associatedEvent;
 public static void Init()
 {
     //            associatedEvent = menuEventHandler;
     //endScreen = new Screen("__END_SCREEN__", new List<MenuItem>());
     currentUI = SimpleUI.InitUI();
 }