Jump to content
Eternal Lands Official Forums
m_bee

More compact inventory

Recommended Posts

Ok, I have been looking to fix the text wrapping issues, but sincerely, I could not do anything interesting, other than messin one window if I fix the other, and, also sincerely, that bug is not introduced by my patch, so, it is a separated issue. As ttlanhil said. So, I came with this solution, wich just makes my patch compatible with the bug.

 

811506.jpg

 

This alters the layout, converting it in a 9x4 one, with makes the text fit perfectly. I also got rid of the button, with IMO really breaks the layout. If you like it I can put it back, but, well, this is called compact inv for a reason... It is optional, so...

 

I have to clean the code, and test it in 800x600, just to make sure that my patch is non-intrusive with the previous code. When it is done, I will submit to berlios as a separate patch, an alternative to my previous one. Sincerely, I prefer this, because it is so comfortable to have it open when fighting. It does not get in the middle while chasing gargs around :P

Edited by m_bee

Share this post


Link to post
Share on other sites

What I submited rigth now at Berlios:

http://developer.berlios.de/patch/index.ph...5&group_id=1256

This is a revised one. It includes all the stuff than the one before did. But now the inv is rectangular, in like 9x4, instead the old 6x6. Issues when res<=4 (800x600) fixed. The inv text wrapping should not be an issue now, either.

 

Patch done. Now it should work, I havent found any bug in a couple of days. If you find any issue, let me know. This patch does the same than the other, but fixes the issues with text wrapping and with the small inventory in lower resolutons. I ripped out the button, yes, I know.... If you like it I will put it back, but it seem ugly, and unnecesary in a compact mode, with is totally optional. I also shortened the load text in this mode, and ripped out the "Quantity" label, wich is useless and bloats the interface. Well, suggestions, flames and .... you know...

 

The old behaviour *should* not be altered, in the big inv or the 800x600 one, and my tests confirm it. Thanks all for your help and suggestions :P

Edited by m_bee

Share this post


Link to post
Share on other sites

Hi dudes, after some hard work in RL I have taken this again, I took the patch and submited a new version yesterday, that should apply cleanly against the latest cvs. Now, Im improving it, but the next version will be a major review of the bug.

 

In that version, you can expect:

 

-Improvements in the windows, and some kind of standarization, so, all windows, will look similar to the storage one, that is the one I think looked prettier. You can see and advance here: http://www.pix8.net/pro/pic.php?u=16075m1TQm&i=873018

 

-I took rid of the text cropping problem, it seem that a duped line in items.c and multiplayer.c was causing the problem. Now the text in all the windows is cropped correctly, regardless of their sizes.

 

-All the features that the patch already had.

 

-The next version will completely rip off the previous inventory layout, there is no reason why the inventory should be different in size to other windows, and, deffinitively, there is no reason why it should take 1/2 of the screen in 800 or 1024.

 

Thanks for your attention. I will also look into that idea, and try to give some colour to the quick slots.

 

Edit: all done, the 6 first squares are now blue too (the ones whose items go in the quickbar), the spells window has also been moded to fit this layout. I repeat, this is still not in berliOS, since I have to clean the code and remove the big inventory option. Opinions about this are wellcome. Anyway, if You want a bigger inv, it would be way easier to add a switch to mine to make it bigger. :D

 

I will submit to berlios when it is clean enough. But the functionality seem to be ok.

Edited by m_bee

Share this post


Link to post
Share on other sites

Hi again, i am reworking the whole interface layout.

 

In adition to the things above, this patch now also took off the video_mode<=4 stuff.

 

Now, all the modes do use the same layout.

 

How is this possible?

 

Easy, I have massively patched most files having to do with any window in the game, now, all of them resize ok and the cells size is auto-calculated from the weight of the root window width. As the size of the margins for each resolution is also based on that value.

 

There is a lot to polish still.

 

And yes, this means that the inventory should look the same (proportionally) in 800x600 or 1600x1200. So, no more windows taking the whole screen.

 

The inventory and bag windows are done. The spells and manu ones are in process. The storage and trade ones will be done when I have the time. By now, im also redistributing the layout of the cells and such, so I can get a compact one, istead of having wasted space amongst all the windows.

 

http://www.pix8.net/pro/pic.php?u=16075m1TQm&i=873847

 

