Exemple #1
0
    protected override void Awake()
    {
        base.Awake();
        recordButton.AddClickEvent(OnRecordButtonClick);
        emailInputButton.AddClickEvent(OnEmailInput);
        about_feeButton.AddClickEvent(OnAboutFeeClick);
        if (Master.IsBigScreen)
        {
            anchor_rect.localPosition -= new Vector3(0, Master.TopMoveDownOffset, 0);
            anchor_rect.sizeDelta     += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
            anchor_rect.GetComponentInChildren <ScrollRect>().normalizedPosition = Vector2.one;
        }

        pt_cashout_leftButton.GetComponentInChildren <Text>().text  = "$ " + 5;
        pt_cashout_midButton.GetComponentInChildren <Text>().text   = "$ " + 10;
        pt_cashout_rightButton.GetComponentInChildren <Text>().text = "$ " + 50;
        cashout_leftButton.GetComponentInChildren <Text>().text     = "$ " + Cashout_Nums[0];
        cashout_midButton.GetComponentInChildren <Text>().text      = "$ " + Cashout_Nums[1];
        cashout_rightButton.GetComponentInChildren <Text>().text    = "$ " + Cashout_Nums[2];

        pt_cashout_leftButton.AddClickEvent(() => { OnPtCashoutButtonClick(5); });
        pt_cashout_midButton.AddClickEvent(() => { OnPtCashoutButtonClick(10); });
        pt_cashout_rightButton.AddClickEvent(() => { OnPtCashoutButtonClick(50); });
        cashout_leftButton.AddClickEvent(() => { OnCashoutButtonClick(Cashout_Nums[0]); });
        cashout_midButton.AddClickEvent(() => { OnCashoutButtonClick(Cashout_Nums[1]); });
        cashout_rightButton.AddClickEvent(() => { OnCashoutButtonClick(Cashout_Nums[2]); });

        gold_redeemButton.AddClickEvent(OnGoldCashoutButtonClick);
    }
Exemple #2
0
    protected override void Awake()
    {
        base.Awake();
        coin_rankText   = coin_rankButton.GetComponent <Text>();
        ticket_rankText = ticket_rankButton.GetComponent <Text>();
        coin_rankButton.AddClickEvent(OnCoinRankClick);
        ticket_rankButton.AddClickEvent(OnTicketRnakClick);
        all_coin_ranks.Add(single_coin_rank);
        all_ticket_ranks.Add(single_ticket_rank);
        if (Master.IsBigScreen)
        {
            coin_rankButton.transform.localPosition   -= new Vector3(0, Master.TopMoveDownOffset);
            ticket_rankButton.transform.localPosition -= new Vector3(0, Master.TopMoveDownOffset);
            top_lineRect.transform.localPosition      -= new Vector3(0, Master.TopMoveDownOffset);

            coin_rank_topRect.localPosition -= new Vector3(0, Master.TopMoveDownOffset);
            coin_rank_topRect.sizeDelta     += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
            coin_rank_topRect.GetComponentInChildren <ScrollRect>().normalizedPosition = Vector2.one;
            ticket_rankRect.localPosition -= new Vector3(0, Master.TopMoveDownOffset);
            ticket_rankRect.sizeDelta     += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
            ticket_rankRect.GetComponentInChildren <ScrollRect>().normalizedPosition = Vector2.one;
        }

        OnCoinRankClick();
    }
Exemple #3
0
        void FillLogItem(object data, UIReferences refer)
        {
            GLog.LogItem item = data as GLog.LogItem;
            Text         txt  = refer.Get("Text") as Text;
            Image        img  = refer.Get(1) as Image;
            Button       btn  = refer.Get(2) as Button;

            txt.text    = item.ToString();
            img.enabled = showingLogs.IndexOf(item) % 2 == 0;
            btn.AddClickEvent(() => {
            });
            if (item.logType == LogType.Log)
            {
                txt.color = color_info;
            }
            else if (item.logType == LogType.Warning)
            {
                txt.color = color_warn;
            }
            else if (item.logType == LogType.Error)
            {
                txt.color = color_error;
            }
            else
            {
                txt.color = color_info;
            }
        }
Exemple #4
0
 protected override void Awake()
 {
     base.Awake();
     closeButton.AddClickEvent(ClosePop);
     sureButton.AddClickEvent(ClosePop);
     termsButton.AddClickEvent(OnTermsClick);
     cashoutButton.AddClickEvent(OnCashoutButtonClick);
 }
