Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Paylaşım VSRO Geliştirilmiş Unique Manager Arayüzü

Paylaşım

ForumKolik

Roc
Moderatör
Katılım
9 May 2023
Mesajlar
175
Tepkime puanı
95
Puanları
0
Herkese selamlar, dürüst olmak gerekirse, bu arayüzü geliştirmek tam bir baş ağrısıydı. Buna rağmen, artık kullanımınıza sunulmuş durumda. Lütfen unutmayın ki, ana kütüphane yani devkit ile bir bağlantım yok ve filtre ile de ilişkili değilim. Sadece bu formu paylaşmak amacıyla sunuyorum.

Önizleme:
t1pigab.png


4Jsqaab.png


b2S8fab.png


Nt2Ncab.png


Kaynak :

IFUFUQManager.cpp
IFUFUQManager.h
IFUFUQManagerList.cpp
IFUFUQManagerList.h

IFUFUQManager.cpp
SQL:
#include "IFUFUQManager.h"
#include "IFTitleManager.h"
#include <NetProcessIn.h>
#include <ICPlayer.h>
#include "GInterface.h"
#include "TextStringManager.h"
#include "IFSystemMessage.h"
#include "Game.h"
#include "IFMainMenu.h"
#include <ctime>
#include <algorithm>

#define REFRESH_CLICKID 0
GFX_IMPLEMENT_DYNCREATE(CIFUQManager, CIFMainFrame)
GFX_BEGIN_MESSAGE_MAP(CIFUQManager, CIFMainFrame)
ONG_COMMAND(REFRESH_CLICKID, &CIFUQManager::OnRefreshClicked)
ONG_COMMAND(8, &CIFUQManager::OnSearchClicked)
ONG_COMMAND(9, &CIFUQManager::OnViewClicked)
ONG_COMMAND(10, &CIFUQManager::OnOptionChanged)
ONG_COMMAND(12, &CIFUQManager::OnOptionChanged)
ONG_COMMAND(14, &CIFUQManager::OnOptionChanged)

GFX_END_MESSAGE_MAP()
std::vector<CIFUQManager::UniqueHashMapStruct> CIFUQManager::UQlist;