That is an early stage screen, though you cannot see the patch in action, you could only not the effect of the patch by patching your client and changin resolution, so you will notice that those windows resize accordingly, and the cell size changes, and the whole layout addapts to the new size.

 

This patch is not in berliOS yet, and it will take a little, since I have to do a lot of work to implent this feature in all the windows (due mostly to the fact that that code is full hardcoded values instead of controlled by variables or something).

Edited by m_bee

Share this post


Link to post
Share on other sites

Well from your screenshot, 2 things that stand out to me:

 

1. The word Equipment needs to go on top of the boxes to equip items

2. It would look nicer if you moved the quantities in the inventory underneath the inventory boxes. They don't look good at the top. Same with Get All for the bag

 

Oh and looks like you forgot the drop all button :mace:

Share this post


Link to post
Share on other sites

Well from your screenshot, 2 things that stand out to me:

 

1. The word Equipment needs to go on top of the boxes to equip items

2. It would look nicer if you moved the quantities in the inventory underneath the inventory boxes. They don't look good at the top. Same with Get All for the bag

 

Oh and looks like you forgot the drop all button :)

 

Ok, I will mess a bit more up with the layout and try to do my best. Keep on mind that what I want to archieve are mainly three things (on the inventory, there are more to this patch in other areas):


  1. First, I want to make a compact thing, no silly empy spaces like in the official inventory that we have right now. In anything below 1024x768 the windows are really big an annoying (all of them).
    Second, I want to eliminate the need to have two separate layouts, one for video_mode<=4 (800x600 and below) and another for the rest of modes.
    Third, I want to make layout that is aware of the viewport size. So, all the things should scale accordingly depending on the size of the display. I dont know if buttons and text support this, the rest of items are no problem for me.

So, as stated on my very first posts, I did not forget the button, I just ripped it off, because I find it to be annoying, and in smaller resolutions, it takes away some precious space that is really necesary (by the way, the inventory window in these resolutions do not have that button either, but I want all the resolutions to use the same inventory). I never used that button, but well, if you really want it back, I will find a suitable layout. If that is a must, the button should be bigger. I dont know who put that button where it was, but even in english, the text does not fit ok, in spanish is just abominable, and in most other languages im sure the thing is the same.

 

The main goal is that, if the inv window takes 1/3 (just an example) of the width of the screen in 1600x1200, it should take 1/3 of the screen in 800x600 as well, being the layout exactly the same. For now, the thing goes ok in the bags and inv window, the rest of windows will be addapted as well. I will have to modify the inv window thing though. When I have a suitable layout I will post here. So, if you are interested in the patch stay tuned.

 

Thanks for your attention. Any suggestions, as always, are wellcome :)

Share this post


Link to post
Share on other sites

If what you are doing is simply for your own custom client, then fine, do what you want.

 

If you actually plan, or hope, for it to be official one day, you do have to work with me and Entropy in this.

 

I want the Drop All button there in the Official Client, along with the word Equipment above those boxes. It makes it easier for newbies especially, and I will miss the Drop All button.

Share this post


Link to post
Share on other sites

I don't want to discuss about your opinion Roja, but I never used the 'drop all' button so far. The inventory window is quite big now and it isn't easy to follow the chat, and make stuff with your inventory open, and I don't even talk about fighting with your inventory open. Since you can chose what kind of inventory you want (small or large) I don't see a big problem there. And newbies will start with the normal inventory so I don't see a big problem for them too.

 

This is just my opinion and I would really like to see this patch added in the official client. Although the look of it could use some tweaks.

 

My 32 cents.

Share this post


Link to post
Share on other sites
I want the Drop All button there in the Official Client
is it really needed? it seems the opinions ventured by players in that other thread are to remove it