Exemple #5
0
 protected override void Awake()
 {
     base.Awake();
     closeButton.AddClickEvent(OnCloseButtonClick);
     confirm_accountButton.AddClickEvent(OnConfirmAccountClick);
     cashoutButton.AddClickEvent(OnCashoutClick);
     no_starButton.AddClickEvent(OnCloseButtonClick);
     yes_starButton.AddClickEvent(OnFiveStarClick);
 }
Exemple #6
0
 private void Awake()
 {
     canvasGroup      = GetComponent <CanvasGroup>();
     loadingText.text = "loading";
     StartCoroutine(LoadingSlider());
     contact_usButton.AddClickEvent(Setting.SendEmail);
     if (Master.IsBigScreen)
     {
         contact_usButton.transform.localPosition -= new Vector3(0, Master.TopMoveDownOffset, 0);
     }
 }
Exemple #7
0
 protected override void Awake()
 {
     base.Awake();
     getButton.AddClickEvent(OnGetButtonClick);
     endPos = new Vector2(-473.27f - 3, all_card_rootRect.localPosition.y);
     if (Master.IsBigScreen)
     {
         yesterday_ticket_numText.transform.parent.localPosition -= new Vector3(0, 100, 0);
         foreach (var rect in all_fly_cards)
         {
             rect.localPosition -= new Vector3(0, 100, 0);
         }
     }
 }
Exemple #8
0
 protected override void Awake()
 {
     base.Awake();
     backButton.AddClickEvent(OnBackButtonClick);
     direct_friendButton.AddClickEvent(OnDirectFriendButtonClick);
     indirect_friendButton.AddClickEvent(OnIndirectFriendButtonClick);
     if (Master.IsBigScreen)
     {
         allRect.sizeDelta     = new Vector2(allRect.sizeDelta.x, allRect.sizeDelta.y + Master.TopMoveDownOffset);
         bottomRect.sizeDelta += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
         viewport.sizeDelta   += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
     }
     all_friends.Add(single_friend_item);
 }
Exemple #9
0
    protected override void Awake()
    {
        base.Awake();
        nameInputfield.onValueChanged.AddListener(OnInputNameValueChanged);
        nameInputfield.onEndEdit.AddListener(OnInputNameEnd);
        helpButton.AddClickEvent(OnHelpButtonClick);
        if (Master.IsBigScreen)
        {
            allRect.localPosition -= new Vector3(0, Master.TopMoveDownOffset);
            viewport.sizeDelta    += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
        }

        all_avatar_items.Add(sigle_avatar_item);
    }
Exemple #10
0
 protected override void Awake()
 {
     base.Awake();
     helpButton.AddClickEvent(OnHelpClick);
     get_ticketsButton.AddClickEvent(OnGetTicketsClick);
     all_winner_items.Add(single_winner_item);
     if (Master.IsBigScreen)
     {
         RectTransform allRect = all_root.transform.parent as RectTransform;
         allRect.localPosition -= new Vector3(0, Master.TopMoveDownOffset, 0);
         allRect.sizeDelta     += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
         allRect.GetComponentInChildren <ScrollRect>().normalizedPosition = Vector2.one;
     }
 }
Exemple #11
0
    public Window(int x, int y, int width, int height, string name, Element windowContent)
        : base(x, y, width, height, true)
    {
        Text text = new Text(name);

        title = new Panel(x, y, width, TITLE_HEIGHT, text, 0, PepesComing.Sprite.DARK_RED);
        close = new Button("X", x + width - CLOSE_WIDTH, y, CLOSE_WIDTH, TITLE_HEIGHT);
        Layout layout = new VerticalLayout(width: width, height: height - TITLE_HEIGHT, padding: 30);

        layout.AddElements(windowContent);
        content = new Panel(x, y + TITLE_HEIGHT, width, height - TITLE_HEIGHT, layout, 30, PepesComing.Sprite.GREY);
        close.AddClickEvent(() => {
            IsVisible = false;
        });
    }
