public static void Main()
        {
            Game.FrameRender += Process;

            tabView = new TabView("A RAGENativeUI Pause Menu");
            tabView.MoneySubtitle = "$10.000.000";

            Dictionary<string, string> listDict = new Dictionary<string, string>()
            {
                { "First Item", "Text filler" },
                { "Second Item", "Hey, here there's some text" },
                { "Third Item", "Duh!" },
            };
            tabView.Tabs.Add(simpleListTab = new TabItemSimpleList("A List", listDict));
            simpleListTab.Activated += SimpleListTab_Activated;

            List<MissionInformation> missionsInfo = new List<MissionInformation>()
            {
                new MissionInformation("Mission One", new Tuple<string, string>[] { new Tuple<string, string>("This the first info", "Random Info"), new Tuple<string, string>("This the second info", "Random Info #2") }),
                new MissionInformation("Mission Two", "I have description!", new Tuple<string, string>[] { new Tuple<string, string>("Objective", "Mission Two Objective") }),
            };
            tabView.Tabs.Add(missionSelectTab = new TabMissionSelectItem("I'm a Mission Select Tab", missionsInfo));
            missionSelectTab.OnItemSelect += MissionSelectTab_OnItemSelect;


            tabView.Tabs.Add(textTab = new TabTextItem("TabTextItem", "Text Tab Item", "I'm a text tab item"));
            textTab.Activated += TextTab_Activated;

            List<TabItem> items = new List<TabItem>();
            for (int i = 0; i < 10 ; i++)
            {
                TabItem tItem = new TabItem("Item #" + i);
                tItem.Activated += SubMenuItem_Activated;
                items.Add(tItem);
            }
            tabView.Tabs.Add(submenuTab = new TabSubmenuItem("A submenu", items));

            tabView.RefreshIndex();
           
            while (true)
                GameFiber.Yield();
        }
Exemple #2
0
 public void AddTab(TabItem item)
 {
     Tabs.Add(item);
     item.Parent = this;
 }