if it's staying then I'll go ahead and disable scroll-click for it, I stopped on that to see if it was worth removing the button (it was useful back in the dark bagtrade days, but now I think it's more a risk than any usefullness, hence waiting to see if the button should go)

Share this post


Link to post
Share on other sites

Sorry I didn't realize you were making these new windows an OPTION to turn on or off. If that's the case then it's fine. There can be something like a Newbie & Advanced mode.

 

As for the Drop All button, some people like it some don't. If you take it off, people will bitch. If you keep it there..well what harm can it do? I like it, please keep it.

Share this post


Link to post
Share on other sites
what harm can it do?

Well for one you can accidently press it and drop your mod cloak :P:P

 

(and no, it hasn't just been me to fall prey to that evil button.. that said, it is very handy if only very rarely)

Share this post


Link to post
Share on other sites

If what you are doing is simply for your own custom client, then fine, do what you want.

 

If you actually plan, or hope, for it to be official one day, you do have to work with me and Entropy in this.

 

I want the Drop All button there in the Official Client, along with the word Equipment above those boxes. It makes it easier for newbies especially, and I will miss the Drop All button.

 

I want it to be included in the official release, that is why I ask about your opinion. I really think that the inventory like it is right now has many problems, bing the main one the fact that it takes de whole screen in low res modes. I play in 1600x1200, and even at that size, the inv seems really huge to my eyes.

 

Sorry I didn't realize you were making these new windows an OPTION to turn on or off. If that's the case then it's fine. There can be something like a Newbie & Advanced mode.

 

As for the Drop All button, some people like it some don't. If you take it off, people will bitch. If you keep it there..well what harm can it do? I like it, please keep it.

 

It WAS an option, as I said above, I want to make this thing the only style, so the option has gone away in the new release of the patch. Still, if you like it better, I have in my box older releases.

 

This is just for one reason. I have reworked the whole interface system, the patch is massive, meaning that the code is plainly incompatible with the oficial source (which I might say is not so elegant, as it is filled with lots of hardcoded numbers that maked reading it almost impossible). I could redo the old interface style, but i see no reason to do that. I have though of another option, mostly for the visually impaired persons. I could add a widget in the options window to specify the cell_size, so, if you cant see the thing ok, you could always raise that value, and the windows would resize accordingly.

 

That should be a childs play with the current code that I am working into. What do you think about that? Just let me know (you Roja, or Entropy himself) what are the rules i must play with to get this into the official release of the client. The minumun cell size would be 22, wich is the one I use for the lower resolutions, and the max size would be maybe double of the size now, it is just a matter of changing just a couple of lines in the code and add that control in the options window. Let me know what do you think about that.

 

Also, let me know the definitive answer about the button. Most people seems not to like that button. I can do many things.

 

I could put an option, so, those not liking the button can remove it.

I could remove the button.

I could make the button acts only on click, and not wheel, like is does now.

 

Just let me know. I want to make the work with your guidance, so this could eventually get into the official client if you think that the patch is good enough.

 

Thanks for all the answers, I really appreciatte them. :icon4:

Share this post


Link to post
Share on other sites

The drop all button works with the mouse wheel??? Why the hell would it do that. Of course it should only work if you click it.

I'd just place the button along side of the quantities, being the last in a row.

 

I'd prefer to have one standardized version for the interface too. Having a small/large version is a good idea though, for people who can't see well or just want it bigger.

 

I want the word Equipment on top of the equip boxes no matter what-this is for newbies, they need it. Of course, ideally, we should have a "paper doll" type thing like most games have. Then it'd be more clear.

Share this post


Link to post
Share on other sites

The drop all button works with the mouse wheel??? Why the hell would it do that. Of course it should only work if you click it.

I'd just place the button along side of the quantities, being the last in a row.

 

Yes, is used to, it seems that someone fixed that in the CVS this evening though, so, that problem should be gone now.

 

I'd prefer to have one standardized version for the interface too. Having a small/large version is a good idea though, for people who can't see well or just want it bigger.

 

I could use a widget like the one used to display the gamma correction, with numbers, or I could make a default size, and a checkbox to use a double size or something like that, what do you think is better?

 

I want the word Equipment on top of the equip boxes no matter what-this is for newbies, they need it. Of course, ideally, we should have a "paper doll" type thing like most games have. Then it'd be more clear.

 

No problem, I will put that back in. It is easy to put some drawing on it as well, though I suck at drawings, if you provide me with one I will put it under those eight boxes. What I cant do that easy is to make it that each square can be equipped with just one type of item, if you do care about that, I would need to do additional research and see if i can do that or not.

Share this post


Link to post
Share on other sites

Just let me know (you Roja, or Entropy himself) what are the rules i must play with to get this into the official release of the client.

I would suggest there are 2 requirements. One the code is in good shape, stable and easy to maintain. The second is that it has to look how Roja wants. :-P

 

I could make the button acts only on click, and not wheel, like is does now.

This has been fixed in CVS recently.

 

Regarding options, you might want to consider making it a define so the old behaviour is default, but your new code can be used if someone wishes to recompile. This of course would likely be brought to the masses by ttl and his clients.

Share this post


Link to post
Share on other sites

 

I could use a widget like the one used to display the gamma correction, with numbers

 

i think that would work.

 

Forget about the "paper doll" thing then, if it'd be too much work. it needs to be done the right way.

Share this post


Link to post
Share on other sites

Hi, people. This is the current stage of the patch.

 

876314.jpg

 

That shot is made in 1600x1200 and resized to 800x600. It looks the same in 1600x1200 or 800x600, the only difference is that the text in the boxes is a bit cluttered in low resolutions. I will have to find a way to addres that (it only happens under 800x600 and lower when the quantity cells hold numbers from 10000 and above). But I will leave this rest for some days, since I have a life.

 

However, I put here some possible solutions that I thought of: a possible solution would be to make the first rectangle, non-editable, with the value "1", that way, I could make it smaller and the rest of squares should be ok. Another solution would be to zoom out that text (I think that the client has a function to draw zoomed text, but never looked into it). The second solution has the disavantage that the visually impaired persons might find that smaller text harder to read, and, another invonvenience, is that zooming the text out you will gain at most 1 or 2 pixels, since the font width is already very small (8 pix width), so, I dont think that zooming the text is a good idea) and completelly discourage this second option. The third option, would be, of course, to make the window width bigger, but that would mean to have wasted space in the right side of that window. Any other idea?

 

Yes, I have another idea, I could look into merging my short numbers+full number on-hover thingie into this. This would work this way: I write 86784 in the last cell (to put an example) and this is displayed "86k" (up to 4 chars max, e.g. 7898 would be "7.9k"), since that is the max that would fit into the lower res modes). that is displayed in the box. How do you know the exact amount? Easy, you hover the cell with the mouse and the whole number appears in a floating alpha transparent tip like the ones that shows help for the buttons. This patch currectly implements this into the inventory cells, the trade window, the bag window, the quickbar and probably some other place taht I might forget. This way, the numbers fit better on their cells, and you can still see the exact amounts without abreviations if you hover the place. I will probably chosse this way to do it, though I haven't looked into it, and I might need to do a little research after adding that functionality to the quantity boxes.

 

