Beispiel #1
0
        public CMatchStartLayer()
        {
            this.m_sprMatchGold = new Sprite[9];
            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(14, 15));

            m_btnStart = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_match_start_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_start_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_start_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_start_disable"));
            m_btnStart.set_tag(10300);
            m_btnStart.set_position(new Point(0, 0));
            m_btnStart.set_content_size(new Size(354, 46));
            m_btnStart.add_listener(this);

            m_sprBackground = new Sprite();
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < 9; i++)
            {
                m_sprMatchGold[i] = new Sprite();
                add_child(m_sprMatchGold[i]);
            }

            for (int i = 0; i < 9; i++)
            {
                m_sprMatchGold[i].set_position(new Point(136 + i * 16, 138));
            }
        }
Beispiel #2
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnStart.set_position(new Point(pt.x_ + 6, pt.y_ + 164));
        }
Beispiel #3
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnEnter.set_position(new Point(pt.x_ + 248, pt.y_ + 188));
        }
Beispiel #4
0
        public CGameEndLayer()
        {
            this.m_sprCurGateGold = new Sprite[9];
            m_Font = Root.instance().font_manager().create_font_ttf("宋体", "fish\\simsun.ttc");
            m_Font.set_size(new Size(28, 32));

            m_btnCance = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_restart_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_restart_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_restart_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_restart_disable"));
            m_btnCance.set_tag(10400);
            m_btnCance.set_position(new Point(0, 0));
            m_btnCance.set_content_size(new Size(148, 51));
            m_btnCance.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("gate_end_back"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < 9; i++)
            {
                m_sprCurGateGold[i] = new Sprite();
                add_child(m_sprCurGateGold[i]);
            }

            for (int i = 0; i < 9; i++)
            {
                m_sprCurGateGold[i].set_position(new Point(240 + i * 16, 122));
            }

            m_nCurGateGoldCount = 0;
        }
Beispiel #5
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnCance.set_position(new Point(pt.x_ + 218, pt.y_ + 138));
        }
Beispiel #6
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnExit.set_position(new Point(pt.x_ + 73, pt.y_ + 300));
        }
        public CReMatchStartLayer()
        {
            m_Font = Root.instance().font_manager().create_font_ttf("黑体", "fish\\simsun.ttc");
            m_Font.set_size(new Size(20, 22));

            m_btnCance = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_match_cancel_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_cancel_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_cancel_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_cancel_disable"));
            m_btnCance.set_tag(10200);
            m_btnCance.set_position(new Point(0, 0));
            m_btnCance.set_content_size(new Size(104, 21));
            m_btnCance.add_listener(this);

            m_btnReMatch = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_match_restart_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_restart_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_restart_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_restart_disable"));
            m_btnReMatch.set_tag(10201);
            m_btnReMatch.set_position(new Point(0, 0));
            m_btnReMatch.set_content_size(new Size(104, 21));
            m_btnReMatch.add_listener(this);

            m_btnShow = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_match_watch_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_watch_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_watch_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_match_watch_disable"));
            m_btnShow.set_tag(10202);
            m_btnShow.set_position(new Point(0, 0));
            m_btnShow.set_content_size(new Size(104, 21));
            m_btnShow.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("match_reset_image"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            m_sprResult = new Sprite();
            m_sprResult.set_position(new Point(0, 0));
            add_child(m_sprResult);
        }
Beispiel #8
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnCance.set_position(new Point(pt.x_ + 120, pt.y_ + 288));
            m_btnMatch.set_position(new Point(pt.x_ + 310, pt.y_ + 288));
        }
