[Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2]

Page 18 of 18 FirstFirst ... 8101112131415161718
Results 426 to 436 of 436
  1. #426
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts
    [报价=拉链20032;9166656]它在源代码中。搜索此变量 szServerIpAddress。

    char *szServerIpAddress = lpszServerIPAddresses[SELECTED_LANGUAGE];

    此代码根据所选语言定义从某个静态定义中获取 IP。
    您需要检查您在源中选择的语言以及将 IP 分配给 szServerIpAddress 变量的位置。源中设置了许多 IP。[/引用]


    与此主对应的版本号和序列号是什么?
    连接后提示游戏版本不正确
    Last edited by aiqiji; 1 Week Ago at 12:00 PM.

  2. #427
    Member RealCoderZ is offline
    MemberRank
    Apr 2015 Join Date
    31Posts
    Quote Originally Posted by aiqiji View Post
    [GameServerInfo]
    ClientExeSerial = fdUiqE28nKN324vH
    ClientExeVersion = 1.03.34

    What is the version number and serial number corresponding to this main?
    After connecting, it prompts that the game version is incorrect
    Search in WSclient.cpp
    BYTE Version[SIZE_PROTOCOLVERSION]

    you will find there

  3. #428
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts
    Quote Originally Posted by RealCoderZ View Post
    Search in WSclient.cpp
    BYTE Version[SIZE_PROTOCOLVERSION]

    you will find there

    What server are you using? Can you share it? I can't log in with the louls server. The GS of the Original WZ Sources 1.00.98 I compiled cannot be connected. After entering the account password, it is stuck. The GS prompt is as follows

    14:19:50 connect : [9000][107.173.14.14]
    14:19:59 join send : (9000)louismk
    error-L2 : User who is not authenticated requested character list?? ...\GameServer\GameServer\DSProtocol.cpp 1718
    WSARecv() failed with error 10038
    14:19:59 (9000)logout : louismk [107.173.14.14]
    Whole connection closed


  4. #429
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts



    Can you upload the 【CNewUICheckBox】 class and the 【MoveTextPos】 function?




    Quote Originally Posted by Odisk View Post


    By takumi12

    MUHELPER

    NewUIMuHelper.h
    Code:
    #pragma once
    #include "NewUIBase.h"
    #include "NewUIManager.h"
    #include "NewUIButton.h"
    
    namespace SEASON3B
    {
        class CNewUIMuHelper : public CNewUIObj
        {
        public:
            enum IMAGE_LIST
            {
    
                IMAGE_BASE_WINDOW_BACK = CNewUIMessageBoxMng::IMAGE_MSGBOX_BACK,                //. newui_msgbox_back.jpg
                IMAGE_BASE_WINDOW_TOP = CNewUIMyInventory::IMAGE_INVENTORY_BACK_TOP,            //. newui_item_back01.tga    (190,64)
                IMAGE_BASE_WINDOW_LEFT = CNewUIMyInventory::IMAGE_INVENTORY_BACK_LEFT,        //. newui_item_back02-l.tga    (21,320)
                IMAGE_BASE_WINDOW_RIGHT = CNewUIMyInventory::IMAGE_INVENTORY_BACK_RIGHT,        //. newui_item_back02-r.tga    (21,320)
                IMAGE_BASE_WINDOW_BOTTOM = CNewUIMyInventory::IMAGE_INVENTORY_BACK_BOTTOM,    //. newui_item_back03.tga    (190,45)
                IMAGE_BASE_WINDOW_BTN_EXIT = CNewUIMyInventory::IMAGE_INVENTORY_EXIT_BTN,        //. newui_exit_00.tga
                //--
                IMAGE_TABLE_TOP_LEFT = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_TOP_LEFT,            //. newui_item_table01(L).tga (14,14)
                IMAGE_TABLE_TOP_RIGHT = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_TOP_RIGHT,            //. newui_item_table01(R).tga (14,14)
                IMAGE_TABLE_BOTTOM_LEFT = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_BOTTOM_LEFT,        //. newui_item_table02(L).tga (14,14)
                IMAGE_TABLE_BOTTOM_RIGHT = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_BOTTOM_RIGHT,    //. newui_item_table02(R).tga (14,14)
                IMAGE_TABLE_TOP_PIXEL = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_TOP_PIXEL,            //. newui_item_table03(up).tga (1, 14)
                IMAGE_TABLE_BOTTOM_PIXEL = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_BOTTOM_PIXEL,    //. newui_item_table03(dw).tga (1,14)
                IMAGE_TABLE_LEFT_PIXEL = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_LEFT_PIXEL,        //. newui_item_table03(L).tga (14,1)
                IMAGE_TABLE_RIGHT_PIXEL = CNewUIInventoryCtrl::IMAGE_ITEM_TABLE_RIGHT_PIXEL,        //. newui_item_table03(R).tga (14,1)
                //--
                IMAGE_WINDOW_TAB_BTN = CNewUIGuildInfoWindow::IMAGE_GUILDINFO_TAB_BUTTON,
                //--
                IMAGE_MACROUI_HELPER_RAGEMINUS = BITMAP_INTERFACE_MACROUI_BEGIN,        // newui_position02.tga            (70, 25)    
                IMAGE_MACROUI_HELPER_OPTIONBUTTON = BITMAP_INTERFACE_MACROUI_BEGIN+1,        // newui_position02.tga            (70, 25)    
                IMAGE_MACROUI_HELPER_INPUTNUMBER = BITMAP_INTERFACE_MACROUI_BEGIN+2,
                IMAGE_MACROUI_HELPER_INPUTSTRING = BITMAP_INTERFACE_MACROUI_BEGIN+3,
                //-- Buttons
                IMAGE_CHAINFO_BTN_STAT = BITMAP_INTERFACE_NEW_CHAINFO_WINDOW_BEGIN + 1,
                IMAGE_CLEARNESS_BTN = BITMAP_CURSEDTEMPLE_BEGIN+4,
                IMAGE_IGS_BUTTON = BITMAP_IGS_MSGBOX_BUTTON,
    
            };
        private:
            enum PARTY_WINDOW_SIZE
            {
                WINDOW_WIDTH = 190,
                WINDOW_HEIGHT = 429,
            };
            typedef struct
            {
                int iNumTab;
                BYTE class_character[max_class_s6+2];
                CNewUIButton* btn;
            } CButtonTap;
    
            typedef struct
            {
                int iNumTab;
                BYTE class_character[max_class_s6+2];
                CNewUICheckBox* box;
            } CheckBoxTap;
    
            typedef struct
            {
                int iNumTab;
                int s_ImgIndex;
                POINT m_Pos;
                POINT m_Size;
                BYTE class_character[max_class_s6 + 2];
            } cTexture;
    
            typedef struct
            {
                int iNumTab;
                POINT m_Pos;
                unicode::t_string m_Name;
                BYTE class_character[max_class_s6 + 2];
            } cTextName;
    
            typedef std::map<int, CButtonTap> cButtonMap;
            typedef std::map<int, CheckBoxTap> cCheckBoxMap;
            typedef std::map<int, cTexture> cTextureMap;
            typedef std::map<int, cTextName> cTextNameMap;
    
        private:
            CNewUIManager* m_pNewUIMng;
            POINT                    m_Pos;
            CNewUIRadioGroupButton    m_TabBtn;
            int                        m_iNumCurOpenTab;
            cButtonMap                m_ButtonList;
            cCheckBoxMap            m_CheckBoxList;
            cTextureMap                m_TextureList;
            cTextNameMap            m_TextNameList;
        public:
            void RenderBtnList();
            int UpdateMouseBtnList();
            void RegisterBtnCharacter(BYTE class_character, int Identificador);
            void RegisterButton(int Identificador, CButtonTap button);
            void InsertButton(int imgindex, int x, int y, int sx, int sy, bool overflg, bool isimgwidth, bool bClickEffect, bool MoveTxt, unicode::t_string btname, unicode::t_string tooltiptext, int Identificador, int iNumTab);
            //--
            void RenderBoxList();
            int UpdateMouseBoxList();
            void RegisterBoxCharacter(BYTE class_character, int Identificador);
            void RegisterCheckBox(int Identificador, CheckBoxTap button);
            void InsertCheckBox(int imgindex, int x, int y, int sx, int sy, bool overflg, unicode::t_string btname, int Identificador, int iNumTab);
            //--
            void RenderTextureList();
            int UpdateTextureList();
            void RegisterTextureCharacter(BYTE class_character, int Identificador);
            void RegisterTexture(int Identificador, cTexture button);
            void InsertTexture(int imgindex, int x, int y, int sx, int sy, int Identificador, int iNumTab);
            //--
            void RenderTextList();
            void RegisterTextCharacter(BYTE class_character, int Identificador);
            void RegisterTextur(int Identificador, cTextName button);
            void InsertText(int x, int y, unicode::t_string Name, int Identificador, int iNumTab);
        public:
            CNewUIMuHelper();
            virtual ~CNewUIMuHelper();
    
            bool Create(CNewUIManager* pNewUIMng, int x, int y);
            void Release();
    
            bool Render();
            bool Update();
            bool UpdateMouseEvent();
            bool UpdateKeyEvent();
    
            float GetLayerDepth();
            float GetKeyEventOrder();
    
            void InitText();
            void InitImage();
            void InitButtons();
            void InitCheckBox();
            void SetPos(int x, int y);
            void RenderBack(int x, int y, int width, int height);
    
        private:
            void LoadImages();
            void UnloadImages();
        };
    
    }
    NewUIMuHelper.cpp
    Code:
    #include "stdafx.h"
    #include "NewUISystem.h"
    
    #include "NewUIMuHelper.h"
    
    
    SEASON3B::CNewUIMuHelper::CNewUIMuHelper()
    {
        m_pNewUIMng = NULL;
        m_Pos.x = m_Pos.y = 0;
        m_ButtonList.clear();
        m_iNumCurOpenTab = 0;
    }
    
    SEASON3B::CNewUIMuHelper::~CNewUIMuHelper()
    {
        Release();
    }
    
    bool SEASON3B::CNewUIMuHelper::Create(CNewUIManager* pNewUIMng, int x, int y)
    {
        if (NULL == pNewUIMng)
            return false;
    
        m_pNewUIMng = pNewUIMng;
        m_pNewUIMng->AddUIObj(SEASON3B::INTERFACE_MUHELPER, this);
    
        SetPos(x, y);
    
        LoadImages();
    
        InitButtons();
    
        InitCheckBox();
    
        InitImage();
    
        InitText();
    
        Show(false);
    
        return true;
    }
    
    void SEASON3B::CNewUIMuHelper::Release()
    {
        UnloadImages();
    
        if (m_pNewUIMng)
        {
            m_pNewUIMng->RemoveUIObj(this);
            m_pNewUIMng = NULL;
        }
    }
    
    void SEASON3B::CNewUIMuHelper::SetPos(int x, int y)
    {
        m_Pos.x = x;
        m_Pos.y = y;
    }
    
    void SEASON3B::CNewUIMuHelper::InitButtons()
    {
        std::list<unicode::t_string> ltext;
        ltext.push_back(GlobalText[3500]);
        ltext.push_back(GlobalText[3501]);
        ltext.push_back(GlobalText[3590]);
    
        m_TabBtn.CreateRadioGroup(3, IMAGE_WINDOW_TAB_BTN, TRUE);
        m_TabBtn.ChangeRadioText(ltext);
        m_TabBtn.ChangeRadioButtonInfo(true, m_Pos.x + 10.f, m_Pos.y + 48.f, 56, 22);
        m_TabBtn.ChangeFrame(m_iNumCurOpenTab);
    
        InsertButton(IMAGE_CHAINFO_BTN_STAT, m_Pos.x + 56, m_Pos.y + 78, 16, 15, 0, 0, 0, 0, "", "", 0, 0);
        InsertButton(IMAGE_MACROUI_HELPER_RAGEMINUS, m_Pos.x + 56, m_Pos.y + 97, 16, 15, 0, 0, 0, 0, "", "", 1, 0);
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 191, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 2, 0); //-- skill 2
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 243, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 3, 0); //-- skill 3
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 84, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 4, 0); //-- Buff
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 79, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 5, 0); //-- potion
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 84, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 6, 0); //-- potion
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 17, m_Pos.y + 234, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 7, 0); //-- potion
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 17, m_Pos.y + 234, 38, 24, 1, 0, 1, 1, GlobalText[3502], "", 8, 0); //-- potion
        InsertButton(IMAGE_CHAINFO_BTN_STAT, m_Pos.x + 56, m_Pos.y + 78, 16, 15, 0, 0, 0, 0, "", "", 9, 1);
        InsertButton(IMAGE_MACROUI_HELPER_RAGEMINUS, m_Pos.x + 56, m_Pos.y + 97, 16, 15, 0, 0, 0, 0, "", "", 10, 1);
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 208, 38, 24, 1, 0, 1, 1, GlobalText[3505], "", 11, 1); //-- Buff
        InsertButton(IMAGE_CLEARNESS_BTN, m_Pos.x + 132, m_Pos.y + 309, 38, 24, 1, 0, 1, 1, GlobalText[3506], "", 12, 1); //-- Buff
        //--
        InsertButton(IMAGE_IGS_BUTTON, m_Pos.x + 120, m_Pos.y + 388, 52, 26, 1, 0, 1, 1, GlobalText[3503], "", 13, -1);
        InsertButton(IMAGE_IGS_BUTTON, m_Pos.x + 65, m_Pos.y + 388, 52, 26, 1, 0, 1, 1, GlobalText[3504], "", 14, -1);
        InsertButton(IMAGE_BASE_WINDOW_BTN_EXIT, m_Pos.x + 20, m_Pos.y + 388, 36, 29, 0, 0, 0, 0, "", GlobalText[388], 15, -1);
    
        RegisterBtnCharacter(0xFF, 0);
        RegisterBtnCharacter(0xFF, 1);
        RegisterBtnCharacter(0xFF, 2);
        RegisterBtnCharacter(0xFF, 9);
        RegisterBtnCharacter(0xFF, 10);
        RegisterBtnCharacter(0xFF, 11);
        RegisterBtnCharacter(0xFF, 12);
        RegisterBtnCharacter(0xFF, 13);
        RegisterBtnCharacter(0xFF, 15);
        RegisterBtnCharacter(0xFF, 14);
    
        RegisterBtnCharacter(Dark_Knight, 3);
        RegisterBtnCharacter(Dark_Knight, 6);
    
        RegisterBtnCharacter(Dark_Wizard, 3);
        RegisterBtnCharacter(Dark_Wizard, 6);
        RegisterBtnCharacter(Dark_Wizard, 7);
    
        RegisterBtnCharacter(Magic_Gladiator, 3);
        RegisterBtnCharacter(Magic_Gladiator, 6);
        RegisterBtnCharacter(Dark_Lord, 6);
    
        RegisterBtnCharacter(Rage_Fighter, 3);
        RegisterBtnCharacter(Rage_Fighter, 6);
    
        RegisterBtnCharacter(Fairy_Elf, 3);
        RegisterBtnCharacter(Fairy_Elf, 4);
        RegisterBtnCharacter(Fairy_Elf, 8);
    
        RegisterBtnCharacter(Summoner, 3);
        RegisterBtnCharacter(Summoner, 5);
    }
    
    void SEASON3B::CNewUIMuHelper::InitCheckBox()
    {
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 79, m_Pos.y + 80, 15, 15, 0, GlobalText[3507], 0, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 18, m_Pos.y + 122, 15, 15, 0, GlobalText[3508], 1, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 18, m_Pos.y + 137, 15, 15, 0, GlobalText[3509], 2, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 94, m_Pos.y + 174, 15, 15, 0, GlobalText[3510], 3, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 94, m_Pos.y + 191, 15, 15, 0, GlobalText[3511], 4, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 94, m_Pos.y + 226, 15, 15, 0, GlobalText[3510], 5, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 94, m_Pos.y + 243, 15, 15, 0, GlobalText[3511], 6, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 18, m_Pos.y + 226, 15, 15, 0, GlobalText[3512], 7, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 25, m_Pos.y + 276, 15, 15, 0, GlobalText[3513], 8, 0);
    
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 60, m_Pos.y + 218, 15, 15, 0, GlobalText[3514], 9, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 15, m_Pos.y + 218, 15, 15, 0, GlobalText[3515], 10, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 79, m_Pos.y + 97, 15, 15, 0, GlobalText[3516], 11, 0);
        InsertCheckBox(BITMAP_OPTION_BEGIN + 5, m_Pos.x + 79, m_Pos.y + 97, 15, 15, 0, GlobalText[3517], 12, 0);
    
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 79, m_Pos.y + 80, 15, 15, 0, GlobalText[3518], 13, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 17, m_Pos.y + 125, 15, 15, 0, GlobalText[3519], 14, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 17, m_Pos.y + 152, 15, 15, 0, GlobalText[3520], 15, 1);
    
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 22, m_Pos.y + 170, 15, 15, 0, GlobalText[3521], 16, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 85, m_Pos.y + 170, 15, 15, 0, GlobalText[3522], 17, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 22, m_Pos.y + 185, 15, 15, 0, GlobalText[3523], 18, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 85, m_Pos.y + 185, 15, 15, 0, GlobalText[3524], 19, 1);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 22, m_Pos.y + 200, 15, 15, 0, GlobalText[3525], 20, 1);
        //--
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 18, m_Pos.y + 80, 15, 15, 0, GlobalText[3591], 21, 2);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 18, m_Pos.y + 97, 15, 15, 0, GlobalText[3592], 23, 2);
        InsertCheckBox(BITMAP_OPTION_BEGIN+5, m_Pos.x + 18, m_Pos.y + 125, 15, 15, 0, GlobalText[3594], 22, 2);
    
        RegisterBoxCharacter(0xFF, 0);
        RegisterBoxCharacter(0xFF, 1);
        RegisterBoxCharacter(0xFF, 2);
        RegisterBoxCharacter(0xFF, 3);
        RegisterBoxCharacter(0xFF, 4);
        RegisterBoxCharacter(0xFF, 8);
        RegisterBoxCharacter(0xFF, 13);
        RegisterBoxCharacter(0xFF, 14);
        RegisterBoxCharacter(0xFF, 15);
        RegisterBoxCharacter(0xFF, 16);
        RegisterBoxCharacter(0xFF, 17);
        RegisterBoxCharacter(0xFF, 19);
        RegisterBoxCharacter(0xFF, 18);
        RegisterBoxCharacter(0xFF, 20);
        RegisterBoxCharacter(0xFF, 21);
        RegisterBoxCharacter(0xFF, 23);
        RegisterBoxCharacter(0xFF, 22);
    
        RegisterBoxCharacter(Dark_Knight, 5);
        RegisterBoxCharacter(Dark_Knight, 6);
        RegisterBoxCharacter(Dark_Knight, 7);
    
        RegisterBoxCharacter(Dark_Wizard, 5);
        RegisterBoxCharacter(Dark_Wizard, 6);
        RegisterBoxCharacter(Dark_Wizard, 10);
    
        RegisterBoxCharacter(Magic_Gladiator, 5);
        RegisterBoxCharacter(Magic_Gladiator, 6);
    
        RegisterBoxCharacter(Dark_Lord, 9);
    
        RegisterBoxCharacter(Fairy_Elf, 11);
        RegisterBoxCharacter(Fairy_Elf, 5);
        RegisterBoxCharacter(Fairy_Elf, 6);
        RegisterBoxCharacter(Fairy_Elf, 10);
    
        RegisterBoxCharacter(Summoner, 5);
        RegisterBoxCharacter(Summoner, 6);
        RegisterBoxCharacter(Summoner, 12);
    
        RegisterBoxCharacter(Rage_Fighter, 5);
        RegisterBoxCharacter(Rage_Fighter, 6);
    }
    
    void SEASON3B::CNewUIMuHelper::InitImage()
    {
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 17, m_Pos.y + 171, 32, 38, 0, 0);
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 61, m_Pos.y + 171, 32, 38, 1, 0);
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 61, m_Pos.y + 222, 32, 38, 2, 0);
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 21, m_Pos.y + 293, 32, 38, 3, 0);
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 55, m_Pos.y + 293, 32, 38, 4, 0);
        InsertTexture(BITMAP_INTERFACE_NEW_SKILLICON_BEGIN + 4, m_Pos.x + 89, m_Pos.y + 293, 32, 38, 5, 0);
    
        InsertTexture(IMAGE_MACROUI_HELPER_INPUTNUMBER, m_Pos.x + 135, m_Pos.y + 137, 28, 15, 6, 0);
        InsertTexture(IMAGE_MACROUI_HELPER_INPUTNUMBER, m_Pos.x + 135, m_Pos.y + 174, 28, 15, 7, 0);
        InsertTexture(IMAGE_MACROUI_HELPER_INPUTNUMBER, m_Pos.x + 135, m_Pos.y + 226, 28, 15, 8, 0);
        InsertTexture(IMAGE_MACROUI_HELPER_INPUTSTRING, m_Pos.x + 34, m_Pos.y + 216, 93, 15, 9, 1);
    
    
        RegisterTextureCharacter(0xFF, 0);
        RegisterTextureCharacter(0xFF, 1);
        RegisterTextureCharacter(0xFF, 3);
        RegisterTextureCharacter(0xFF, 4);
        RegisterTextureCharacter(0xFF, 5);
        RegisterTextureCharacter(0xFF, 6);
        RegisterTextureCharacter(0xFF, 7);
        RegisterTextureCharacter(0xFF, 9);
    
    
        RegisterTextureCharacter(Dark_Knight, 2);
        RegisterTextureCharacter(Dark_Knight, 8);
        RegisterTextureCharacter(Dark_Wizard, 2);
        RegisterTextureCharacter(Dark_Wizard, 8);
        RegisterTextureCharacter(Fairy_Elf, 2);
        RegisterTextureCharacter(Fairy_Elf, 8);
        RegisterTextureCharacter(Magic_Gladiator, 2);
        RegisterTextureCharacter(Magic_Gladiator, 8);
        RegisterTextureCharacter(Summoner, 2);
        RegisterTextureCharacter(Summoner, 8);
        RegisterTextureCharacter(Rage_Fighter, 2);
        RegisterTextureCharacter(Rage_Fighter, 8);
    }
    
    void SEASON3B::CNewUIMuHelper::InitText()
    {
        InsertText(m_Pos.x + 18, m_Pos.y + 78, GlobalText[3526], 1, 0);
        InsertText(m_Pos.x + 18, m_Pos.y + 83, "________", 2, 0);
        InsertText(m_Pos.x + 113, m_Pos.y + 141, GlobalText[3527], 3, 0);
        InsertText(m_Pos.x + 162, m_Pos.y + 141, GlobalText[3528], 4, 0);
        InsertText(m_Pos.x + 18, m_Pos.y + 160, GlobalText[3529], 5, 0);
        InsertText(m_Pos.x + 59, m_Pos.y + 160, GlobalText[3530], 7, 0);
        InsertText(m_Pos.x + 162, m_Pos.y + 178, GlobalText[3527], 8, 0);
        InsertText(m_Pos.x + 59, m_Pos.y + 212, GlobalText[3531], 9, 0);
        
        InsertText(m_Pos.x + 162, m_Pos.y + 230, GlobalText[3527], 10, 0);
        InsertText(m_Pos.x + 18, m_Pos.y + 78, GlobalText[3532], 11, 1);
        InsertText(m_Pos.x + 18, m_Pos.y + 83, "________", 12, 1);
    
        RegisterTextCharacter(0xFF, 1);
        RegisterTextCharacter(0xFF, 2);
        RegisterTextCharacter(0xFF, 3);
        RegisterTextCharacter(0xFF, 4);
        RegisterTextCharacter(0xFF, 5);
        RegisterTextCharacter(0xFF, 7);
        RegisterTextCharacter(0xFF, 8);
        RegisterTextCharacter(0xFF, 11);
        RegisterTextCharacter(0xFF, 12);
    
        RegisterTextCharacter(Dark_Knight, 9);
        RegisterTextCharacter(Dark_Knight, 10);
        RegisterTextCharacter(Dark_Wizard, 9);
        RegisterTextCharacter(Dark_Wizard, 10);
        RegisterTextCharacter(Fairy_Elf, 9);
        RegisterTextCharacter(Fairy_Elf, 10);
        RegisterTextCharacter(Magic_Gladiator, 9);
        RegisterTextCharacter(Magic_Gladiator, 10);
        RegisterTextCharacter(Summoner, 9);
        RegisterTextCharacter(Summoner, 10);
        RegisterTextCharacter(Rage_Fighter, 9);
        RegisterTextCharacter(Rage_Fighter, 10);
    }
    
    bool SEASON3B::CNewUIMuHelper::Update()
    {
        if (IsVisible())
        {
            int iNumCurOpenTab = m_TabBtn.UpdateMouseEvent();
    
            if (iNumCurOpenTab == RADIOGROUPEVENT_NONE)
                return true;
    
            m_iNumCurOpenTab = iNumCurOpenTab;
        }
        return true;
    }
    
    bool SEASON3B::CNewUIMuHelper::UpdateMouseEvent()
    {
        /*switch (m_iNumCurOpenTab)
        {
        case TAB_GATE_MANAGING:
            UpdateGateManagingTab();
            break;
        case TAB_STATUE_MANAGING:
            UpdateStatueManagingTab();
            break;
        case TAB_TAX_MANAGING:
            UpdateTaxManagingTab();
            break;
        }
    
        if (true == BtnProcess())
            return false;*/
    
        POINT ptExitBtn1 = { m_Pos.x + 169, m_Pos.y + 7 };
        POINT ptExitBtn2 = { m_Pos.x + 13, m_Pos.y + 391 };
    
        if (SEASON3B::IsRelease(VK_LBUTTON) && CheckMouseIn(ptExitBtn1.x, ptExitBtn1.y, 13, 12))
        {
            g_pNewUISystem->Hide(SEASON3B::INTERFACE_MUHELPER);
        }
    
        int Identificador = UpdateMouseBtnList();
    
        if (Identificador == 15)
        {
            g_pNewUISystem->Hide(SEASON3B::INTERFACE_MUHELPER);
            return false;
        }
    
        UpdateMouseBoxList();
    
    
        if (CheckMouseIn(m_Pos.x, m_Pos.y, WINDOW_WIDTH, WINDOW_HEIGHT))
            return false;
        return true;
    }
    
    bool SEASON3B::CNewUIMuHelper::UpdateKeyEvent()
    {
        if (IsVisible())
        {
            if (SEASON3B::IsPress(VK_ESCAPE) == true)
            {
                g_pNewUISystem->Hide(SEASON3B::INTERFACE_MUHELPER);
                //PlayBuffer(SOUND_CLICK01);
    
                return false;
            }
        }
        return true;
    }
    
    float SEASON3B::CNewUIMuHelper::GetLayerDepth()
    {
        return 3.4;
    }
    
    float SEASON3B::CNewUIMuHelper::GetKeyEventOrder()
    {
        return 3.4;
    }
    
    bool SEASON3B::CNewUIMuHelper::Render()
    {
        EnableAlphaTest();
        glColor4f(1.f, 1.f, 1.f, 1.f);
    
        DWORD TextColor = g_pRenderText->GetTextColor();
    
        g_pRenderText->SetFont(g_hFont);
        g_pRenderText->SetTextColor(0xFFFFFFFF);
    
        g_pRenderText->SetBgColor(0);
    
    
        RenderImage(IMAGE_BASE_WINDOW_BACK, m_Pos.x, m_Pos.y, float(WINDOW_WIDTH), float(WINDOW_HEIGHT));
        RenderImage(IMAGE_BASE_WINDOW_TOP, m_Pos.x, m_Pos.y, float(WINDOW_WIDTH), 64.f);
        RenderImage(IMAGE_BASE_WINDOW_LEFT, m_Pos.x, m_Pos.y + 64.f, 21.f, float(WINDOW_HEIGHT) - 64.f - 45.f);
        RenderImage(IMAGE_BASE_WINDOW_RIGHT, m_Pos.x + float(WINDOW_WIDTH) - 21.f, m_Pos.y + 64.f, 21.f, float(WINDOW_HEIGHT) - 64.f - 45.f);
        RenderImage(IMAGE_BASE_WINDOW_BOTTOM, m_Pos.x, m_Pos.y + float(WINDOW_HEIGHT) - 45.f, float(WINDOW_WIDTH), 45.f);
    
    
        g_pRenderText->SetFont(g_hFontBold);
    
        g_pRenderText->RenderText(m_Pos.x, m_Pos.y + 13, GlobalText[3536], 190, 0, RT3_SORT_CENTER);
    
        RenderBack(m_Pos.x + 12, m_Pos.y + 340, 165, 46);
    
        g_pRenderText->SetFont(g_hFont);
        g_pRenderText->RenderText(m_Pos.x + 20, m_Pos.y + 347, GlobalText[3537], 0, 0, RT3_SORT_CENTER);
    
        g_pRenderText->SetTextColor(0xFF00B4FF);
        g_pRenderText->RenderText(m_Pos.x + 20, m_Pos.y + 365, GlobalText[3538], 0, 0, RT3_SORT_CENTER);
    
        g_pRenderText->SetTextColor(TextColor);
    
        int sTapIndex = m_iNumCurOpenTab;
    
        m_TabBtn.Render();
    
        if (sTapIndex)
        {
            if (sTapIndex == 1)
            {
                RenderBack(m_Pos.x + 12, m_Pos.y + 73, 68, 50);
                RenderBack(m_Pos.x + 75, m_Pos.y + 73, 102, 50);
                RenderBack(m_Pos.x + 12, m_Pos.y + 120, 165, 30);
                RenderBack(m_Pos.x + 12, m_Pos.y + 147, 165, 195);
                RenderBack(m_Pos.x + 16, m_Pos.y + 235, 158, 74);
    
                RenderImage(BITMAP_INTERFACE_CRYWOLF_BEGIN + 34, m_Pos.x + 29, m_Pos.y + 92, 15, 19, 0.f, 0.f, 15.f / 16.f, 19.f / 32.f);
            }
            else
            {
                RenderBack(m_Pos.x + 12, m_Pos.y + 73, 165, 50);
                RenderBack(m_Pos.x + 12, m_Pos.y + 120, 165, 222);
            }
    
        }
        else
        {
            RenderBack(m_Pos.x + 12, m_Pos.y + 73, 68, 50);
            RenderBack(m_Pos.x + 75, m_Pos.y + 73, 102, 50);
            RenderBack(m_Pos.x + 12, m_Pos.y + 120, 165, 39);
            RenderBack(m_Pos.x + 12, m_Pos.y + 156, 165, 120);
            RenderBack(m_Pos.x + 12, m_Pos.y + 273, 165, 69);
    
            RenderImage(BITMAP_INTERFACE_CRYWOLF_BEGIN + 33, m_Pos.x + 29, m_Pos.y + 92, 15, 19, 0.f, 0.f, 15.f / 16.f, 19.f / 32.f);
        }
    
        RenderBtnList();
        RenderBoxList();
        RenderTextureList();
        RenderTextList();
        DisableAlphaBlend();
    
        return true;
    }
    
    void SEASON3B::CNewUIMuHelper::RenderBack(int x, int y, int width, int height)
    {
        EnableAlphaTest();
        glColor4f(0.0, 0.0, 0.0, 0.4f);
        RenderColor(x+3.f, y+2.f, width-7.f, height-7, 0.0, 0);
        EndRenderColor();
    
        RenderImage(IMAGE_TABLE_TOP_LEFT, x, y, 14.0, 14.0);
        RenderImage(IMAGE_TABLE_TOP_RIGHT, (x + width) - 14.f, y, 14.0, 14.0);
        RenderImage(IMAGE_TABLE_BOTTOM_LEFT, x, (y + height) - 14.f, 14.0, 14.0);
        RenderImage(IMAGE_TABLE_BOTTOM_RIGHT, (x + width) - 14.f, (y + height) - 14.f, 14.0, 14.0);
        RenderImage(IMAGE_TABLE_TOP_PIXEL, x + 6.f, y, (width - 12.f), 14.0);
        RenderImage(IMAGE_TABLE_RIGHT_PIXEL, (x + width) - 14.f, y + 6.f, 14.0, (height - 14.f));
        RenderImage(IMAGE_TABLE_BOTTOM_PIXEL, x + 6.f, (y + height) - 14.f, (width - 12.f), 14.0);
        RenderImage(IMAGE_TABLE_LEFT_PIXEL, x, (y + 6.f), 14.0, (height - 14.f));
    }
    
    void SEASON3B::CNewUIMuHelper::LoadImages()
    {
        LoadBitmap("Interface\\MacroUI\\MacroUI_RangeMinus.tga", IMAGE_MACROUI_HELPER_RAGEMINUS, GL_LINEAR, GL_CLAMP, 1, 0);
        LoadBitmap("Interface\\MacroUI\\MacroUI_OptionButton.tga", IMAGE_MACROUI_HELPER_OPTIONBUTTON, GL_LINEAR, GL_CLAMP, 1, 0);
        LoadBitmap("Interface\\MacroUI\\MacroUI_InputNumber.tga", IMAGE_MACROUI_HELPER_INPUTNUMBER, GL_LINEAR, GL_CLAMP, 1, 0);
        LoadBitmap("Interface\\MacroUI\\MacroUI_InputString.tga", IMAGE_MACROUI_HELPER_INPUTSTRING, GL_LINEAR, GL_CLAMP, 1, 0);
        //--
        LoadBitmap("Interface\\InGameShop\\Ingame_Bt03.tga", IMAGE_IGS_BUTTON, GL_LINEAR, GL_CLAMP, 1, 0);
    
    }
    
    void SEASON3B::CNewUIMuHelper::UnloadImages()
    {
        DeleteBitmap(IMAGE_MACROUI_HELPER_RAGEMINUS);
        DeleteBitmap(IMAGE_MACROUI_HELPER_OPTIONBUTTON);
        DeleteBitmap(IMAGE_MACROUI_HELPER_INPUTNUMBER);
        DeleteBitmap(IMAGE_MACROUI_HELPER_INPUTSTRING);
        //--
        DeleteBitmap(IMAGE_IGS_BUTTON);
    }
    
    //===============================================================================================================
    //===============================================================================================================
    
    void SEASON3B::CNewUIMuHelper::RegisterButton(int Identificador, CButtonTap button)
    {
        m_ButtonList.insert(std::pair<int, CButtonTap>(Identificador, button));
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterBtnCharacter(BYTE class_character, int Identificador)
    {
        cButtonMap::iterator li = m_ButtonList.find(Identificador);
    
        if (li != m_ButtonList.end())
        {
            CButtonTap* cBTN = &li->second;
            if (class_character >= 0 && class_character < max_class_s6+2)
            {
                cBTN->class_character[class_character] = TRUE;
            }
            else
            {
                memset(cBTN->class_character, 1, sizeof(cBTN->class_character));
            }
        }
    }
    
    void SEASON3B::CNewUIMuHelper::InsertButton(int imgindex, int x, int y, int sx, int sy, bool overflg, bool isimgwidth, bool bClickEffect, bool MoveTxt, unicode::t_string btname, unicode::t_string tooltiptext, int Identificador, int iNumTab)
    {
        CButtonTap cBTN;
        CNewUIButton* button = new CNewUIButton();
    
        button->ChangeButtonImgState(1, imgindex, overflg, isimgwidth, bClickEffect);
        button->ChangeButtonInfo(x, y, sx, sy);
    
        button->ChangeText(btname);
        button->ChangeToolTipText(tooltiptext, TRUE);
    
        if (MoveTxt)
        {
            button->MoveTextPos(0, -1);
        }
    
        cBTN.btn = button;
        cBTN.iNumTab = iNumTab;
        memset(cBTN.class_character, 0, sizeof(cBTN.class_character));
    
        RegisterButton(Identificador, cBTN);
    }
    
    void SEASON3B::CNewUIMuHelper::RenderBtnList()
    {
        cButtonMap::iterator li = m_ButtonList.begin();
    
        for (; li != m_ButtonList.end(); li++)
        {
            CButtonTap* cBTN = &li->second;
    
            if ((cBTN->class_character[(0xF & Hero->Class)]) && (cBTN->iNumTab == m_iNumCurOpenTab || cBTN->iNumTab == -1))
            {
                cBTN->btn->Render();
            }
        }
    }
    
    int SEASON3B::CNewUIMuHelper::UpdateMouseBtnList()
    {
        int Identificador = -1;
    
        cButtonMap::iterator li = m_ButtonList.begin();
    
        for (; li != m_ButtonList.end(); li++)
        {
            CButtonTap* cBTN = &li->second;
    
            if ((cBTN->class_character[(0xF & Hero->Class)]) && (cBTN->iNumTab == m_iNumCurOpenTab || cBTN->iNumTab == -1))
            {
                if (cBTN->btn->UpdateMouseEvent())
                {
                    return li->first;
                }
            }
        }
        return Identificador;
    }
    
    //===============================================================================================================
    //===============================================================================================================
    
    void SEASON3B::CNewUIMuHelper::RegisterBoxCharacter(BYTE class_character, int Identificador)
    {
        cCheckBoxMap::iterator li = m_CheckBoxList.find(Identificador);
    
        if (li != m_CheckBoxList.end())
        {
            CheckBoxTap* cBOX = &li->second;
    
            if (class_character >= 0 && class_character < max_class_s6 + 2)
            {
                cBOX->class_character[class_character] = TRUE;
            }
            else
            {
                memset(cBOX->class_character, 1, sizeof(cBOX->class_character));
            }
        }
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterCheckBox(int Identificador, CheckBoxTap button)
    {
        m_CheckBoxList.insert(std::pair<int, CheckBoxTap>(Identificador, button));
    }
    
    void SEASON3B::CNewUIMuHelper::InsertCheckBox(int imgindex, int x, int y, int sx, int sy, bool overflg, unicode::t_string btname, int Identificador, int iNumTab)
    {
        CheckBoxTap cBOX;
    
        CNewUICheckBox* cbox = new CNewUICheckBox;
    
        cbox->CheckBoxImgState(imgindex);
        cbox->CheckBoxInfo(x, y, sx, sy);
    
        cbox->ChangeText(btname);
        cbox->RegisterBoxState(overflg);
    
        cBOX.box = cbox;
        cBOX.iNumTab = iNumTab;
        memset(cBOX.class_character, 0, sizeof(cBOX.class_character));
    
        RegisterCheckBox(Identificador, cBOX);
    }
    
    void SEASON3B::CNewUIMuHelper::RenderBoxList()
    {
        cCheckBoxMap::iterator li = m_CheckBoxList.begin();
    
        for (; li != m_CheckBoxList.end(); li++)
        {
            CheckBoxTap* cBOX = &li->second;
    
            if ((cBOX->class_character[(0xF & Hero->Class)]) && (cBOX->iNumTab == m_iNumCurOpenTab || cBOX->iNumTab == -1))
            {
                cBOX->box->Render();
            }
        }
    }
    
    int SEASON3B::CNewUIMuHelper::UpdateMouseBoxList()
    {
        int Identificador = -1;
    
        cCheckBoxMap::iterator li = m_CheckBoxList.begin();
    
        for (; li != m_CheckBoxList.end(); li++)
        {
            CheckBoxTap* cBOX = &li->second;
    
            if ((cBOX->class_character[(0xF & Hero->Class)]) && (cBOX->iNumTab == m_iNumCurOpenTab || cBOX->iNumTab == -1))
            {
                if (cBOX->box->UpdateMouseEvent())
                {
                    return li->first;
                }
            }
        }
        return Identificador;
    }
    
    //===============================================================================================================
    //===============================================================================================================
    
    void SEASON3B::CNewUIMuHelper::RenderTextureList()
    {
        cTextureMap::iterator li = m_TextureList.begin();
    
        for (; li != m_TextureList.end(); li++)
        {
            cTexture* cImage = &li->second;
    
            if ((cImage->class_character[(0xF & Hero->Class)]) && (cImage->iNumTab == m_iNumCurOpenTab || cImage->iNumTab == -1))
            {
                RenderImage(cImage->s_ImgIndex, cImage->m_Pos.x, cImage->m_Pos.y, cImage->m_Size.x, cImage->m_Size.y);
            }
        }
    }
    
    int SEASON3B::CNewUIMuHelper::UpdateTextureList()
    {
        int Identificador = -1;
    
        cTextureMap::iterator li = m_TextureList.begin();
    
        for (; li != m_TextureList.end(); li++)
        {
            cTexture* cImage = &li->second;
    
            if ((cImage->class_character[(0xF & Hero->Class)]) && (cImage->iNumTab == m_iNumCurOpenTab || cImage->iNumTab == -1))
            {
                if (CheckMouseIn(cImage->m_Pos.x, cImage->m_Pos.y, cImage->m_Size.x, cImage->m_Size.y))
                {
                    return li->first;
                }
            }
        }
    
        return Identificador;
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterTextureCharacter(BYTE class_character, int Identificador)
    {
        cTextureMap::iterator li = m_TextureList.find(Identificador);
    
        if (li != m_TextureList.end())
        {
            cTexture* cImage = &li->second;
    
            if (class_character >= 0 && class_character < max_class_s6 + 2)
            {
                cImage->class_character[class_character] = TRUE;
            }
            else
            {
                memset(cImage->class_character, 1, sizeof(cImage->class_character));
            }
        }
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterTexture(int Identificador, cTexture button)
    {
        m_TextureList.insert(std::pair<int, cTexture>(Identificador, button));
    }
    
    void SEASON3B::CNewUIMuHelper::InsertTexture(int imgindex, int x, int y, int sx, int sy, int Identificador, int iNumTab)
    {
        cTexture cImage;
    
        cImage.s_ImgIndex = imgindex;
        cImage.m_Pos.x = x;
        cImage.m_Pos.y = y;
        cImage.m_Size.x = sx;
        cImage.m_Size.y = sy;
        cImage.iNumTab = iNumTab;
    
        memset(cImage.class_character, 0, sizeof(cImage.class_character));
    
        RegisterTexture(Identificador, cImage);
    }
    
    //===============================================================================================================
    //===============================================================================================================
    
    void SEASON3B::CNewUIMuHelper::RenderTextList()
    {
        cTextNameMap::iterator li = m_TextNameList.begin();
    
        for (; li != m_TextNameList.end(); li++)
        {
            cTextName* cImage = &li->second;
    
            if ((cImage->class_character[(0xF & Hero->Class)]) && (cImage->iNumTab == m_iNumCurOpenTab || cImage->iNumTab == -1))
            {
                g_pRenderText->RenderText(cImage->m_Pos.x, cImage->m_Pos.y, cImage->m_Name.c_str());
            }
        }
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterTextCharacter(BYTE class_character, int Identificador)
    {
        cTextNameMap::iterator li = m_TextNameList.find(Identificador);
    
        if (li != m_TextNameList.end())
        {
            cTextName* cImage = &li->second;
    
            if (class_character >= 0 && class_character < max_class_s6 + 2)
            {
                cImage->class_character[class_character] = TRUE;
            }
            else
            {
                memset(cImage->class_character, 1, sizeof(cImage->class_character));
            }
        }
    }
    
    void SEASON3B::CNewUIMuHelper::RegisterTextur(int Identificador, cTextName button)
    {
        m_TextNameList.insert(std::pair<int, cTextName>(Identificador, button));
    }
    
    void SEASON3B::CNewUIMuHelper::InsertText(int x, int y, unicode::t_string Name, int Identificador, int iNumTab)
    {
        cTextName cText;
    
        cText.m_Pos.x = x;
        cText.m_Pos.y = y;
        cText.m_Name = Name;
        cText.iNumTab = iNumTab;
    
        memset(cText.class_character, 0, sizeof(cText.class_character));
        RegisterTextur(Identificador, cText);
    }

  5. #430
    Elite Member Odisk is offline
    Member +Rank
    Apr 2009 Join Date
    VenezuelaLocation
    212Posts
    Quote Originally Posted by aiqiji View Post



    Can you upload the 【CNewUICheckBox】 class and the 【MoveTextPos】 function?
    Code:
    class CNewUICheckBox
    	{
    	public:
    		CNewUICheckBox();
    		virtual ~CNewUICheckBox();
    		void CheckBoxImgState(int imgindex);
    		void RegisterBoxState(bool eventstate);
    		void ChangeText(unicode::t_string btname);
    		void CheckBoxInfo(int x, int y, int sx, int sy);
    		bool GetBoxState();
    
    		void Render();
    		bool UpdateMouseEvent();
    	private:
    		int						s_ImgIndex;
    		POINT					m_Pos;
    		POINT					m_Size;
    		unicode::t_string		m_Name;
    		HFONT					m_hTextFont;
    		DWORD					m_NameColor;
    		DWORD					m_NameBackColor;
    		float					m_ImgWidth;
    		float					m_ImgHeight;
    		bool					State;
    	};
    Code:
    SEASON3B::CNewUICheckBox::CNewUICheckBox()
    {
    	s_ImgIndex = -1;
    	m_Pos.x = 0; m_Pos.y = 0;
    	m_Size.x=15; m_Size.y=15;
    	m_Name.clear();
    	m_hTextFont = g_hFont;
    	m_NameColor = 0xFFFFFFFF;
    	m_NameBackColor = 0x00000000;
    	m_ImgWidth = 0.0;
    	m_ImgHeight = 15.f;
    	State = 0;
    }
    
    SEASON3B::CNewUICheckBox::~CNewUICheckBox()
    {
    
    }
    
    void SEASON3B::CNewUICheckBox::CheckBoxImgState(int imgindex)
    {
    	s_ImgIndex = imgindex;
    }
    
    void SEASON3B::CNewUICheckBox::RegisterBoxState(bool eventstate)
    {
    	State = eventstate;
    }
    
    void SEASON3B::CNewUICheckBox::ChangeText(unicode::t_string btname)
    {
    	m_Name = btname;
    }
    
    void SEASON3B::CNewUICheckBox::CheckBoxInfo(int x, int y, int sx, int sy)
    {
    	m_Pos.x = x; m_Pos.y = y;
    	m_Size.x = sx; m_Size.y = sy;
    }
    
    bool SEASON3B::CNewUICheckBox::GetBoxState()
    {
    	return State;
    }
    
    void SEASON3B::CNewUICheckBox::Render()
    {
    	EnableAlphaTest();
    	glColor4f(1.f, 1.f, 1.f, 1.f);
    
    	RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0.0, ( State ) ? 0.0 : m_Size.y);
    
    	if (State)
    	{
    		RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, 0);
    	}
    	else
    	{
    		RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, m_Size.y);
    	}
    
    	g_pRenderText->SetFont(m_hTextFont);
    	g_pRenderText->SetTextColor(m_NameColor);
    	g_pRenderText->SetBgColor(m_NameBackColor);
    	g_pRenderText->RenderText(m_Pos.x+ m_Size.x+1, m_Pos.y+4, m_Name.c_str(), 0, 0);
    }
    
    bool SEASON3B::CNewUICheckBox::UpdateMouseEvent()
    {
    	if (CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y))
    	{
    		if (IsRelease(VK_LBUTTON))
    		{
    			State = !State;
    			return TRUE;
    		}
    	}
    	return 0;
    }

  6. #431
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts
    dude and these two


    2.



    Quote Originally Posted by Odisk View Post
    Code:
    class CNewUICheckBox
        {
        public:
            CNewUICheckBox();
            virtual ~CNewUICheckBox();
            void CheckBoxImgState(int imgindex);
            void RegisterBoxState(bool eventstate);
            void ChangeText(unicode::t_string btname);
            void CheckBoxInfo(int x, int y, int sx, int sy);
            bool GetBoxState();
    
            void Render();
            bool UpdateMouseEvent();
        private:
            int                        s_ImgIndex;
            POINT                    m_Pos;
            POINT                    m_Size;
            unicode::t_string        m_Name;
            HFONT                    m_hTextFont;
            DWORD                    m_NameColor;
            DWORD                    m_NameBackColor;
            float                    m_ImgWidth;
            float                    m_ImgHeight;
            bool                    State;
        };
    Code:
    SEASON3B::CNewUICheckBox::CNewUICheckBox()
    {
        s_ImgIndex = -1;
        m_Pos.x = 0; m_Pos.y = 0;
        m_Size.x=15; m_Size.y=15;
        m_Name.clear();
        m_hTextFont = g_hFont;
        m_NameColor = 0xFFFFFFFF;
        m_NameBackColor = 0x00000000;
        m_ImgWidth = 0.0;
        m_ImgHeight = 15.f;
        State = 0;
    }
    
    SEASON3B::CNewUICheckBox::~CNewUICheckBox()
    {
    
    }
    
    void SEASON3B::CNewUICheckBox::CheckBoxImgState(int imgindex)
    {
        s_ImgIndex = imgindex;
    }
    
    void SEASON3B::CNewUICheckBox::RegisterBoxState(bool eventstate)
    {
        State = eventstate;
    }
    
    void SEASON3B::CNewUICheckBox::ChangeText(unicode::t_string btname)
    {
        m_Name = btname;
    }
    
    void SEASON3B::CNewUICheckBox::CheckBoxInfo(int x, int y, int sx, int sy)
    {
        m_Pos.x = x; m_Pos.y = y;
        m_Size.x = sx; m_Size.y = sy;
    }
    
    bool SEASON3B::CNewUICheckBox::GetBoxState()
    {
        return State;
    }
    
    void SEASON3B::CNewUICheckBox::Render()
    {
        EnableAlphaTest();
        glColor4f(1.f, 1.f, 1.f, 1.f);
    
        RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0.0, ( State ) ? 0.0 : m_Size.y);
    
        if (State)
        {
            RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, 0);
        }
        else
        {
            RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, m_Size.y);
        }
    
        g_pRenderText->SetFont(m_hTextFont);
        g_pRenderText->SetTextColor(m_NameColor);
        g_pRenderText->SetBgColor(m_NameBackColor);
        g_pRenderText->RenderText(m_Pos.x+ m_Size.x+1, m_Pos.y+4, m_Name.c_str(), 0, 0);
    }
    
    bool SEASON3B::CNewUICheckBox::UpdateMouseEvent()
    {
        if (CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y))
        {
            if (IsRelease(VK_LBUTTON))
            {
                State = !State;
                return TRUE;
            }
        }
        return 0;
    }

  7. #432
    Elite Member Odisk is offline
    Member +Rank
    Apr 2009 Join Date
    VenezuelaLocation
    212Posts
    Quote Originally Posted by aiqiji View Post
    dude and these two


    2.



    PHP Code:
    void SEASON3B::CNewUIMessageBoxButton::MoveTextPos(int iXint iY)
    {
        
    m_iMoveTextPosX iX;
        
    m_iMoveTextPosY iY;

    Option 2 Add library
    #include "NewUICommonMessageBox.h"

  8. #433
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts
    No helper button after adding






    Quote Originally Posted by Odisk View Post
    PHP Code:
    void SEASON3B::CNewUIMessageBoxButton::MoveTextPos(int iXint iY)
    {
        
    m_iMoveTextPosX iX;
        
    m_iMoveTextPosY iY;

    Option 2 Add library
    #include "NewUICommonMessageBox.h"

  9. #434
    C++ Developer zipper20032 is online now
    Grand MasterRank
    Oct 2006 Join Date
    0x198837ADLocation
    680Posts
    Quote Originally Posted by aiqiji View Post
    No helper button after adding

    You have to implement it by yourself, not just copy paste things and just expect to work.
    You have to add the current MUHelper class to the current GUI rendering system. I've added it to a chat command to open it.

  10. #435
    Elite Member Odisk is offline
    Member +Rank
    Apr 2009 Join Date
    VenezuelaLocation
    212Posts
    Quote Originally Posted by aiqiji View Post
    No helper button after adding


    Code:
    	BITMAP_HERO_POSITION_INFO_BEGIN,
    	BITMAP_HERO_POSITION_INFO_END = BITMAP_HERO_POSITION_INFO_BEGIN + 6,
    NewUIButton.h
    [CODE]
    int m_iMoveTextTipPosX;
    int m_iMoveTextTipPosY;

    Code:
     void MoveTextTipPos(int iX, int iY);
    Code:
    void MoveTextPos(int iX, int iY);
    NewUIButton.cpp
    Code:
    void SEASON3B::CNewUIButton::Initialize()
    
    void SEASON3B::CNewUIButton::Initialize()
    {
    	m_hTextFont = g_hFont;
    	m_hToolTipFont = g_hFont;
    #ifdef KJH_ADD_INGAMESHOP_UI_SYSTEM
    	m_iMoveTextPosX = 0;
    	m_iMoveTextPosY = 0;
    	m_bClickEffect = false;
    	m_iMoveTextTipPosX = 0;
    	m_iMoveTextTipPosY = 0;
    #endif // KJH_ADD_INGAMESHOP_UI_SYSTEM
    }
    ADD
    Code:
    void SEASON3B::CNewUIButton::MoveTextTipPos(int iX, int iY)
    {
    	m_iMoveTextTipPosX = iX;
    	m_iMoveTextTipPosY = iY;
    }
    Find
    Code:
    bool SEASON3B::CNewUIButton::Render( bool RendOption )
    
    y en dentro de la función buscar el if
    
    	if( m_TooltipText.size() != 0 )
    	{
    		if( CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y) )
    		{
    			SIZE Fontsize;
    			g_pRenderText->SetFont( m_hToolTipFont );
    			g_pMultiLanguage->_GetTextExtentPoint32(g_pRenderText->GetFontDC(), m_TooltipText.c_str(), m_TooltipText.size(), &Fontsize);
    
    			Fontsize.cx = Fontsize.cx / 640;
    			Fontsize.cy = Fontsize.cy / 480;
    
    			int x = m_Pos.x+((m_Size.x/2)-(Fontsize.cx/2));
    			int y = m_Pos.y+m_Size.y+2;
    			
    			int _iTempWidth =  x + Fontsize.cx + 6;
    			x = ( _iTempWidth > 640) ? (x - ( _iTempWidth - 640)) : x;
    
    			if( m_IsTopPos ) y = m_Pos.y-(Fontsize.cy+2);
    //-- remplazar este rendertext
    			RenderText( m_TooltipText.c_str(), x, y, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );
    		}
    	}
    Code:
    now replace where the comment marks //-- replace this rendertext
    
    RenderText( m_TooltipText.c_str(), x + m_iMoveTextTipPosX, y + m_iMoveTextTipPosY, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );

    https://www.mediafire.com/file/zgxx3...ition.zip/file

  11. #436
    Newbie aiqiji is offline
    MemberRank
    Sep 2022 Join Date
    20Posts
    After clicking the button, how to set and enable

    - - - Updated - - -

    After clicking the button, how to set and enable



    Quote Originally Posted by Odisk View Post
    Code:
        BITMAP_HERO_POSITION_INFO_BEGIN,
        BITMAP_HERO_POSITION_INFO_END = BITMAP_HERO_POSITION_INFO_BEGIN + 6,
    NewUIButton.h
    [CODE]
    int m_iMoveTextTipPosX;
    int m_iMoveTextTipPosY;

    Code:
     void MoveTextTipPos(int iX, int iY);
    Code:
    void MoveTextPos(int iX, int iY);
    NewUIButton.cpp
    Code:
    void SEASON3B::CNewUIButton::Initialize()
    
    void SEASON3B::CNewUIButton::Initialize()
    {
        m_hTextFont = g_hFont;
        m_hToolTipFont = g_hFont;
    #ifdef KJH_ADD_INGAMESHOP_UI_SYSTEM
        m_iMoveTextPosX = 0;
        m_iMoveTextPosY = 0;
        m_bClickEffect = false;
        m_iMoveTextTipPosX = 0;
        m_iMoveTextTipPosY = 0;
    #endif // KJH_ADD_INGAMESHOP_UI_SYSTEM
    }
    ADD
    Code:
    void SEASON3B::CNewUIButton::MoveTextTipPos(int iX, int iY)
    {
        m_iMoveTextTipPosX = iX;
        m_iMoveTextTipPosY = iY;
    }
    Find
    Code:
    bool SEASON3B::CNewUIButton::Render( bool RendOption )
    
    y en dentro de la función buscar el if
    
        if( m_TooltipText.size() != 0 )
        {
            if( CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y) )
            {
                SIZE Fontsize;
                g_pRenderText->SetFont( m_hToolTipFont );
                g_pMultiLanguage->_GetTextExtentPoint32(g_pRenderText->GetFontDC(), m_TooltipText.c_str(), m_TooltipText.size(), &Fontsize);
    
                Fontsize.cx = Fontsize.cx / 640;
                Fontsize.cy = Fontsize.cy / 480;
    
                int x = m_Pos.x+((m_Size.x/2)-(Fontsize.cx/2));
                int y = m_Pos.y+m_Size.y+2;
                
                int _iTempWidth =  x + Fontsize.cx + 6;
                x = ( _iTempWidth > 640) ? (x - ( _iTempWidth - 640)) : x;
    
                if( m_IsTopPos ) y = m_Pos.y-(Fontsize.cy+2);
    //-- remplazar este rendertext
                RenderText( m_TooltipText.c_str(), x, y, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );
            }
        }
    Code:
    now replace where the comment marks //-- replace this rendertext
    
    RenderText( m_TooltipText.c_str(), x + m_iMoveTextTipPosX, y + m_iMoveTextTipPosY, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );

    https://www.mediafire.com/file/zgxx3...ition.zip/file



Advertisement