bool CIFUQManager::OnCreate(long ln)
{
    //printf("> " __FUNCTION__ "(%d)\n", ln);

    // Populate inherited members
    CIFMainFrame::OnCreate(ln);
    SetText(L"Unique History (F6)");
    TB_Func_13("interface\\frame\\mframe_wnd_", 0, 0);
    wnd_rect sz;
    sz.pos.x = 10;
    sz.pos.y = 40;
    sz.size.width = 607;
    sz.size.height = 315;
    m_Frame = (CIFFrame*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFFrame), sz, 1, 1);
    m_Frame->TB_Func_13("interface\\inventory\\int_window_", 0, 0);
    m_Frame->BringToFront();

    sz.pos.x = 18;
    sz.pos.y = 46;
    sz.size.width = 592;
    sz.size.height = 305;
    BG_Tile = (CIFNormalTile*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFNormalTile), sz, 2, 1);
    BG_Tile->TB_Func_13("interface\\ifcommon\\bg_tile\\com_bg_tile_b.ddj", 0, 0);
    BG_Tile->BringToFront();

    sz.pos.x = 21;
    sz.pos.y = 102;
    sz.size.width = 184;
    sz.size.height = 24;
    bars[1] = (CIFBarWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFBarWnd), sz, 3, 0);
    bars[1]->TB_Func_13("interface\\ifcommon\\com_bar02_", 1, 1);
    bars[1]->SetText(L"Unique Name");
    bars[1]->BringToFront();

    sz.pos.x = bars[1]->GetBounds().pos.x + bars[1]->GetSize().width;
    sz.pos.y = 102;
    sz.size.width = 70;
    sz.size.height = 24;
    bars[2] = (CIFBarWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFBarWnd), sz, 3, 0);
    bars[2]->TB_Func_13("interface\\ifcommon\\com_bar02_", 1, 1);
    bars[2]->SetText(L"Status");
    bars[2]->BringToFront();

    sz.pos.x = bars[2]->GetBounds().pos.x + bars[2]->GetSize().width;
    sz.pos.y = 102;
    sz.size.width = 132;
    sz.size.height = 24;
    bars[3] = (CIFBarWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFBarWnd), sz, 3, 0);
    bars[3]->TB_Func_13("interface\\ifcommon\\com_bar02_", 1, 1);
    bars[3]->SetText(L"Last Slayer");
    bars[3]->BringToFront();

    sz.pos.x = bars[3]->GetBounds().pos.x + bars[3]->GetSize().width;
    sz.pos.y = 102;
    sz.size.width = 185;
    sz.size.height = 24;
    bars[4] = (CIFBarWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFBarWnd), sz, 3, 0);
    bars[4]->TB_Func_13("interface\\ifcommon\\com_bar02_", 1, 1);
    bars[4]->SetText(L"Elapsed Time (ago)");
    bars[4]->BringToFront();


    sz.pos.x = bars[4]->GetBounds().pos.x + bars[4]->GetSize().width;
    sz.pos.y = 102;
    sz.size.width = 16;
    sz.size.height = 24;
    labels[1] = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), sz, 4, 0);
    labels[1]->TB_Func_13("interface\\guild\\gil_shape.ddj", 1, 1);
    labels[1]->BringToFront();

    sz.pos.x = 200;
    sz.pos.y = 43;
    sz.size.width = 16;
    sz.size.height = 24;
    labels[2] = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), sz, 6, 0);
    labels[2]->BringToFront();
    labels[2]->SetText(L"Look For a Unique:");
    labels[2]->SetTextColor(0xDBC99B);

    sz.pos.x = 261;
    sz.pos.y = 46;
    sz.size.width = 16;
    sz.size.height = 24;
    UQEdit = (CIFEdit*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFEdit), sz, 7, 0);
    UQEdit->SetGWndSize(175, 20);
    UQEdit->TB_Func_13("interface\\exchange\\exc_box.ddj", 0, 0);
    UQEdit->TB_Func_5(1);
    UQEdit->TB_Func_6(1);
    UQEdit->m_FontTexture.sub_8B4400(1, 0);
    UQEdit->m_FontTexture.sub_8B4750(1);
    UQEdit->BringToFront();
    UQEdit->FUN_00634f80(30);


    sz.pos.x = labels[1]->GetBounds().pos.x + labels[1]->GetSize().width - 580;
    sz.pos.y = labels[1]->GetBounds().pos.y + labels[1]->GetSize().height - 3;
    sz.size.width = 572;
    sz.size.height = 224;
    m_scroll = (CIFScrollManager*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFScrollManager), sz, 5, 0);
    

    sz.pos.x = 20;//20
    sz.pos.y = 124;//72
    sz.size.width = 550;
    sz.size.height = 24;
    for (int i = 0; i < 99; i++) {
        RECT m_Slots = { 20,124,560,24 };
        m_Slots.top += 22 * i;
        m_slots[i] = (CIFUQManagerList*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFUQManagerList), m_Slots, 101, 0);
        m_slots[i]->BringToFront();
    }
    for (int i = 0; i < 10; i++)
        m_slots[i]->ShowGWnd(true);
    for (int i = 0; i < 99; i++)
        m_slots[i]->m_ufbar01->BringToFront();
    for (int i = 0; i < 99; i++)
        m_slots[i]->m_ufbar02->BringToFront();
    for (int i = 0; i < 99; i++)
        m_slots[i]->m_ufbar03->BringToFront();
    sz.pos.x = 19;
    sz.pos.y = 101;
    sz.size.width = 574;
    sz.size.height = 248;
    blacksquare = (CIFStretchWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStretchWnd), sz, 109, 0);
    blacksquare->SetEdgeTextures("interface\\ifcommon\\com_blacksquare_right_side.ddj", "interface\\ifcommon\\com_blacksquare_left_up.ddj",
        "interface\\ifcommon\\com_blacksquare_right_side.ddj", "interface\\ifcommon\\com_blacksquare_right_side.ddj");
    blacksquare->BringToFront();

    for (int i = 1; i <= 4; i++)
        bars[i]->BringToFront();

    m_scroll->m_verticalScroll->SetUniqueID(10);
    m_scroll->sub_008124F0(0);
    m_scroll->sub_008124C0(0x16);
    m_scroll->sub_008123F0(10);
    m_scroll->sub_00812500(0);
    m_scroll->sub_00812420(-8, 0);
    m_scroll->BringToFront();

    sz.pos.x = 146;
    sz.pos.y = 72;
    sz.size.width = 90;
    sz.size.height = 24;
    RefreshClick[0] = (CIFButton*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFButton), sz, REFRESH_CLICKID, 0);
    RefreshClick[0]->SetText(L"Refresh");
    RefreshClick[0]->BringToFront();
    RefreshClick[0]->TB_Func_13("interface\\ifcommon\\com_button.ddj", 0, 0);

    sz.pos.x = 250;
    sz.pos.y = 72;
    sz.size.width = 90;
    sz.size.height = 24;
    RefreshClick[1] = (CIFButton*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFButton), sz, 8, 0);
    RefreshClick[1]->SetText(L"Search");
    RefreshClick[1]->BringToFront();
    RefreshClick[1]->TB_Func_13("interface\\ifcommon\\com_button.ddj", 0, 0);

    sz.pos.x = 354;
    sz.pos.y = 72;
    sz.size.width = 90;
    sz.size.height = 24;
    RefreshClick[2] = (CIFButton*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFButton), sz, 9, 0);
    RefreshClick[2]->SetText(L"View Data");
    RefreshClick[2]->BringToFront();
    RefreshClick[2]->TB_Func_13("interface\\ifcommon\\com_button.ddj", 0, 0);
    BYTE ix = 0;
    int sCount = 99;
    while (ix < sCount && sCount > 0) {
        m_scroll->AddItem(m_slots[ix], 1, 0);
        ix++;
    }
    RECT rect = { 0,0,0,0 };
    ShowOnlyDeadUqsBox = (CIFCheckBox*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFCheckBox), rect, 10, 0);
    ShowOnlyDeadUqsDESC = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect, 11, 0);
    ShowOnlyDeadUqsBox->BringToFront();
    ShowOnlyDeadUqsBox->MoveGWnd(480, 45);//kant 28
    ShowOnlyDeadUqsBox->SetGWndSize(16, 16);
    ShowOnlyDeadUqsBox->TB_Func_13("interface\\ifcommon\\ifcommon\\com_checkbutton.ddj", 0, 0);
    ShowOnlyDeadUqsDESC->MoveGWnd(ShowOnlyDeadUqsBox->GetBounds().pos.x + 19, ShowOnlyDeadUqsBox->GetBounds().pos.y + 1);
    ShowOnlyDeadUqsDESC->SetText(L"Show Only Dead");
    ShowOnlyDeadUqsDESC->TB_Func_5(0);
    ShowOnlyDeadUqsDESC->TB_Func_6(0);
    ShowOnlyDeadUqsDESC->BringToFront();

    ShowOnlyAliveUqsBox = (CIFCheckBox*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFCheckBox), rect, 12, 0);
    ShowOnlyAliveUqsDESC = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect, 13, 0);
    ShowOnlyAliveUqsBox->BringToFront();
    ShowOnlyAliveUqsBox->MoveGWnd(480, 65);//kant 28
    ShowOnlyAliveUqsBox->SetGWndSize(16, 16);
    ShowOnlyAliveUqsBox->TB_Func_13("interface\\ifcommon\\ifcommon\\com_checkbutton.ddj", 0, 0);
    ShowOnlyAliveUqsDESC->MoveGWnd(ShowOnlyAliveUqsBox->GetBounds().pos.x + 19, ShowOnlyAliveUqsBox->GetBounds().pos.y + 1);
    ShowOnlyAliveUqsDESC->SetText(L"Show Only Alive");
    ShowOnlyAliveUqsDESC->TB_Func_5(0);
    ShowOnlyAliveUqsDESC->TB_Func_6(0);
    ShowOnlyAliveUqsDESC->BringToFront();

    ShowOnlyMyKillsUqsBox = (CIFCheckBox*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFCheckBox), rect, 14, 0);
    ShowOnlyMyKillsUqsDESC = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect, 15, 0);
    ShowOnlyMyKillsUqsBox->BringToFront();
    ShowOnlyMyKillsUqsBox->MoveGWnd(480, 85);//kant 28
    ShowOnlyMyKillsUqsBox->SetGWndSize(16, 16);
    ShowOnlyMyKillsUqsBox->TB_Func_13("interface\\ifcommon\\ifcommon\\com_checkbutton.ddj", 0, 0);
    ShowOnlyMyKillsUqsDESC->MoveGWnd(ShowOnlyMyKillsUqsBox->GetBounds().pos.x + 19, ShowOnlyMyKillsUqsBox->GetBounds().pos.y + 1);
    ShowOnlyMyKillsUqsDESC->SetText(L"Show Only MyKills");
    ShowOnlyMyKillsUqsDESC->TB_Func_5(0);
    ShowOnlyMyKillsUqsDESC->TB_Func_6(0);
    ShowOnlyMyKillsUqsDESC->BringToFront();
    ShowOnlyDeadUqsBox->FUN_00656d50(false);
    ShowOnlyAliveUqsBox->FUN_00656d50(false);
    ShowOnlyMyKillsUqsBox->FUN_00656d50(false);

    this->ShowGWnd(false);
    UpdateMenuSize();
    return true;

}
void CIFUQManager::ClearDDJ() {
    for (int i = 0; i < 99; ++i)
        m_slots[i]->ClearDDJ();
}
void CIFUQManager::Clear()
{
    int sCount = 99;
    BYTE ix = 0;
    while (ix < sCount && sCount > 0) {
        m_slots[ix]->m_UQName->SetText(L"");
        m_slots[ix]->m_State->SetText(L"");
        m_slots[ix]->m_Slayer->SetText(L"");
        m_slots[ix]->m_agoTime->SetText(L"");
        ix++;
    }
}
void CIFUQManager::UpdateMenuSize()
{
    screenCenterPoint.x = theApp.GetClientDimensionStuff().width * 0.5;
    screenCenterPoint.y = theApp.GetClientDimensionStuff().height * 0.5;

    USHORT PosX = 0, PosY = 165;
    PosX = CLIENT_SCREEN_WIDTH - 750;
    this->MoveGWnd((screenCenterPoint.x - 500 * 0.5), (screenCenterPoint.y - 500 * 0.5));
}
void CIFUQManager::OnRefreshClicked()
{
    CMsgStreamBuffer buf(0x2A17);
    SendMsg(buf);
    UpdateLog();
}
void CIFUQManager::OnSearchClicked()
{
    if (UQEdit->GetNText().length() > 0)
    {
        CMsgStreamBuffer buf(0x2A17);
        SendMsg(buf);
        UpdateLogForSearchBtn();
    }
}
void CIFUQManager::OnViewClicked()
{
    if (RefObjID.length() > 0)
    {
        CMsgStreamBuffer buf(0x2A15);
        buf << std::n_string(TO_NSTRING(CIFMainMenu::UqManagerW->RefObjID).c_str());
        SendMsg(buf);
        const ClientResolutonData& res = CGame::GetClientDimensionStuff();
        CIFMainMenu::DpsW->MoveGWnd(((res.width - GetSize().width) + 320), GetPos().y + 60);
        CIFMainMenu::DpsW->BringToFront();

    }
}
void CIFUQManager::OnOptionChanged()
{
    if (ShowOnlyDeadUqsBox->GetCheckedState_MAYBE())
    {
        ShowOnlyAliveUqsBox->FUN_00656d50(false);
        ShowOnlyMyKillsUqsBox->FUN_00656d50(false);
    }
    if (ShowOnlyAliveUqsBox->GetCheckedState_MAYBE())
    {
        ShowOnlyDeadUqsBox->FUN_00656d50(false);
        ShowOnlyMyKillsUqsBox->FUN_00656d50(false);
    }
    if (ShowOnlyMyKillsUqsBox->GetCheckedState_MAYBE())
    {
        ShowOnlyDeadUqsBox->FUN_00656d50(false);
        ShowOnlyAliveUqsBox->FUN_00656d50(false);
    }
}
void  CIFUQManager::UpdateLog()
{
    Clear();
        int count = 0;
        for (std::vector<CIFUQManager::UniqueHashMapStruct>::iterator it = CIFUQManager::UQlist.begin(); it != CIFUQManager::UQlist.end(); ++it)
        {
            if (!ShowOnlyMyKillsUqsBox->GetCheckedState_MAYBE() && !ShowOnlyDeadUqsBox->GetCheckedState_MAYBE() && !ShowOnlyAliveUqsBox->GetCheckedState_MAYBE())
            {
                m_slots[count]->UpdateItems((*it).UqName.c_str(), (*it).LifeState.c_str(), (*it).Killer.c_str(), (*it).agoTime.c_str(), (*it).RefObjID);
                count++;
            }
            else
            {
                if (ShowOnlyMyKillsUqsBox->GetCheckedState_MAYBE())
                {
                    if (wcscmp((*it).Killer.c_str(), g_pCICPlayer->GetCharName().c_str()) == 0)
                    {
                        m_slots[count]->UpdateItems((*it).UqName.c_str(), (*it).LifeState.c_str(), (*it).Killer.c_str(), (*it).agoTime.c_str(), (*it).RefObjID);
                        count++;
                    }
                }
                if (ShowOnlyDeadUqsBox->GetCheckedState_MAYBE())
                {
                    if (wcscmp((*it).LifeState.c_str(), L"Dead") == 0)
                    {
                        m_slots[count]->UpdateItems((*it).UqName.c_str(), (*it).LifeState.c_str(), (*it).Killer.c_str(), (*it).agoTime.c_str(), (*it).RefObjID);
                        count++;
                    }
                }
                if (ShowOnlyAliveUqsBox->GetCheckedState_MAYBE())
                {
                    if (wcscmp((*it).LifeState.c_str(), L"Alive") == 0)
                    {
                        m_slots[count]->UpdateItems((*it).UqName.c_str(), (*it).LifeState.c_str(), (*it).Killer.c_str(), (*it).agoTime.c_str(), (*it).RefObjID);
                        count++;
                    }
                }
            }
        }
}

