[Release] Resizeable Inventory

04/02/2019 21:41 ♪Chiqupon♫#46
Is was an ODBC issue, nothing was wrong with the source. :)
06/21/2019 05:43 lasdra03#47
Hi! I was wondering, can anyone hook me up with your v17 or higher resdata? I have an error of this..
Code:
 2019/ 6/20   20:36:04   GetDlgItem : nID=143 not Found.
I think this is in resdata?
04/14/2020 17:57 Wezzy_Dev#48
sad!

i change

#ifdef _INVENTORY_RESIZEABLE
for(int i = 1; ; i++)
{
CTexture *ptex = NULL;
char tmp[32] = { 0 };

TO

#ifdef _INVENTORY_RESIZEABLE
for(int i = 1; i <= 12; i++)
{
CTexture *ptex = NULL;
char tmp[32] = { 0 };

And still

error Theme\Default\InvGrid13.bmp not found
04/14/2020 19:58 Hyellow#49
Quote:
Originally Posted by Wezzy_Dev View Post
sad!

i change

#ifdef _INVENTORY_RESIZEABLE
for(int i = 1; ; i++)
{
CTexture *ptex = NULL;
char tmp[32] = { 0 };

TO

#ifdef _INVENTORY_RESIZEABLE
for(int i = 1; i <= 12; i++)
{
CTexture *ptex = NULL;
char tmp[32] = { 0 };

And still

error Theme\Default\InvGrid13.bmp not found
Why would you change the source's code if the error itself telling you what you should do to fix your problem.

It seems you changed something inside its loop.
09/01/2020 11:20 wyq123#50
Error 1 error C2864: "CWndInventory::nGridTexSize": Only static constant integer data members can be initialized in the class H:\game\make\new80ff (SRC)-2\Src\_Interface\WndField.h 245
03/16/2022 19:49 styxhelix3#51
no errors on compiling but when i start neuz i got this problem.
[Only registered and activated users can see links. Click Here To Register...]
09/17/2022 08:48 Int16#52
Thanks for the release i tweaked the design a little bit so the inventory equipment window stays centered


and i would use this method to set the new resizing sizes to avoid the bug where the inventory border cuts out

Code:
/*maximum slots you can expand by resizing*/
int maxWidthResize = 17;
int maxHeightResize = 10;

//your inventorys originals height/widht from the resdata
int inventoryHeight = 464;
int inventoryWidth = 240;

/*change nGridTexSize in the header file if you want play around with the v19 inventory alignment*/
AdjustMinRect(&rectWnd, inventoryWidth, inventoryHeight);
AdjustMaxRect(&rectWnd, inventoryWidth + ( nGridTexSize * maxWidthResize), inventoryHeight + ( nGridTexSize * maxHeightResize));
keep in mind that this download is not the full code only the changes i made after using the released code

[Only registered and activated users can see links. Click Here To Register...]
09/19/2022 06:38 IFlyffMc#53
Anyone knows how to fit this feature in v19 files?
09/19/2022 07:59 Int16#54
Quote:
Originally Posted by IFlyffMc View Post
Anyone knows how to fit this feature in v19 files?
first you need to change the nGridTexSize to 35 in the wndField.h (could also be 38 because on the v19 inventory it has 3 pixel spaces between each inventory slot)


then insert the default v19 inventory width/height in the AdjustMinRect part :

Code:
void CWndInventory::SetWndRect(CRect rectWnd, BOOL bOnSize)
.....
AdjustMinRect(&rectWnd, /*width here */,  /*height here */);

and if its still not properly aligned you have to play around with those vars :

Code:
   
void CWndInventory::OnDraw(C2DRender* p2DRender)
........
     
CWndTabCtrl *pwnd = (CWndTabCtrl*)GetDlgItem(WIDC_INVENTORY);
        int left = (pwnd->GetWndRect().left + 5) - 1; // +5 border left
        int top = (pwnd->GetWndRect().top + 1) - 1; // +1 offset top
        int width = (pwnd->GetWndRect().Width() - 23); // -18 scrollbar right (-5 border left)
        int height = (pwnd->GetWndRect().Height() - 22); // -21 label bottom (-1 offset top)
        int rows = (height / nGridTexSize), cols = (width / nGridTexSize);
someone on here was playing around with it too if you go a couple pages back you can find some more information about it
09/19/2022 10:17 IFlyffMc#55
Quote:
Originally Posted by Int16 View Post
first you need to change the nGridTexSize to 35 in the wndField.h (could also be 38 because on the v19 inventory it has 3 pixel spaces between each inventory slot)


then insert the default v19 inventory width/height in the AdjustMinRect part :

Code:
void CWndInventory::SetWndRect(CRect rectWnd, BOOL bOnSize)
.....
AdjustMinRect(&rectWnd, /*width here */,  /*height here */);

and if its still not properly aligned you have to play around with those vars :

Code:
   
void CWndInventory::OnDraw(C2DRender* p2DRender)
........
     
CWndTabCtrl *pwnd = (CWndTabCtrl*)GetDlgItem(WIDC_INVENTORY);
        int left = (pwnd->GetWndRect().left + 5) - 1; // +5 border left
        int top = (pwnd->GetWndRect().top + 1) - 1; // +1 offset top
        int width = (pwnd->GetWndRect().Width() - 23); // -18 scrollbar right (-5 border left)
        int height = (pwnd->GetWndRect().Height() - 22); // -21 label bottom (-1 offset top)
        int rows = (height / nGridTexSize), cols = (width / nGridTexSize);
someone on here was playing around with it too if you go a couple pages back you can find some more information about it

35 is fine but after i changed it the inventory resizing is not functioning. I mean the resize arrow is showing up but the inventory which is WndTile00 is not resizing can you help me please?
09/28/2022 05:20 yjbytyx#56
Quote:
Originally Posted by mcoocr View Post
Hi folks,

today i'm releasing what i've worked on for the last few days -> an resizeable inventory for Flyff!

[Only registered and activated users can see links. Click Here To Register...]

So far i've seen this system on only one server, which is also the reason why i've decided to recode this because it's such a huge improvement for Flyff's interface which actually every server should provide.

Although this requires a bunch of modifications through various files (including resources). Therefore you may be faster by diffing the files to your own source rather than inserting the snippets below manually.

If you prefer merging the snippets into your source / resource, and i really recommend you to do so, you can grab the snippets (including the base source for diff) from here (password = "mcoocr"): [Only registered and activated users can see links. Click Here To Register...]


Also note i've coded this on a clean V15 base, you may need to add your custom or additional inventory controls (like perin counter, etc.)... to make this more comprehensible i've added the checkbox controls from __SYS_280514 (hide / show CS items) as an example to show how this could be done.

In case you modified the original inventory size (for example if you use perin counters, etc.) make sure you adjust the size at AdjustMinRect() call to the new one.


Monstrous spoiler warning!




Done! :pimp:

PS: i'm entirely sure there are better or smarter ways to handle the custom textures for the grid / weapon / armor background rendering rather than the way i actually implemented it (didn't wasted much time on this), feel free to leave comments or improve this on your own.


Greetings ~mcoocr
is possible that re-upload the link?thanks
09/28/2022 07:56 Int16#57
Quote:
Originally Posted by yjbytyx View Post
is possible that re-upload the link?thanks
[Only registered and activated users can see links. Click Here To Register...]

let me know if i missed something
09/29/2022 10:05 yjbytyx#58
Quote:
Originally Posted by Int16 View Post
[Only registered and activated users can see links. Click Here To Register...]

let me know if i missed something
thank you ~
10/06/2022 05:26 okatokat²#59
Quote:
Originally Posted by Int16 View Post
Thanks for the release i tweaked the design a little bit so the inventory equipment window stays centered

[Only registered and activated users can see links. Click Here To Register...]

and i would use this method to set the new resizing sizes to avoid the bug where the inventory border cuts out

Code:
/*maximum slots you can expand by resizing*/
int maxWidthResize = 17;
int maxHeightResize = 10;

//your inventorys originals height/widht from the resdata
int inventoryHeight = 464;
int inventoryWidth = 240;

/*change nGridTexSize in the header file if you want play around with the v19 inventory alignment*/
AdjustMinRect(&rectWnd, inventoryWidth, inventoryHeight);
AdjustMaxRect(&rectWnd, inventoryWidth + ( nGridTexSize * maxWidthResize), inventoryHeight + ( nGridTexSize * maxHeightResize));
keep in mind that this download is not the full code only the changes i made after using the released code

[Only registered and activated users can see links. Click Here To Register...]
thats a huge inventory :D. would be useful for servers which are high rate / farm server.
10/06/2022 05:57 Int16#60
Quote:
Originally Posted by okatokat² View Post
thats a huge inventory :D. would be useful for servers which are high rate / farm server.
You just never know what inventory sizes people prefer lol

Just give them some options