PS: I have started on this, and it is almost completed. So, consider this done too. To remove it is a child's play if you do not like it when I have a test client for you to try this thing (i can provide clients for win or linux amd64 if you wish).

 

@Torg, yes, I could add another define, it would be easy, but, this is the way I see it: the code is so confusing, it has already tons of defines, and lots of hardcoded values and global variables (C can use pointers, it seems that everyone forgot about that). The old patch, as it is in berlios (wich does not have the resize capabilities) is filled with (compact_inv_window?X:(video_mode>4?Y:Z)) and things like that, that is another option, you use it 2 or 4 times in a function or into an "if" statement and you get a nice construct that sound completely like greek to me, even if I am the one who wrote those lines. I vote for simplification and abstraction. All the functions in the items.c file are filled with numbers that are inlined into the code, instead of being autocalculated, as they should be or defined by vars. That makes the mainteinance of the code pretyy boring, confusing, prone to bugs, etc, etc. To make the thing harder, the global "extern" variables makes the usage of grep almost a must when surfing this code. There is no reason why this should be this way (though as I explain below, I will not change that, I will just make a hack to try to sanitize this a bit, but the real solution... well, all of us know what that would be). If I wanted to write tons of numbers I would choose asm instead of C. Tons of crossed refs made me go mad, the old bug in the inventory about the text cropping was also due to this crappy fashion of putting hardcoded values, and splitting things like the printing of a simple label like the descriptions in the inventory into different files (items.c and multiplayer.c, wich had different values for this hardcoded values, that was all the bug, the solution, as easy as to put items_grid_size where the number 33 and addapt the formula a bit).

 

I mean, why should I put another define and add more crap to the code, when it is pretty obvious that the inventory can't remain on its current status? Might it be my inventory patch, or might be any other person's patch, but one or another, any patch has to address the issues with the inventory, to let the old inventory remain as it is, is and step backwards in my opinion. I could invest more time maintaining that crappy portion of the code, or I can, instead, forget about it, forget about adding more defines in the code, and work in the patch to advance quicker. Once it is done, you can merge it, or you can refuse it. Like Alan Parson said: Choose it or refuse it :) The code is already a mess, and the right solution would be a redesign, but, while that comes or not, I will try to keep my patch as clean as possible. If you like it, merge it in the main branch and forget about the old inventory, wich is so crappy on my eyes and quite big. If you dont like it or you find it buggy (well, I mean, more buggy than the default one) then forget about the patch and that's it.

 

