![]() |
|
Add extra quickslot bar - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157) +----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128) +----- Thread: Add extra quickslot bar (/showthread.php?tid=4905) |
- nicolasg - 05-02-2022 Hello, I'm trying to add an extra quickslot bar, but I can't get it to show up in the game. If the bar is added, I can put icons on it, use them and so on, but when I hit the + to show it it doesn't appear, I have defined values in ps.dat to show it by default as the 2 extra bars, but it still doesn't appear, do I need to configure anything on the server side other than: #define QUICKSLOT_PAGE_NUM 4 example vid - rondo157 - 05-02-2022 add this line by ps.dat editor?... - Lythenica - 05-02-2022 well try and error is right here, what if you add a 4th line to with 4 at the end 1-3 already exists... maybe some client changes are needed additionaly but idk never tried it. It would be hard with mapping them aswell cause it's not gonna be mapped tho - Desarija - 05-02-2022 Have u added UI_QUICKSLOT4 and all that stuff that is there for qs 2+3? I have never tried it either, but it looks like u need to add a bunch of things on the client side - Veni - 05-02-2022 You can't just change the num of bars, you need to change some code afaik for it to work, editing ps.dat and adding these values wont be everything you need to do, just like Desarija said. - nicolasg - 05-02-2022 don't post any of the code because it's a lot and it's spread over several files, but I'll try... Engine.cpp INDEX g_iXPosQuickSlotEX3=0; INDEX g_iYPosQuickSlotEX3=0; INDEX g_bQuickSlotEX3=0; INDEX g_bQuickSlot3HorOrVer=1; INDEX g_bQuickSlot3Lock=0; _pShell->DeclareSymbol("persistent INDEX g_iXPosQuickSlotEX3;", &g_iXPosQuickSlotEX3); _pShell->DeclareSymbol("persistent INDEX g_iYPosQuickSlotEX3;", &g_iYPosQuickSlotEX3); _pShell->DeclareSymbol("persistent INDEX g_bQuickSlotEX3;", &g_bQuickSlotEX3); _pShell->DeclareSymbol("persistent INDEX g_bQuickSlot3HorOrVer;", &g_bQuickSlot3HorOrVer); _pShell->DeclareSymbol("persistent INDEX g_bQuickSlot3Lock;", &g_bQuickSlot3Lock); UIQuickSlot.h #define QSLOT_PAGE_COUNT 4 extern INDEX g_bQuickSlotEX3; enum QSLOT { QS_1 = 0, QS_2, QS_3, QS_END }; UIRect m_rcTitle3; //I think this is not necessary at all, at least at this WIP stage UIRectUV m_rtSlotNumberText3; //I think this is not necessary at all, at least at this WIP stage UIChildQuickSlot.h BOOL m_bEXSlot3On; enum CHILDQSLOT { CHILD_QS_1 = 0, CHILD_QS_2, CHILD_QS_3, QS_END }; UIWindowDeclare.h UI_QUICKSLOT4, UIWindowDeclare.cpp m_apUIs[UI_QUICKSLOT4] = new CUIChildQuickSlot(UI_QUICKSLOT4); m_apUIs[UI_QUICKSLOT4]->Create( NULL,0 , 0, CHILD_QUICKSLOT_WIDTH, CHILD_QUICKSLOT_HEIGHT ); UIChildQuickSlot.cpp extern INDEX g_iXPosQuickSlotEX3; extern INDEX g_iYPosQuickSlotEX3; extern INDEX g_bQuickSlot3HorOrVer; extern INDEX g_bQuickSlot3Lock; # CUIChildQuickSlot::CUIChildQuickSlot m_bRotation[2] = &g_bQuickSlot3HorOrVer; m_bLock[2] = &g_bQuickSlot3Lock; m_bEXSlot3On = FALSE; # CUIChildQuickSlot::Create case UI_QUICKSLOT4: { m_rtHorzSlotNumber.SetUV(120, 537, 534, 547, fTexWidth, fTexHeight); m_rtVerSlotNumber.SetUV(30, 533, 59, 925, fTexWidth, fTexHeight); } break; # CUIChildQuickSlot::CheckOnOff case UI_QUICKSLOT4: { m_strPageNumber = CTString("4"); if (g_bQuickSlotEX3) m_bEXSlot3On = TRUE; break; } # CUIChildQuickSlot::FirstOpen case UI_QUICKSLOT4: { if (m_bEXSlot3On) { OpenUI(); m_bEXSlot3On = FALSE; } }break; # CUIChildQuickSlot::SlotNumberRender case UI_QUICKSLOT4: { pDrawPort->AddTexture(nX, nY, nX + 414, nY + 7 , m_rtHorzSlotNumber.U0, m_rtHorzSlotNumber.V0 , m_rtHorzSlotNumber.U1, m_rtHorzSlotNumber.V1 , 0xFFFFFFFF); break; } /*--AND AFTER ELSE--*/ case UI_QUICKSLOT4: { pDrawPort->AddTexture(nX, nY, nX + 29, nY + 392 , m_rtVerSlotNumber.U0, m_rtVerSlotNumber.V0 , m_rtVerSlotNumber.U1, m_rtVerSlotNumber.V1 , 0xFFFFFFFF); break; } # CUIChildQuickSlot::ResetSavePosition g_iXPosQuickSlotEX3 = 0; g_iYPosQuickSlotEX3 = 0; g_bQuickSlot3HorOrVer = 1; g_bQuickSlot3Lock = 0; # CUIChildQuickSlot::ResetPosition case UI_QUICKSLOT4: { nBaseYGap = 111; if (g_iXPosQuickSlotEX3 == 0 && g_iYPosQuickSlotEX3 == 0) { m_nStartX = pixMaxI - m_nWidth; m_nStartY = pixMaxJ - m_nHeight - 44/*QUICKSLOT_HEIGHT*/ - CHILD_QUICKSLOT_HEIGHT; bSave = FALSE; } break; } # CUIChildQuickSlot::OpenUI // ¿Maybe the problems is here? case UI_QUICKSLOT4: { g_bQuickSlotEX3 = 1; if (g_iXPosQuickSlotEX3 == 0 && g_iYPosQuickSlotEX3 == 0) { SetPos(m_nStartX, m_nStartY); break; } SetPos( g_iXPosQuickSlotEX3, g_iYPosQuickSlotEX3 ); break; } # CUIChildQuickSlot::_CloseUI case UI_QUICKSLOT4: g_bQuickSlotEX3 = 0; break; # CUIChildQuickSlot::SetPosEXQSlot case UI_QUICKSLOT4: { g_iXPosQuickSlotEX3 = GetPosX(); g_iYPosQuickSlotEX3 = GetPosY(); break; } UIQuickSlot.cpp # CUIQuickSlot::Create m_rtSlotNumberText3.SetUV(120, 557, 526, 564, fTexWidth, fTexHeight); // WIP m_pChildQuickSlot[QS_3] = CUIManager::getSingleton()->GetUI(UI_QUICKSLOT4); ((CUIChildQuickSlot*)m_pChildQuickSlot[QS_3])->SetItem(&m_abtnItems); # CUIQuickSlot::ShowExSlotInfo case 3: { m_btnPrevSlot.GetAbsPos( nInfoPosX, nInfoPosY ); int PrevPage = m_nCurrentPage>0 ? m_nCurrentPage : 4 ; // NICOLASG MARK (QUICKSLOT) OG: int PrevPage = m_nCurrentPage>0 ? m_nCurrentPage : 3 ; CTString str; str.PrintF("%d %s(Alt+%d)", PrevPage, _S(3076, "횈채횑횁철"), PrevPage); m_strSlotInfo =str; } break; //쨈횢쩍 횈채횑횁철 쨔철횈째 case 4: { m_btnNextSlot.GetAbsPos( nInfoPosX, nInfoPosY ); int NextPage = (m_nCurrentPage+3)<=4 ? m_nCurrentPage+3 : 1; // NICOLASG MARK (QUICKSLOT) OG: int NextPage = (m_nCurrentPage+2)<=3 ? m_nCurrentPage+2 : 1; CTString str; str.PrintF("%d %s(Alt+%d)", NextPage, _S(3076, "횈채횑횁철"), NextPage); m_strSlotInfo =str; } break; # CUIQuickSlot::RenderBtns // This only render key shortcuts indicator above icons... WIP /*case 3: { pDrawPort->AddTexture( posX, posY, posX + 414, posY + 7, m_rtSlotNumberText3.U0, m_rtSlotNumberText3.V0, m_rtSlotNumberText3.U1, m_rtSlotNumberText3.V1, 0xFFFFFFFF ); } break;*/ # CUIQuickSlot::ToggleVisibleEXQuickSlot //this func is for show up or hide extra bars. (I don't know much about c++ so I don't really know what each operator does, at first I thought I had to define the minimum and maximum, but it seems that is not the case, however, deactivating this function continues to show qs1 and qs2 as long as everything is defined in ps.dat so this can't be the problem) if (bResultView) { nCurOpenUI = g_bQuickSlotEX1 >= 1 ? (g_bQuickSlotEX3 >= 1 ? -1 : 1) : 0; // NICOLASG MARK (QUICKSLOT) OG: nCurOpenUI = g_bQuickSlotEX1 >= 1 ? (g_bQuickSlotEX2 >= 1 ? -1 : 1) : 0; } else { nCurOpenUI = g_bQuickSlotEX1 >= 1 ? (g_bQuickSlotEX3 >= 1 ? 1 : 0) : -1; // NICOLASG MARK (QUICKSLOT) OG: nCurOpenUI = g_bQuickSlotEX1 >= 1 ? (g_bQuickSlotEX2 >= 1 ? 1 : 0) : -1; } # CUIQuickSlot::CheckSlotEXBtn // CASE QSLOT_ADD if (g_bQuickSlotEX1 && g_bQuickSlotEX2 && g_bQuickSlotEX3) // NICOLASG MARK (QUICKSLOT) OG: if (g_bQuickSlotEX1 && g_bQuickSlotEX2) // CASE QSLOT_DEL if (!g_bQuickSlotEX1 && !g_bQuickSlotEX2 && !g_bQuickSlotEX3) // NICOLASG MARK (QUICKSLOT) OG: if (!g_bQuickSlotEX1 && !g_bQuickSlotEX2) # CUIQuickSlot::SetDisableCheckSlotEX if (g_bQuickSlotEX1 && g_bQuickSlotEX2 && g_bQuickSlotEX3) // NICOLASG MARK (QUICKSLOT) OG: if (g_bQuickSlotEX1 && g_bQuickSlotEX2) else if (!g_bQuickSlotEX1 && !g_bQuickSlotEX2 && !g_bQuickSlotEX3) // NICOLASG MARK (QUICKSLOT) OG: else if (!g_bQuickSlotEX1 && !g_bQuickSlotEX2) I thought it would be as simple as repeating the code already written, but it seems that something else still needs to be defined and I don't know where... p.s: clarification, the 4th bar itself works, but it is not shown, in case there is any doubt - nicolasg - 05-02-2022 I begin to believe that it is related to some .es file... - Veni - 05-02-2022 ya its like you said, kinda hard to see whats going on witht that much stuff, I can only suggest your to look into the function that handles the + button click (whichever that is) and check it. I never heard about any problems with .es files and to my knowledge thats not the case at all. Maybe if you just check the + button itself, you might find it. - nicolasg - 05-02-2022 Missing ((CUIChildQuickSlot*)pUIManager->GetUI(UI_QUICKSLOT4))->FirstOpen(); in SessionState.cpp to show extra bar by default (if it was defined in ps.dat) now just need to configure properly ToggleVisibleEXQuickSlot - rondo157 - 05-07-2022 I did it but i have duplicate 3 and 4 qs 2 |