void CIFUQManager::UpdateLogForSearchBtn()
{
    Clear();
    int count = 0;
    std::wstring SearchSTR = UQEdit->GetNText().c_str();
    std::transform(SearchSTR.begin(), SearchSTR.end(), SearchSTR.begin(), ::tolower);
    // Use std::wstring instead of std::string for uqName
    for (std::vector<CIFUQManager::UniqueHashMapStruct>::iterator it = CIFUQManager::UQlist.begin(); it != CIFUQManager::UQlist.end(); ++it)
    {
        std::wstring uqName = (*it).UqName;
        std::transform(uqName.begin(), uqName.end(), uqName.begin(), ::tolower);
        // Use std::wstring::find instead of std::string::find
        if (uqName.find(SearchSTR.c_str()) != std::wstring::npos)
        {
            m_slots[count]->UpdateItems((*it).UqName.c_str(), (*it).LifeState.c_str(), (*it).Killer.c_str(), (*it).agoTime.c_str(), (*it).RefObjID);
            count++;
        }
    }
}

void CIFUQManager::OnUpdate()
{
}


IFUFUQManager.h

SQL:
#pragma once
#include "IFMainFrame.h"
#include "IFUniqueList.h"
#include "IFChatViewer.h"
#include "IFSpinButton.h"
#include <list>
#include <IFCheckBox.h>
#include "IFBarWnd.h"
#include "IFNormalTile.h"
#include "IFStretchWnd.h"
#include "IFScrollManager.h"
#include "IFUFUQManagerList.h"
class CIFUQManager : public CIFMainFrame
{
    GFX_DECLARE_DYNCREATE(CIFUQManager)
        GFX_DECLARE_MESSAGE_MAP(CIFUQManager)

public:
    bool OnCreate(long ln) override;
    void OnUpdate() override;
    void ClearDDJ();
    void Clear();
    //static bool UqListContains(const wchar_t* UqName);
    void UpdateLog();
    void UpdateLogForSearchBtn();
    void UpdateMenuSize();
    void OnRefreshClicked();
    void OnViewClicked();
    void OnSearchClicked();
    void OnOptionChanged();

public:
    static struct UniqueHashMapStruct
    {
        std::wstring UqName;
        std::wstring LifeState;
        std::wstring Killer;
        std::wstring agoTime;
        int RefObjID;
    };
    static std::vector<UniqueHashMapStruct> UQlist;


public:
    CIFFrame* m_Frame;
    CIFNormalTile* BG_Tile;
    CIFBarWnd* bars[10];
    CIFStatic* labels[10];
    CIFScrollManager* m_scroll;
    CIFUQManagerList* m_slots[100];
    CIFStretchWnd* blacksquare;
    CIFButton* RefreshClick[3];
    CIFEdit* UQEdit;
    CIFCheckBox* ShowOnlyDeadUqsBox;
    CIFStatic* ShowOnlyDeadUqsDESC;
    CIFCheckBox* ShowOnlyAliveUqsBox;
    CIFStatic* ShowOnlyAliveUqsDESC;
    CIFCheckBox* ShowOnlyMyKillsUqsBox;
    CIFStatic* ShowOnlyMyKillsUqsDESC;

