Example #1
0
 public override void show()
 {
     base.show();
     printFile();
     superScrollView.selectedString = Config.Get("deckInUse", "miaowu");
     superScrollView.toTop();
     Program.charge();
 }
Example #2
0
 private void printFile()
 {
     superScrollView.clear();
     superScrollView.toTop();
     if (hideAI)
     {
         listOfRooms.RemoveAll(s => s[11].Contains("AI"));
     }
     if (hideStarted)
     {
         listOfRooms.RemoveAll(s => Convert.ToInt32(s[10]) != 0);
     }
     listOfRooms.TrimExcess();
     listOfRooms = listOfRooms.OrderBy(s => s[3]).ToList();
     foreach (string[] room in listOfRooms)
     {
         superScrollView.add(room[9]);
     }
 }
Example #3
0
    void ini()
    {
        for (int i = 0; i < 4; i++)
        {
            roomPlayers[i] = null;
        }
        if (gameObject != null)
        {
            ES_quit();
        }
        MonoBehaviour.DestroyImmediate(gameObject);
        if (mode == 2)
        {
            createWindow(Program.I().remaster_tagRoom);
        }
        else
        {
            createWindow(Program.I().remaster_room);
        }
        lazyRoom = gameObject.GetComponent <lazyRoom>();
        fixScreenProblem();
        superScrollView = gameObject.GetComponentInChildren <UIselectableList>();
        superScrollView.selectedAction = onSelected;
        superScrollView.install();
        printFile();
        superScrollView.selectedString = Config.Get("deckInUse", "miaowu");
        superScrollView.toTop();
        if (mode == 0)
        {
            UIHelper.trySetLableText(gameObject, "Rname_", InterString.Get("单局房间"));
        }
        if (mode == 1)
        {
            UIHelper.trySetLableText(gameObject, "Rname_", InterString.Get("比赛房间"));
        }
        if (mode == 2)
        {
            UIHelper.trySetLableText(gameObject, "Rname_", InterString.Get("双打房间"));
        }

        UIHelper.trySetLableText(gameObject, "description_", "");
        for (int i = 0; i < 4; i++)
        {
            realPlayers[i] = UIHelper.getByName <lazyPlayer>(gameObject, i.ToString());
        }

        for (int i = 0; i < 4; i++)
        {
            realPlayers[i].ini();
            realPlayers[i].onKick           = OnKick;
            realPlayers[i].onPrepareChanged = onPrepareChanged;
        }

        UIHelper.shiftButton(startButton(), false);
        UIHelper.registUIEventTriggerForClick(startButton().gameObject, listenerForClicked);
        UIHelper.registUIEventTriggerForClick(exitButton().gameObject, listenerForClicked);
        UIHelper.registUIEventTriggerForClick(duelistButton().gameObject, listenerForClicked);
        UIHelper.registUIEventTriggerForClick(observerButton().gameObject, listenerForClicked);
        UIHelper.registUIEventTriggerForClick(readyButton().gameObject, listenerForClicked);
        realize();
        superScrollView.refreshForOneFrame();
    }
Example #4
0
 void onSearch()
 {
     printFile();
     superScrollView.toTop();
 }