Beispiel #9
0
        public CSettingLayer()
        {
            this.m_bDragging = false;
            m_btnCancle      = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_cancle_image"), Root.instance().imageset_manager().imageset("setting").image("btn_cancle_over"), Root.instance().imageset_manager().imageset("setting").image("btn_cancle_down"), Root.instance().imageset_manager().imageset("setting").image("btn_cancle_disable"));
            m_btnCancle.set_tag(11010);
            m_btnCancle.set_position(new Point(388 + 56, 257 + 160));
            m_btnCancle.set_content_size(new Size(104, 52));
            m_btnCancle.add_listener(this);

            m_btnOk = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_ok_image"), Root.instance().imageset_manager().imageset("setting").image("btn_ok_over"), Root.instance().imageset_manager().imageset("setting").image("btn_ok_down"), Root.instance().imageset_manager().imageset("setting").image("btn_ok_disable"));
            m_btnOk.set_tag(11012);
            m_btnOk.set_position(new Point(388 + 180, 257 + 160));
            m_btnOk.set_content_size(new Size(104, 52));
            m_btnOk.add_listener(this);

            m_btnMinus = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_minus_image"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_over"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_down"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_disable"));
            m_btnMinus.set_tag(11013);
            m_btnMinus.set_position(new Point(388 + 20, 257 + 110));
            m_btnMinus.set_content_size(new Size(42, 42));
            m_btnMinus.add_listener(this);

            m_btnAdd = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_add_image"), Root.instance().imageset_manager().imageset("setting").image("btn_add_over"), Root.instance().imageset_manager().imageset("setting").image("btn_add_down"), Root.instance().imageset_manager().imageset("setting").image("btn_add_disable"));
            m_btnAdd.set_tag(11014);
            m_btnAdd.set_position(new Point(388 + 442, 257 + 110));
            m_btnAdd.set_content_size(new Size(42, 42));
            m_btnAdd.add_listener(this);

            m_sldNumber = new Slider_Widget(null, Root.instance().imageset_manager().imageset("setting").image("slider_thumb"), Root.instance().imageset_manager().imageset("setting").image("slider_image"));
            m_sldNumber.set_tag(11015);
            m_sldNumber.set_position(new Point(388 + 70, 257 + 110));
            m_sldNumber.set_content_size(new Size(372, 45));
            m_sldNumber.add_listener(slider_value);
            //pakcj m_sldNumber.set_value(theApp.GetMusicVolume());

            m_btnMinus1 = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_minus_image"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_over"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_down"), Root.instance().imageset_manager().imageset("setting").image("btn_minus_disable"));
            m_btnMinus1.set_tag(11016);
            m_btnMinus1.set_position(new Point(388 + 20, 257 + 110));
            m_btnMinus1.set_content_size(new Size(42, 42));
            m_btnMinus1.add_listener(this);

            m_btnAdd1 = new Button_Widget(Root.instance().imageset_manager().imageset("setting").image("btn_add_image"), Root.instance().imageset_manager().imageset("setting").image("btn_add_over"), Root.instance().imageset_manager().imageset("setting").image("btn_add_down"), Root.instance().imageset_manager().imageset("setting").image("btn_add_disable"));
            m_btnAdd1.set_tag(11017);
            m_btnAdd1.set_position(new Point(388 + 442, 257 + 110));
            m_btnAdd1.set_content_size(new Size(42, 42));
            m_btnAdd1.add_listener(this);

            m_sldNumber1 = new Slider_Widget(null, Root.instance().imageset_manager().imageset("setting").image("slider_thumb"), Root.instance().imageset_manager().imageset("setting").image("slider_image"));
            m_sldNumber1.set_tag(11018);
            m_sldNumber1.set_position(new Point(388 + 70, 257 + 110));
            m_sldNumber1.set_content_size(new Size(372, 45));
            m_sldNumber1.add_listener(slider_value);
            //pakcj m_sldNumber1.set_value(theApp.GetSoundVolume());


            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("setting").image("bg"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);
        }
Beispiel #10
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnMessageHide.set_position(new Point(pt.x_, pt.y_));
            m_btnMessageSend.set_position(new Point(pt.x_ + 257, pt.y_));
            CGameScene pGameScene = (CGameScene)parent();
            //pakcj global::MoveWindow(pGameScene.GetClientKernel().m_hWndEdit,pt.x_ + 32,pt.y_ + 8,222,18,1);
        }
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnCance.set_position(new Point(pt.x_ + 81, pt.y_ + 158));
            m_btnReMatch.set_position(new Point(pt.x_ + 189, pt.y_ + 158));
            m_btnShow.set_position(new Point(pt.x_ + 298, pt.y_ + 158));
            m_sprResult.set_position(new Point(pt.x_ - 168, pt.y_ - 90));
        }