    POINT screenCenterPoint;
    std::n_wstring RefObjID;

};


IFUFUQManagerList.cpp

SQL:
#include "IFUFUQManagerList.h"
#include "IFMainMenu.h"
#include <GInterface.h>
#include <ICPlayer.h>

 

GFX_IMPLEMENT_DYNCREATE(CIFUQManagerList, CIFWnd)
GFX_BEGIN_MESSAGE_MAP(CIFUQManagerList, CIFWnd)
GFX_END_MESSAGE_MAP()


bool CIFUQManagerList::OnCreate(long ln)
{

    // Populate inherited members
    CIFWnd::OnCreate(ln);
    RECT rect2 = { 184,0,4,24 };
    m_ufbar01 = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect2, 6, 0);
    m_ufbar01->TB_Func_13("interface\\ifcommon\\com_bar01_left.ddj", 0, 0);
    RECT rect3 = { 184+70,0,4,24 };
    m_ufbar02 = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect3, 7, 0);
    m_ufbar02->TB_Func_13("interface\\ifcommon\\com_bar01_left.ddj", 0, 0);
    RECT rect4 = { 184+70+132,0,4,24 };
    m_ufbar03 = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect4, 8, 0);
    m_ufbar03->TB_Func_13("interface\\ifcommon\\com_bar01_left.ddj", 0, 0);

    RECT rect = { 0,0,570,24 };
    bar = (CIFBarWnd*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFBarWnd), rect, 5, 0);
    bar->TB_Func_13("interface\\ifcommon\\com_bar01_", 1, 1);

    RECT rect5 = { 12 / 2 ,0,4,24 };
    m_UQName = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect5, 9, 0);
    m_UQName->SetTextColor(0xDBC99B);
    m_UQName->TB_Func_5(0);
    RECT rect6 = { 184+70 / 2 ,0,4,24 };
    m_State = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect6, 10, 0);
    m_State->SetTextColor(0x03CC00); //Dead == 8b0000 , Alive == 0x03CC00
    RECT rect7 = { 184 + 70+132 / 2 ,0,4,24 };
    m_Slayer = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect7, 11, 0);
    m_Slayer->SetTextColor(0xffffff);
    RECT rect8 = { 184 + 70 + 132 + 185 / 2 ,0,4,24 };
    m_agoTime = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect8, 12, 0);
    m_agoTime->SetTextColor(0xffffff);
    m_RefObjID = (CIFStatic*)CGWnd::CreateInstance(this, GFX_RUNTIME_CLASS(CIFStatic), rect8, 13, 0);
    m_RefObjID->SetTextColor(0xffffff);
    m_RefObjID->ShowGWnd(false);
    this->BringToFront();

    this->ShowGWnd(false);
    return true;

}
void CIFUQManagerList::ClearDDJ()
{
    bar->TB_Func_13("interface\\ifcommon\\com_bar01_", 1, 1);
}
int CIFUQManagerList::OnMouseLeftUp(int a1, int x, int y) {

    //printf("name: %ls\n", m_UQName->GetNText().c_str());
    if (m_UQName->GetNText().length() > 0)
    {
        CIFMainMenu::UqManagerW->ClearDDJ();
        bar->TB_Func_13("interface\\ifcommon\\com_bar01select_", 1, 1);
        CIFMainMenu::UqManagerW->RefObjID = m_RefObjID->GetNText();
    }
    else
        CIFMainMenu::UqManagerW->ClearDDJ();

    return true;
}
void CIFUQManagerList::UpdateItems(const wchar_t* UQName, const wchar_t* State, const wchar_t* Slayer, const wchar_t* m_TimeElapsed, int RefObjID)
{
    BringToFront();
    m_UQName->SetText(UQName);
    m_State->SetText(State);
    m_Slayer->SetText(Slayer);
    m_agoTime->SetText(m_TimeElapsed);
    std::wostringstream myStringStream;
    myStringStream << RefObjID;
    std::wstring concatenatedStr = myStringStream.str();
    m_RefObjID->SetText(concatenatedStr.c_str());
    if (wcscmp(State, L"Alive") == 0)
        m_State->SetTextColor(0x03CC00);
    else
        m_State->SetTextColor(0x8b0000);
    if (g_pCICPlayer)
    {
        if (wcscmp(Slayer, g_pCICPlayer->GetCharName().c_str()) == 0)
            m_Slayer->SetTextColor(0x03CC00);
        else
            m_Slayer->SetTextColor(0xFFFFFF);
    }
}

void CIFUQManagerList::OnUpdate()
{
}

IFUFUQManagerList.h

SQL:
#pragma once
#include "IFMainFrame.h"
#include "IFBarWnd.h"
#include "IFStatic.h"
class CIFUQManagerList : public CIFWnd
{
GFX_DECLARE_DYNCREATE(CIFUQManagerList)
GFX_DECLARE_MESSAGE_MAP(CIFUQManagerList)

public:
    bool OnCreate(long ln) override;
    void OnUpdate() override;
    int OnMouseLeftUp(int a1, int x, int y) override;
    void ClearDDJ();
    void UpdateItems(const wchar_t* UQName, const wchar_t* State, const wchar_t* Slayer, const wchar_t* m_TimeElapsed, int RefObjID);


    CIFBarWnd* bar;
    CIFStatic* m_UQName;
    CIFStatic* m_State;
    CIFStatic* m_Slayer;
    CIFStatic* m_agoTime;
    CIFStatic* m_RefObjID;
    CIFStatic* m_ufbar01;
    CIFStatic* m_ufbar02;
    CIFStatic* m_ufbar03;

};
 

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.