Exemple #12
0
 protected override void Awake()
 {
     base.Awake();
     backButton.AddClickEvent(OnBackButtonClick);
     helpButton.AddClickEvent(OnHelpButtonClick);
     cashoutButton.AddClickEvent(OnCashoutButtonClick);
     inviteButton.AddClickEvent(OnInviteButtonClick);
     myfriendsButton.AddClickEvent(OnMyfriendsButtonClick);
     all_invite_friend_items.Add(single_invite_record_item);
     if (Master.IsBigScreen)
     {
         topRect.sizeDelta   = new Vector2(topRect.sizeDelta.x, topRect.sizeDelta.y + Master.TopMoveDownOffset);
         viewport.sizeDelta += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
     }
     cashoutButton.gameObject.SetActive(Save.data.isPackB);
 }
Exemple #13
0
    protected override void Awake()
    {
        base.Awake();
        canvasGroup.alpha          = 0;
        canvasGroup.blocksRaycasts = false;
        canvasGroup.interactable   = false;
        cash_outButton.AddClickEvent(OnCashoutButtonClick);
        RectTransform allRect = transform.GetChild(0) as RectTransform;

        if (Master.IsBigScreen)
        {
            allRect.localPosition -= new Vector3(0, Master.TopMoveDownOffset, 0);
            allRect.sizeDelta     += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
        }
        allRect.GetComponentInChildren <ScrollRect>().normalizedPosition = Vector2.one;
        cash_outButton.gameObject.SetActive(Save.data.isPackB);
    }
Exemple #14
0
 protected override void Awake()
 {
     base.Awake();
     helpButton.AddClickEvent(OnHelpButtonClick);
     cashoutButton.AddClickEvent(OnCashoutButtonClick);
     adgemButton.AddClickEvent(OnAdgemButtonClick);
     isButton.AddClickEvent(OnISButtonClick);
     fyberButton.AddClickEvent(OnFyberButtonClick);
     if (Master.IsBigScreen)
     {
         topRect.sizeDelta       = new Vector2(topRect.sizeDelta.x, topRect.sizeDelta.y + Master.TopMoveDownOffset);
         viewportRect.sizeDelta += new Vector2(0, 1920 * (Master.ExpandCoe - 1) - Master.TopMoveDownOffset);
     }
     adgem_button_contentText.text = Ads._instance.CheckOfferwallAvailable(Offerwall_Co.AdGem) ? ready : loading;
     is_button_contentText.text    = Ads._instance.CheckOfferwallAvailable(Offerwall_Co.IS) ? ready : loading;
     fyber_button_contentText.text = Ads._instance.CheckOfferwallAvailable(Offerwall_Co.Fyber) ? ready : loading;
     StartCoroutine("UpdateOfferwallState");
 }
Exemple #15
0
 private void Awake()
 {
     canvasGroup = GetComponent <CanvasGroup>();
     cashButton.AddClickEvent(OnCashButtonClick);
     offerwallButton.AddClickEvent(OnOfferwallButtonClick);
     rankButton.AddClickEvent(OnRankButtonClick);
     slotsButton.AddClickEvent(OnSlotsButtonClick);
     lotteryButton.AddClickEvent(OnLotteryButtonClick);
     firendButton.AddClickEvent(OnFriendButtonClick);
     settingButton.AddClickEvent(OnSettingButtonClick);
     add_ticketButton.AddClickEvent(OnAddTicketButtonClick);
     backButton.AddClickEvent(OnBackButtonClick);
     play_slots_helpButton.AddClickEvent(OnPlayslotsHelpButtonClick);
     fly_target_dic.Add(Reward.Gold, gold_numText.transform.parent);
     fly_target_dic.Add(Reward.Cash, cash_numText.transform.parent);
     fly_target_dic.Add(Reward.Ticket, ticket_numText.transform.parent);
     if (Master.IsBigScreen)
     {
         RectTransform topRect = all_topGo.transform as RectTransform;
         topRect.sizeDelta = new Vector2(topRect.sizeDelta.x, topRect.sizeDelta.y + 100);
     }
 }