Beispiel #12
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnCancle.set_position(new Point(pt.x_ + 56, pt.y_ + 160));
            m_btnMax.set_position(new Point(pt.x_ + 350, pt.y_ + 160));
            m_btnOk.set_position(new Point(pt.x_ + 180, pt.y_ + 160));
            m_btnMinus.set_position(new Point(pt.x_ + 20, pt.y_ + 110));
            m_btnAdd.set_position(new Point(pt.x_ + 442, pt.y_ + 110));
            m_sldNumber.set_position(new Point(pt.x_ + 70, pt.y_ + 110));
        }
Beispiel #13
0
        public CMatchAgainLayer()
        {
            this.m_sprCurGate      = new Sprite[2];
            this.m_sprCurGateGold  = new Sprite[9];
            this.m_sprNextGateGold = new Sprite[9];
            m_Font = Root.instance().font_manager().create_font_ttf("宋体", "fish\\simsun.ttc");
            m_Font.set_size(new Size(28, 32));

            m_btnCance = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_end_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_end_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_end_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_end_disable"));
            m_btnCance.set_tag(10300);
            m_btnCance.set_position(new Point(0, 0));
            m_btnCance.set_content_size(new Size(148, 51));
            m_btnCance.add_listener(this);

            m_btnMatch = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_continue_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_continue_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_continue_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_continue_disable"));
            m_btnMatch.set_tag(10301);
            m_btnMatch.set_position(new Point(0, 0));
            m_btnMatch.set_content_size(new Size(148, 51));
            m_btnMatch.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("gate_continue_back"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < 9; i++)
            {
                m_sprCurGateGold[i] = new Sprite();
                add_child(m_sprCurGateGold[i]);

                m_sprNextGateGold[i] = new Sprite();
                add_child(m_sprNextGateGold[i]);
            }

            for (int i = 0; i < 9; i++)
            {
                m_sprCurGateGold[i].set_position(new Point(322 + i * 16, 220));
                m_sprNextGateGold[i].set_position(new Point(322 + i * 16, 182));
            }

            for (int i = 0; i < 2; i++)
            {
                m_sprCurGate[i] = new Sprite();
                add_child(m_sprCurGate[i]);
            }

            for (int i = 0; i < 2; i++)
            {
                m_sprCurGate[i].set_position(new Point(295 + i * 16, 106));
            }

            m_nCurGateGoldCount  = 0;
            m_nNextGateGoldCount = 0;
        }
Beispiel #14
0
        public CHelpLayer()
        {
            m_btnExit = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_disable"));
            m_btnExit.set_tag(10200);
            m_btnExit.set_position(new Point(73, 300));
            m_btnExit.set_content_size(new Size(76, 27));
            m_btnExit.add_listener(this);


            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("help_show_image"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);
        }
Beispiel #15
0
        public void resize(Point pt, Size size)
        {
            base.resize(pt, size);

            set_position(pt);
            m_btnCancle.set_position(new Point(pt.x_ + 270, pt.y_ + 200));
            m_btnOk.set_position(new Point(pt.x_ + 120, pt.y_ + 200));
            m_btnMinus.set_position(new Point(pt.x_ + 20, pt.y_ + 80));
            m_btnAdd.set_position(new Point(pt.x_ + 442, pt.y_ + 80));
            m_sldNumber.set_position(new Point(pt.x_ + 66, pt.y_ + 80));
            m_btnMinus1.set_position(new Point(pt.x_ + 20, pt.y_ + 134));
            m_btnAdd1.set_position(new Point(pt.x_ + 442, pt.y_ + 134));
            m_sldNumber1.set_position(new Point(pt.x_ + 66, pt.y_ + 134));
        }