I know my code is also crappy, I can't remake the whole client just for this, so I will just work over the foundation that is already there and go along with a couple of thousands more of extern int's :D, but I don't like to code this way at all. At least, I'm adding a bit of abstraction over this mess, so I can implement the window scaling mechanism in a reasonable way. To maintain the old inventory, along with the new one would be an extra work, that I can't stand, because I have very limited time and the old inventory has its own bugs (plus it is just impossible to make that damn button fit in the place where it is, for any language other than english). Currently, in the spanish version, that buttons shows the string "Todo" wich means "All", that's also crap and a newbie seeing something that says "All" will not know that the hell does that button do until s/he presses it. In my inventory that button now is big enough, and I can finally write "Soltar todo" wich is "Drop all", then it is clear enough what does that button do. As I said, if you are interested in this, I hope your guidance will help me to finish it, if you preffer the old inventory and are not interested in this, please, let me know.

 

@Roja, there you have another screen, please, let me know what do you think, I think it pretty much achieves the points that you told me, but if something is incorrect, please, just let me know. I put a test picture with a nice bone on the Equipment rectangle, just to test a bit, since I am a complete newbie to opengl. Imagine that that bone is a human figure. It seems that there is no problem putting an image there, the problem will be how to put that image in the background and the equiped items over it, I will investigate that in a couple of days, i don't think it will be a difficult thing to address. If you want a drawing there well, I can put it in the place of the big bone :whistle: If not, it will remain trasparent as ever, I will not draw anything with my own hands, believe me, it is better if I do not try, but if you have any idea of what could go there or you have even some artwork that could fit there, please, let me know :P

 

PS: Since you want it the right way, then for now I will remove the picture support and leave it as always, just forget I put that there. I dont have currently the knowledge about the protocol to do that, and I dont have much time.

 

I await orders.

 

PS: I repeat again, this is not the code in BerliOS, that is old, buggy and broken if you choose the normal -old- inventory mode. When will it be? Well, I will not release it until is finished -that is, unless Entropy, Roja or some other developer of the game wants to take a look, in that case, just mail me and I will gladly provide the source-. Why? Easy, this is still experimental, I have limited time to work on this, and in a given moment it might now even compile. + the latest CVS modifications a couple of days ago were big, and I haven't checked this agains that code. So, it might not even patch correctly. So, unless you are willing to help developing this stuff, be patient, please. I promisse you'll like it :P It would be silly to post that in BerliOS at this stage, but if someone wants to take a look, just let me know.

 

Another PS: Ok Roja, I will look into that widget when the rest of the code is done, that is the lesser priority, since in the way i am reprograming this stuff, it is just a matter of adjusting a single variable (in fact, that is what the client does with my patch when resizing windows when you change de resolution).

 

Thanks everyone for all the input. :)

Share this post


Link to post
Share on other sites

Ok, why is the drop all button so big? That's the only problem I see here so far.

 

And like i said, before, just keep the Equipment boxes the way they are for now with just Equipment on the top of the boxes.

Share this post


Link to post
Share on other sites

No special reason for that, it just seemed nicer for me, but I there is no problem in moving it elsewhere. I can make is any size, i can even make is addapt to the size of teh text... Centered, left of right... just tell me how you want it to be done, and your wishes will come true :whistle:

 

The text over the boxes reverted to equipment, it was a silly mistake I made, sorry. And thanks again for your guidance.

Share this post


Link to post
Share on other sites

http://www.pix8.net/pro/pic/16075m1TQm/876452.jpg

 

Opinions, please?

 

This is just the look, a lot of work is still to be done internally, the patch is far from being finished.

 

I'm really not into programming, but i'm impressed with the result. I really like the look and the features of the new invertory. This must be much better than the old one. I also support the "floating alpha transparent tip" method with shorter numbers in the boxes.

 

A credit and a vote from me. :P

 

Bye: nightw

Share this post


Link to post
Share on other sites

I still don't like where drop all is. Put it at the end of the quantities boxes, make another box for it. Make it the brown/tan color that it is though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×