Exemple #16
0
 private void Awake()
 {
     canvasGroup   = GetComponent <CanvasGroup>();
     panelStartPos = new Vector3(-1080 / 2 - panelRect.sizeDelta.x, 0);
     panelEndPos   = new Vector3(-1080 / 2, 0);
     if (Master.IsBigScreen)
     {
         top_baseRect.sizeDelta += new Vector2(0, Master.TopMoveDownOffset);
     }
     canvasGroup.alpha          = 0;
     canvasGroup.blocksRaycasts = false;
     bgImage.color           = bgStartColor;
     panelRect.localPosition = panelStartPos;
     bgButton.AddClickEvent(OnBgClick);
     meButton.AddClickEvent(OnMeButtonClick);
     withdrawButton.AddClickEvent(OnWithdrawClick);
     tasksButton.AddClickEvent(OnTasksClick);
     rulesButton.AddClickEvent(OnRulesClick);
     soundButton.AddClickEvent(OnSoundClick);
     musicButton.AddClickEvent(OnMusicClick);
     emailButton.AddClickEvent(OnEmailClick);
     withdrawButton.gameObject.SetActive(Save.data.isPackB);
 }
Exemple #17
0
 protected override void Awake()
 {
     base.Awake();
     double_getButton.AddClickEvent(OnDoublegetButtonClick);
     nothanksButton.AddClickEvent(OnNothanksButtonClick);
 }
Exemple #18
0
        public UiManager()
        {
            elements = new List <Element>();

            Text title = new Text("Maze Solver");

            // Algorithums
            VerticalLayout algorithms = new VerticalLayout(height: 430, padding: 10);

            WallFollower   = new Button("Wall Follower");
            RandomMouser   = new Button("Random Mouser");
            DeadEndFilling = new Button("Dead-End Filling");
            Recursive      = new Button("Recursive");
            algorithms.AddElements(WallFollower, RandomMouser, DeadEndFilling, Recursive);



            HeightSlider = new Slider(height: 25, steps: 15, currentValue: 7);
            Text             heightText   = new Text("Height: ");
            HorizontalLayout heightLayout = new HorizontalLayout(height: 25);

            heightLayout.AddElements(heightText, HeightSlider);

            WidthSlider = new Slider(height: 25, steps: 15, currentValue: 7);
            Text             widthText   = new Text("Width: ");
            HorizontalLayout widthLayout = new HorizontalLayout(height: 25);

            widthLayout.AddElements(widthText, WidthSlider);

            Regenerate = new Button("Generate", height: 30);
            Regenerate.AddClickEvent(() => {
                mazeResizer.IsVisible = false;
            });

            VerticalLayout windowLayout = new VerticalLayout(padding: 50, maximize: false);

            windowLayout.AddElements(heightLayout, widthLayout, Regenerate);


            mazeResizer = new Window(200, 200, 500, 200, "Choose Maze Size", windowLayout);
            elements.Add(mazeResizer);

            elements.ForEach(e => e.CalculateLayout());

            GenerateMaze = new Button("Generate new maze", height: 100);
            GenerateMaze.AddClickEvent(() => {
                mazeResizer.IsVisible = true;
            });

            Play    = new ToggleButton("Step", "Play");
            Forward = new Button(">");
            HorizontalLayout stepControl = new HorizontalLayout(height: 100, padding: 10);

            stepControl.AddElements(Play, Forward);

            VerticalLayout layout = new VerticalLayout(maximize: false, padding: 10);

            layout.AddElements(title, algorithms, GenerateMaze, stepControl);

            sidebar = new Panel(0, 0, 300, 100, layout, 10, Sprite.GREY);
            elements.Add(sidebar);
        }
Exemple #19
0
 protected override void Awake()
 {
     base.Awake();
     bgButton.AddClickEvent(OnBgClick);
 }
Exemple #20
0
 private void Awake()
 {
     button.AddClickEvent(OnClick);
 }
Exemple #21
0
 protected override void Awake()
 {
     base.Awake();
     SaveInButton.AddClickEvent(OnSaveButtonClick);
 }
Exemple #22
0
 private void Awake()
 {
     Instance = this;
     GetAdID();
     retryButton.AddClickEvent(OnRetryButtonClick);
 }
Exemple #23
0
 private void Awake()
 {
     getButton.AddClickEvent(OnGetButtonClick);
 }
Exemple #24
0
 protected override void Awake()
 {
     base.Awake();
     double_rewardButton.AddClickEvent(OnDoubleClick);
     single_rewardButton.AddClickEvent(OnSingleClick);
 }
Exemple #25
0
 private void Awake()
 {
     helpButton.AddClickEvent(OnHelpButtonClick);
 }
Exemple #26
0
 private void Awake()
 {
     headButton.AddClickEvent(OnChangeHead);
 }