Beispiel #16
0
        public CMeUserInfoLayer()
        {
            m_ptDown = new Point(196, -116);
            m_ptUp   = new Point(196, 32);

            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(14, 15));

            m_btnAccount = new Button_Widget(Root.instance().imageset_manager().imageset("role").image("btn_account_image"), Root.instance().imageset_manager().imageset("role").image("btn_account_over"), Root.instance().imageset_manager().imageset("role").image("btn_account_down"), Root.instance().imageset_manager().imageset("role").image("btn_account_disable"));
            m_btnAccount.set_tag(10100);
            m_btnAccount.set_position(new Point(514, 560));
            m_btnAccount.set_content_size(new Size(76, 27));
            m_btnAccount.add_listener(this);

            m_btnBullet = new Button_Widget(Root.instance().imageset_manager().imageset("role").image("btn_buy_image"), Root.instance().imageset_manager().imageset("role").image("btn_buy_over"), Root.instance().imageset_manager().imageset("role").image("btn_buy_down"), Root.instance().imageset_manager().imageset("role").image("btn_buy_disable"));
            m_btnBullet.set_tag(10101);
            m_btnBullet.set_position(new Point(514, 560));
            m_btnBullet.set_content_size(new Size(76, 27));
            m_btnBullet.add_listener(this);

            m_btnDown = new Button_Widget(Root.instance().imageset_manager().imageset("role").image("btn_me_info_down_image"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_down_over"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_down_down"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_down_disable"));
            m_btnDown.set_tag(10102);
            m_btnDown.set_position(new Point(514, 560));
            m_btnDown.set_content_size(new Size(86, 15));
            m_btnDown.set_visible(false);
            m_btnDown.add_listener(this);

            m_btnUp = new Button_Widget(Root.instance().imageset_manager().imageset("role").image("btn_me_info_up_image"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_up_over"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_up_down"), Root.instance().imageset_manager().imageset("role").image("btn_me_info_up_disable"));
            m_btnUp.set_tag(10103);
            m_btnUp.set_position(new Point(514, 560));
            m_btnUp.set_content_size(new Size(86, 15));
            m_btnUp.set_visible(true);
            m_btnUp.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("role").image("btn_me_info_image"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(15, 16));

            m_bIsOk = false;
        }
Beispiel #17
0
        public CMessageLayer()
        {
            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(14, 15));

            m_btnMessageHide = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_message_hide_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_hide_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_hide_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_hide_disable"));
            m_btnMessageHide.set_tag(10200);
            m_btnMessageHide.set_position(new Point(0, 0));
            m_btnMessageHide.set_content_size(new Size(29, 30));
            m_btnMessageHide.add_listener(this);

            m_btnMessageSend = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_message_send_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_send_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_send_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_send_disable"));
            m_btnMessageSend.set_tag(10201);
            m_btnMessageSend.set_position(new Point(0, 0));
            m_btnMessageSend.set_content_size(new Size(29, 30));
            m_btnMessageSend.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("message_back_image"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);
        }
Beispiel #18
0
        public CGateHelpLayer()
        {
            this.m_sprFishGold = new Sprite[9];
            this.m_sprGetGold  = new Sprite[9];
            this.m_sprCurGate  = new Sprite[2];
            this.m_sprAllGate  = new Sprite[2];
            m_Font             = Root.instance().font_manager().create_font_ttf("宋体", "fish\\simsun.ttc");
            m_Font.set_size(new Size(28, 32));

            m_btnEnter = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_help_exit_disable"));
            m_btnEnter.set_tag(10500);
            m_btnEnter.set_position(new Point(0, 0));
            m_btnEnter.set_content_size(new Size(148, 51));
            m_btnEnter.add_listener(this);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_load").image("gate_help_back"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < 9; i++)
            {
                m_sprFishGold[i] = new Sprite();
                add_child(m_sprFishGold[i]);

                m_sprGetGold[i] = new Sprite();
                add_child(m_sprGetGold[i]);
            }

            for (int i = 0; i < 2; i++)
            {
                m_sprCurGate[i] = new Sprite();
                add_child(m_sprCurGate[i]);

                m_sprAllGate[i] = new Sprite();
                add_child(m_sprAllGate[i]);
            }

            m_nFishGoldCount = 0;
            m_nGetGoldCount  = 0;
        }
Beispiel #19
0
        public CBuyBulletLayer()
        {
            this.m_sprFishGold  = new Sprite[9];
            this.m_sprGameGold  = new Sprite[9];
            this.m_nFishGold    = 0;
            this.m_nGameGold    = 0;
            this.m_bDragging    = false;
            this.m_lCellScore   = 1;
            this.m_bSendMessage = false;
            //m_Font = Root::instance()->font_manager()->create_font_ttf("simsun", "fish\\simsun.ttc");
            //m_Font->set_size(new Size(14,15));

            m_btnCancle = new Button_Widget(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_cancle_image"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_cancle_over"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_cancle_down"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_cancle_disable"));
            m_btnCancle.set_tag(10010);
            m_btnCancle.set_position(new Point(388 + 56 + 32, 257 + 160));
            m_btnCancle.set_content_size(new Size(104, 52));
            m_btnCancle.add_listener(this);

            m_btnMax = new Button_Widget(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_max_image"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_max_over"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_max_down"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_max_disable"));
            m_btnMax.set_tag(10011);
            m_btnMax.set_position(new Point(388 + 350 + 32, 257 + 160));
            m_btnMax.set_content_size(new Size(104, 52));
            m_btnMax.add_listener(this);

            m_btnOk = new Button_Widget(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_ok_image"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_ok_over"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_ok_down"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_ok_disable"));
            m_btnOk.set_tag(10012);
            m_btnOk.set_position(new Point(388 + 180 + 32, 257 + 160));
            m_btnOk.set_content_size(new Size(148, 52));
            m_btnOk.add_listener(this);

            m_btnMinus = new Button_Widget(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_minus_image"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_minus_over"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_minus_down"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_minus_disable"));
            m_btnMinus.set_tag(10013);
            m_btnMinus.set_position(new Point(388 + 20 + 32, 257 + 110));
            m_btnMinus.set_content_size(new Size(42, 42));
            m_btnMinus.add_listener(this);

            m_btnAdd = new Button_Widget(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_add_image"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_add_over"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_add_down"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_add_disable"));
            m_btnAdd.set_tag(10014);
            m_btnAdd.set_position(new Point(388 + 442 + 32, 257 + 110));
            m_btnAdd.set_content_size(new Size(42, 42));
            m_btnAdd.add_listener(this);

            m_sldNumber = new Slider_Widget(null, Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_slider_thumb"), Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_slider_image"));
            m_sldNumber.set_tag(10015);
            m_sldNumber.set_position(new Point(388 + 70 + 32, 257 + 110));
            m_sldNumber.set_content_size(new Size(370, 45));
            m_sldNumber.add_listener(slider_value);

            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("ui_game").image("buy_bullet_bg"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < 9; i++)
            {
                m_sprFishGold[i] = new Sprite();
                add_child(m_sprFishGold[i]);
            }

            for (int i = 0; i < 9; i++)
            {
                m_sprGameGold[i] = new Sprite();
                add_child(m_sprGameGold[i]);
            }

            for (int i = 0; i < 9; i++)
            {
                m_sprFishGold[i].set_position(new Point(98 + i * 16, 76));
                m_sprGameGold[i].set_position(new Point(356 + i * 16, 76));
            }

            SetFishGold(100);
            SetGameGold(100 * m_lCellScore);

            m_nMaxFishGold    = 10;
            m_nMaxBuyFishGold = 10;
        }
Beispiel #20
0
        public CFrameLayer(int nScene)
        {
            string ui;

            if (nScene == 0)
            {
                ui = "ui_load";
            }
            else
            {
                ui = "ui_game";
            }

            m_nScene = nScene;

            image_tl_ = Root.instance().imageset_manager().imageset(ui).image("frame_tl_");
            image_tm_ = Root.instance().imageset_manager().imageset(ui).image("frame_tm_");
            image_tr_ = Root.instance().imageset_manager().imageset(ui).image("frame_tr_");
            image_ml_ = Root.instance().imageset_manager().imageset(ui).image("frame_ml_");
            image_mr_ = Root.instance().imageset_manager().imageset(ui).image("frame_mr_");
            image_bl_ = Root.instance().imageset_manager().imageset(ui).image("frame_bl_");
            image_bm_ = Root.instance().imageset_manager().imageset(ui).image("frame_bm_");
            image_br_ = Root.instance().imageset_manager().imageset(ui).image("frame_br_");

            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(14, 15));

            m_btnClose = new Button_Widget(Root.instance().imageset_manager().imageset(ui).image("btn_close_image"), Root.instance().imageset_manager().imageset(ui).image("btn_close_over"), Root.instance().imageset_manager().imageset(ui).image("btn_close_down"), Root.instance().imageset_manager().imageset(ui).image("btn_close_disable"));
            m_btnClose.set_tag(10000);
            m_btnClose.set_position(new Point(1280 - 54, 4));
            m_btnClose.set_content_size(new Size(41, 24));
            m_btnClose.add_listener(this);
            m_btnClose.set_visible(false);

            m_btnMax = new Button_Widget(Root.instance().imageset_manager().imageset(ui).image("btn_max_image"), Root.instance().imageset_manager().imageset(ui).image("btn_max_over"), Root.instance().imageset_manager().imageset(ui).image("btn_max_down"), Root.instance().imageset_manager().imageset(ui).image("btn_max_disable"));
            m_btnMax.set_tag(10001);
            m_btnMax.set_position(new Point(1280 - 54 - 30, 4));
            m_btnMax.set_content_size(new Size(29, 24));
            m_btnMax.add_listener(this);
            m_btnMax.set_visible(false);

            m_btnMin = new Button_Widget(Root.instance().imageset_manager().imageset(ui).image("btn_min_image"), Root.instance().imageset_manager().imageset(ui).image("btn_min_over"), Root.instance().imageset_manager().imageset(ui).image("btn_min_down"), Root.instance().imageset_manager().imageset(ui).image("btn_min_disable"));
            m_btnMin.set_tag(10002);
            m_btnMin.set_position(new Point(1280 - 54 - 30 - 33, 4));
            m_btnMin.set_content_size(new Size(32, 24));
            m_btnMin.add_listener(this);
            m_btnMin.set_visible(false);

            m_btnHelp = new Button_Widget(Root.instance().imageset_manager().imageset(ui).image("btn_help_image"), Root.instance().imageset_manager().imageset(ui).image("btn_help_over"), Root.instance().imageset_manager().imageset(ui).image("btn_help_down"), Root.instance().imageset_manager().imageset(ui).image("btn_help_disable"));
            m_btnHelp.set_tag(10003);
            m_btnHelp.set_position(new Point(1072 - 43, 4));
            m_btnHelp.set_content_size(new Size(42, 24));
            m_btnHelp.add_listener(this);
            m_btnHelp.set_visible(false);

            m_btnMessage = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_message_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_message_disable"));
            m_btnMessage.set_tag(10005);
            m_btnMessage.set_position(new Point(1072, 4));
            m_btnMessage.set_content_size(new Size(34, 24));
            m_btnMessage.add_listener(this);
            m_btnMessage.set_visible(false);

            m_btnSetting = new Button_Widget(Root.instance().imageset_manager().imageset(ui).image("btn_setting_image"), Root.instance().imageset_manager().imageset(ui).image("btn_setting_over"), Root.instance().imageset_manager().imageset(ui).image("btn_setting_down"), Root.instance().imageset_manager().imageset(ui).image("btn_setting_disable"));
            m_btnSetting.set_tag(10004);
            m_btnSetting.set_position(new Point(1072 + 34, 4));
            m_btnSetting.set_content_size(new Size(42, 24));
            m_btnSetting.add_listener(this);
            m_btnSetting.set_visible(false);

            m_btnShow = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_index_show_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_index_show_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_index_show_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_index_show_disable"));
            m_btnShow.set_tag(10008);
            m_btnShow.set_position(new Point(1072 - 160, -100));
            m_btnShow.set_content_size(new Size(85, 24));
            m_btnShow.add_listener(this);
            m_btnShow.set_visible(false);

            m_btnGateHelp = new Button_Widget(Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_help_image"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_help_over"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_help_down"), Root.instance().imageset_manager().imageset("ui_load").image("btn_gate_help_disable"));
            m_btnGateHelp.set_tag(10009);
            m_btnGateHelp.set_position(new Point(1072 - 160, -100));
            m_btnGateHelp.set_content_size(new Size(73, 24));
            m_btnGateHelp.add_listener(this);
            m_btnGateHelp.set_visible(false);
        }
Beispiel #21
0
        public void button_press(int tag)
        {
            if (tag == 10000)
            {
                if (m_nScene > 0)
                {
                    CGameScene pGameScene = (CGameScene)parent();
                    if (!pGameScene.m_layAccount.visible())
                    {
                        pGameScene.m_layBuyBulletLayer.ShowWidnow(false);
                        if (!pGameScene.m_ReMatchStart.visible())
                        {
                            pGameScene.m_layAccount.ShowWidnow(true);
                        }
                    }
                    ((CGameScene)parent()).window_closed(null);
                    Root.instance().queue_end_rendering();
                }
                else
                {
                    //theApp->stop_loading_thread();
                    Root.instance().queue_end_rendering();
                }
            }
            else if (tag == 10002)
            {
                //pakcj ShowWindow(Root.instance().render_window().window_handle(), SW_MINIMIZE);
            }
            else if (tag == 10004)
            {
                if (m_nScene > 0)
                {
                    CGameScene pGameScene = (CGameScene)parent();
                    if (!pGameScene.m_laySetting.visible())
                    {
                        pGameScene.m_laySetting.ShowWidnow(true);
                    }
                }
            }
            else if (tag == 10005)
            {
                CGameScene pGameScene = (CGameScene)parent();
                pGameScene.m_sendMessage.button_press(10202);
            }
            else if (tag == 10003)
            {
                CGameScene pGameScene = (CGameScene)parent();
                pGameScene.m_Help.Show(true);
            }
            else if (tag == 10008)
            {
                CGameScene pGameScene = (CGameScene)parent();
                //pakcj ShellExecute(null, "open", pGameScene.m_cbMatchIndexURL, null, null, SW_SHOWNORMAL);
            }
            else if (tag == 10009)
            {
                CGameScene pGameScene = (CGameScene)parent();
                if (pGameScene.m_dwRoomType == 3)
                {
                    if (pGameScene.m_MatchStart.visible() || pGameScene.m_MatchAgainLayer.visible() || pGameScene.m_GateEndLayer.visible())
                    {
                        pGameScene.m_GateHelpLayer.Show(false);
                    }
                    else
                    {
                        pGameScene.m_GateHelpLayer.Show(true);
                    }
                }
            }
            else if (tag == 10010)
            {
                CGameScene pGameScene = (CGameScene)parent();
                if ((pGameScene.m_dwRoomType == 0) || (pGameScene.m_dwRoomType == 3))
                {
                    m_btnShow.set_position(new Point(1072 - 160, -100));
                    m_btnShow.set_visible(false);

                    if (pGameScene.m_dwRoomType == 3)
                    {
                        m_btnGateHelp.set_visible(true);
                        m_btnGateHelp.set_position(new Point(1072 - 120, 4));
                    }
                }
                else if ((pGameScene.m_dwRoomType == 1) || (pGameScene.m_dwRoomType == 2))
                {
                    m_btnShow.set_visible(true);
                    m_btnShow.set_position(new Point(1072 - 142, 4));
                    m_btnGateHelp.set_position(new Point(1072 - 160, -100));
                    m_btnGateHelp.set_visible(false);
                }
            }
        }
Beispiel #22
0
        public CAccountLayer()
        {
            this.m_CaptureFishs = new int[15];
            m_Font = Root.instance().font_manager().create_font_ttf("simsun", "fish\\simsun.ttc");
            m_Font.set_size(new Size(14, 15));

            /*m_btnMatchAndExit = new Button_Widget(Root::instance()->imageset_manager()->imageset("account")->image("btn_match_and_exit_image"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_and_exit_over"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_and_exit_down"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_and_exit_disable"));
             * m_btnMatchAndExit->set_tag(10200);
             * m_btnMatchAndExit->set_position(new Point(514,560));
             * m_btnMatchAndExit->set_content_size(new Size(158,57));
             * m_btnMatchAndExit->add_listener(this);
             *
             * m_btnMatch = new Button_Widget(Root::instance()->imageset_manager()->imageset("account")->image("btn_match_image"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_over"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_down"),
             *  Root::instance()->imageset_manager()->imageset("account")->image("btn_match_disable"));
             * m_btnMatch->set_tag(10201);
             * m_btnMatch->set_position(new Point(514,560));
             * m_btnMatch->set_content_size(new Size(158,57));
             * m_btnMatch->add_listener(this);*/

            m_btnAccountAndExit = new Button_Widget(Root.instance().imageset_manager().imageset("account").image("btn_account_and_exit_image"), Root.instance().imageset_manager().imageset("account").image("btn_account_and_exit_over"), Root.instance().imageset_manager().imageset("account").image("btn_account_and_exit_down"), Root.instance().imageset_manager().imageset("account").image("btn_account_and_exit_disable"));
            m_btnAccountAndExit.set_tag(10200);
            m_btnAccountAndExit.set_position(new Point(360, 523));
            m_btnAccountAndExit.set_content_size(new Size(158, 57));
            m_btnAccountAndExit.add_listener(this);

            m_btnAccount = new Button_Widget(Root.instance().imageset_manager().imageset("account").image("btn_account_image"), Root.instance().imageset_manager().imageset("account").image("btn_account_over"), Root.instance().imageset_manager().imageset("account").image("btn_account_down"), Root.instance().imageset_manager().imageset("account").image("btn_account_disable"));
            m_btnAccount.set_tag(10201);
            m_btnAccount.set_position(new Point(540, 523));
            m_btnAccount.set_content_size(new Size(158, 57));
            m_btnAccount.add_listener(this);

            m_btnClose = new Button_Widget(Root.instance().imageset_manager().imageset("account").image("btn_close_image"), Root.instance().imageset_manager().imageset("account").image("btn_close_over"), Root.instance().imageset_manager().imageset("account").image("btn_close_down"), Root.instance().imageset_manager().imageset("account").image("btn_close_disable"));
            m_btnClose.set_tag(10202);
            m_btnClose.set_position(new Point(720, 523));
            m_btnClose.set_content_size(new Size(158, 57));
            m_btnClose.add_listener(this);


            m_sprBackground = new Sprite(Root.instance().imageset_manager().imageset("account").image("bg"));
            m_sprBackground.set_hot(new Point(0, 0));
            add_child(m_sprBackground);

            for (int i = 0; i < m_CaptureFishs.Length; i++)
            {
                m_CaptureFishs[i] = 0;
            }

            ostringstream ostr = new ostringstream();

            for (int i = 0; i < 10; i++)
            {
                ostr.str("");
                ostr           = ostr + "number_" + i;
                m_imgNumber[i] = Root.instance().imageset_manager().imageset("role").image(ostr.str());
            }

            for (int i = 0; i < 10; i++)
            {
                ostr.str("");
                ostr          = ostr + "time_" + i;
                m_imgTimer[i] = Root.instance().imageset_manager().imageset("account").image(ostr.str());
            }
        }