Jump to content
Eternal Lands Official Forums
m_bee

More compact inventory

Recommended Posts

This is just like the ttlanhil's precompiled clients, if you miss some library, you will need them. Usually, just the client is needed, just download it, and try, if you test many clients like the ttlanhil's one, you should already have all the stuff. Anyway, Im finishing with this and will post lots of screens soon.

 

EDIT: Direct link to the client file:

 

http://jesgue.freehostia.com/downloads/Tra..._win_client.zip

Edited by m_bee

Share this post


Link to post
Share on other sites

From the Rescaling screenshot you posted, is that from choosing an option that will make it bigger?

Share this post


Link to post
Share on other sites

In that same shot you can see the Scale Factor number box that controls that in the config window, it is set to 2, the max. Right now the default is 1, and you can move it from 0.66 to 2 (usefull for visually impaired persons, as I see it). The widget is a number box (the last line in the config in the shot) like the gamma correction one.

 

The base cell size is 33 pix (i mean the squared cells in the inventory, trade,....) the rest of stuff is calculated using that as a base.

 

I can put any limits that you like better, right now the default scaling factor is 1, 1x33=33 pix cell size. The max is 2 (66pix size) and the min is 0.66x33=22 pix cell size. Just let me know wich bounds you consider better, and I will adjust the numbers in the code.

 

This scaling factor is saved, so, if you cant see the numbers ok, you can set the scale factor to 1.2 (for example), to make it 20% bigger, and the setting will be saved and used for the next session. If you have any doubts, just ask.

Share this post


Link to post
Share on other sites

Sure, let me clean up the thing a bit, I will upload it in a new patch, since the objetive for this patch has gone far away from where it started, and the code in some files is heavily patched.

 

I will clean it right now, and test against the latest cvs, then update it, and let you know here.

 

Thanks for your interest :(

Share this post


Link to post
Share on other sites

Here you are, patch 1087: http://developer.berlios.de/patch/index.ph...7&group_id=1256

 

This patch includes:

 

- Number beautification (max 3 chars in normal cells, and 4 in the quantity cells)

- Floating tips for the whole numbers when any number is abreviated

- Some bugfixes, the main one, the text cropping bug, also the tips that were displaying below the window

- A lot of code cleaning (to the extent that I could do it whithout making the thing so difficult)

- A lot of crap (more global vars)

- Window scaling for inventory, manufacture and bag (plans to include the rest of windows in the future)

- An option to control the scaling factor in the misc tab of the config

- The visible part, beautification and standarisation of all the windows, so all now have the same margins and general aspect, moreless :(

- Others that I might forget

 

Luck, and ask here if I canhelp in something :(

 

PS: I know this is crappy, in the future I want to put all this crap into an structure and -maybe- use pointers instead, for now it works

 

EDIT: By the way, my C skills are a bit lacky, so, if there is anything that I could do or something that I might consider from now on when working to ease the OSX process, let me know, and I will try to behave correctly when coding. Thank you.

Edited by m_bee

Share this post


Link to post
Share on other sites

The really big question that got me - why does get_grid_size() return a constant? If it's just going to return 33 all of the time, wouldn't it make more sense to either #define GRID_SIZE 33, or use const int grid_size = 33? (I also noticed several other instances where 33 is a constant, which appear to be left over from the original code... maybe they should be changed too?)

Edited by crusadingknight

Share this post


Link to post
Share on other sites

EDITED for clarification.

 

Sure, this is in development, and to avoid these questions, is why I did not upload it til today -and I did by the request of octane, if not I would not have uploaded it, since it is not mature enough.

 

The contents of that function has changed several times. And it will be optimized when this is done, to the best way to archieve its functionalite, probably, it will be a constant, indeed. Since the scaling factor is relatively new, the old way was to asign that value thru that function, using width/48.48 as the cell size, wich was not ok. And for lower resolutions, it returned 22 points size. Since now you can scale the whole thing, then all is ok, and that is not needed, when the code is ready in the windows in working with now (inv, segils, manu and bags) then I will clean that thing.

 

And later, I will proceed witht the rest of windows. :(

 

As I said in earlier, posts, that usage of extern vars is not the thing I consider a good C coding habbit. That remains to be changed as well, and also many other things, but for now, I also said this before, I just work along with the foundations on those files (mainly based in my early studies of items.c, and a little more).

 

Not all files has been patched, mainly, I patched the elconfig files, the items, bags, manu, trade, hud, and spells files, and init.c and maybe .h, dont' remember.

 

A lot of stuff remains to be changed, since there are lots of functions on those files that I haven t even looked into.

Edited by m_bee

Share this post


Link to post
Share on other sites

The contents of that function has changed several times. And it will be optimized when this is done, to the best way to archieve its functionalite, probably, it will be a constant, indeed.

OK, I knew there had to be a reason I was missing. Sorry about that.

Share this post


Link to post
Share on other sites

Some progress, bugfixes mostly, LOTS of code cleanup (sadly, still not enough for me :pirate: ) and more windows and features.

 

Now, everything -and by "everything" I mean "everything but the titlebar", is handled by the scale factor. That includes the text, the spell icon that appears when you manually cast a spell, and all the stuff you can think of.

 

The default scale factor is 1, which means, nothing at all. You can change it between 2 and 0.66 (again, those numbers can be changed if needed). The cell size in scale 1 is 33 pix.

 

These windows are now working completelly:

 

-Inventory

-Manufacture

-Sigils

-Trade

-Bag

 

Including:

-numbers beautification when needed

-text cropping should now be completely fixed, in inv, manu and sigils, trade win still has the issue when you have it opened and click in see something, but that bug is not mine (though Ill try to solve it if I can also).

-scaling of all the elements and layout fixes in those windows

 

LOTS of internal changes have been done, and, if this thing goes into the official client, I will continue improving it. The only thing left to do is the storage window, and it will be complete for now.

 

In a more technical level, I'd like to rework this stuff w/o that massive usage of global vars that is does right now (that is not mine, but inherited from the previous stage). Still, for that, i'd need to re-think the whole thing, and rerwrite massively a big part of the code in those files, which I will not do unless this patch has any future, and even then, I am not sure that I have the time to finish this sooner or later. Anyway, the functionality if now there, and the code is cleaner than before already, so, it is nicer now. Ill submit to berlios now.

 

Submited, patch here:

https://developer.berlios.de/patch/index.ph...7&group_id=1256

 

And clients here:

http://jesgue.freehostia.com/client_updates.html

http://jesgue.freehostia.com/phpBB/viewtopic.php?p=151#151

Share this post


Link to post
Share on other sites

In case anyone is interested, a new revision of the patch is in cvs. I will probably submit another one with a small bugfix in some minutes, just wanted to drop a line.

 

Lots of bugfixes have been sone, and lots of things that were broken are working -windows now save and restore position correctly (or they should) between sessions-, appart from that, all the windows now are scalable.

 

By ALL, I mean:

 

-inv

-sigils/spells

-manu

-trade

-storage

-bag

 

No plans to touch the config window. If anyone wants to do so, feel free, though i dont think that my code is much related to that. I just wanted to make the windows related to the game cleaner, more functional and scalable. That has been achieved.

 

The storage window now does not have that silly textbox, since its only functionality was to show the name of a given object, I thought that I would better put "21 deer antlers" in the floating tip, that a simple "21" in the tip, and "deer antler" in the box, wich does not make sense to me. (of course, i might be wrong, the old code is still commented out in the storage.c file in case we need a ninja flashback).

 

The above post links are all valid. Binaries are available for windows. And instructions on how to pacth and build from cvs are also available.

 

More bugfixes and internal changes might come, though they will take long, I have very limited time. But the look is mostly finished. So, if you have suggestions, complains, or any other thing about this patch, just let me know.

 

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

Share this post


Link to post
Share on other sites

The screenshot looks good.

 

I was wondering if you can create an extra option to use bigger inventory item pictures, basically at the resolution they currently are in the game(as close to their actual size). The texture images are much bigger than the new size you have made, and some people might like to see more detail.

Share this post


Link to post
Share on other sites
I was wondering if you can create an extra option to use bigger inventory item pictures, basically at the resolution they currently are in the game(as close to their actual size). The texture images are much bigger than the new size you have made, and some people might like to see more detail.
I suspect you mean permenantly, but as another option... how about the one the mouse is over is made larger? it'd hide parts of the surrounding items, yes, so you can't have it too much larger or it's hard to click the right one, but you could get more image detail with a flick of the mouse

I've seen an animated version of this in the KDE menu (and I'm fairly certain I've seen it on an OSX box as well)... we don't need it to be animated though... uhm... for an example more people can see, run charmap in windows, click one of the characters and it gets enlarged (then again, I think this is gone from WinXP... well, those who used previous versions may still know it)

 

we can optionally see full detail of a texture (like we do it we pick up an item), but the inv window can stay smaller

Share this post


Link to post
Share on other sites

I see the 19 and polar bear fur have different colors, maybe you can put them all on white?

I will look into that, I just thought that it looked cool, so I did not even bother to play with the colors, but I might give it a try.

 

The screenshot looks good.

 

I was wondering if you can create an extra option to use bigger inventory item pictures, basically at the resolution they currently are in the game(as close to their actual size). The texture images are much bigger than the new size you have made, and some people might like to see more detail.

Ummm, I don't get the idea. The size of the images is scaled along with the inventory cells, if the "scale factor" numbers box in the config is altered. That screenshot above belong to a 0.87 scaling factor, the other that I posted the other day is bigger (dunno if that is what you mean). It is configurable, and people can choose what size from 0.66 to 2.00 (that is from 22 pixels grid size, to 66 pixels grid size). The images resize accordingly to fit in that cells, does not matter if they are bigger or smaller. And they do look good in the biggest resolution, at least for me.

 

If you are talking about another thing, please, develop a bit the idea, I would really love to hear all your ideas, and work on them as far as my knowledge goes.

 

I suspect you mean permenantly, but as another option... how about the one the mouse is over is made larger? it'd hide parts of the surrounding items, yes, so you can't have it too much larger or it's hard to click the right one, but you could get more image detail with a flick of the mouse

I've seen an animated version of this in the KDE menu (and I'm fairly certain I've seen it on an OSX box as well)... we don't need it to be animated though... uhm... for an example more people can see, run charmap in windows, click one of the characters and it gets enlarged (then again, I think this is gone from WinXP... well, those who used previous versions may still know it)

 

we can optionally see full detail of a texture (like we do it we pick up an item), but the inv window can stay smaller

 

If what ttlanhil says is moreless the idea you had, Roja, I dont think this is difficult to do in my patch at all. The only problem that I see is one: currently the numbers are abbreviated, and while you hover a cell, the flying tips system is used to display the full number, for example, in the cell you might see 1k, while in the flying tip you can see 1666. I can make a flying image the hovering the thing (it would be a matter of copying some code, since that image already appears when you have selected that items with the pickup action, only to make it larger). But then the image would be flying and you will have also a flying tip with the quantity. That is why I dont like that idea.

 

Another option would be to make that thing only appear when you click an object with the eye icon. But this is all theory, I havent looked the code, and I cant say for sure how easy or difficult is this to do for me.

 

Cheers, I await any response ;)

 

EDIT: Roja, or maybe you mean something like "Use double size cells for inventory" -and just for the inventory, option?

Share this post


Link to post
Share on other sites

 

we can optionally see full detail of a texture (like we do it we pick up an item), but the inv window can stay smaller

 

Yes the items actually get bigger even now when you pickup/usewith, etc. items..well in fact i don't think they ALL do this but at least one does i'm sure. That alone would be fine and work well, however the cursor is usually sitting on top of a part of the icon picture, can the cursor be moved outside of it? like on a corner?

 

here's a pic of what i'm talking about:

cursoricons.jpg

 

A= cursor and item image how i'd like it to be when you pick up/drop/usewith an item

B=cursor how it is now, it's hiding part of the picture

 

The picture's size should be at 100%, which is 50x50 pixels i believe. Right now in the game it's bigger when you pickup and smaller when you use with, these sizes should be the same.

Share this post


Link to post
Share on other sites

Ok, I will investigate a bit, that will hopefully help me to become familiar with other parts of the code. If I manage to work it out, I will include this into the patch.

 

It makes sense to me, since one part of my objetive was to standarize the look and feel across windows. This would help to do that. I dont know how much time will it take to me to figure out how this thing work, though.

 

EDIT: Done, in inventory, and for use and use with.

 

In the way, I also integrated the zooming of the text of the quantities, that are shown in that floating images. I dont post a screen, cause the sdl cursor does not appear in the screens taken by the apps that I have tried to make the shots (if anyone know of a linux app to do such things that can show the sdl pointer in the screenshot, let me know). But the cursor is exactly where you want it to be. Rather than in the middle of the image.

 

Now, I want to put this same behaviour in the rest of the windows (mostly storage, I think, since the rest of windows are not drag and drop, just click, and the desired amount goes to inv). I also want to implement the hovering cursor style change in storage, right now, in storage, you always have the arrow pointer. I want it to work exactly like the inv in that respect. I hope you like the idea too. Appart frorm that, this thing is easy to implement, just needs testing, to be sure that the thing works smooth under all the possible conditions. The text in that floating image is scaled to (50/inventory_cell_size). Right now the max cell size is 50, so, the minimun for that factor is 1, when the cell size is the same than the real image size.

 

2nd EDIT: The pickup cursor thingie in storage done as well. I think that now it works as you want. Unfortunatelly, unless someone can tell me about a program to take shots capable to capture the sdl cursors, i cant show the results, but it is just like you want. The cursor is in the upper right corner, and the image is below it, and to the left. Just like in your example.

 

I will test it, anyway, the patch is already in berlios, in case someone wants to review it.

Edited by m_bee

Share this post


Link to post
Share on other sites

Nice to hear that. Just one thing, when I said this in the previous post

 

EDIT: Done, in inventory, and for use and use with.

 

I meant for "pickup" and "use with", of course. The "use" icon is the same, and does not need to pickup the image at all. Slight confussion :P

Edited by m_bee

Share this post


Link to post
Share on other sites

By the way, this is not directly related to the patch, but on how it works with the latest modffication.

 

4 testers, have complained about the new position of the image respect to the mouse pointer when dragging items. I though it was just a silly complain, but when I went to try the thing, it seems a bit conffusing to me as well.

 

Don't missunderstand me. I still preffer -like you do- the way it is now, better than the way it was before. I am just predicting that -if this ever gets into oficial cvs- there will be complains of the users, while they addapt themselves to the new way that the dropping thingie works. :P

 

But well, all changes are traumatic in one way or another. 8)

Share this post


Link to post
Share on other sites

Ummm you will maybe kill me for this, but I included a little thing in my patch, an option to hide the drop button. Than option will be disable by default, meaning that the button with be there.

 

And it will show unless you -voluntarily- enable the hide option. If the button is hidden, then you will get 7 quantity boxes, instead of 5. This code can be disabled easilly if you do not want it into the client, but, since so much people seems not to like it, I think that that possibility does not harm anyone. You just can choose: you want one functionality (the drop button) or another (more quants).

 

http://www.eternal-lands.com/forum/index.p...opic=24883&st=0

Edited by m_bee

Share this post


Link to post
Share on other sites

More things. There have been a lot of bugfixes and layout improvements -overall in which regards text- in the last few days. So, those interested in trying out this patch should upgrade the binary (same links) or re-fetch the patch from berlios.

 

I also moved all the stuff from Misc to the HUD tab, I know it is not relaetd, but that tab is empty, and in the misc tab there is no space left. Maybe that tab could be changed to something like Interface or any other thing, if this ever gets into the official.

 

I added three options into that tab:

-The scale factor widget

-Another scale factor, for the map text

-The switch for the drop button.

 

The default values for all this stuff are the same that the client had until now. So, if you dont tough a thing, they will continue being the same.

 

Appart from that, I wanted to show you this:

 

889283.jpg

 

The cursor is painted by me, since it does not appear in the screenshots, so you can make an idea where it is. I added some alpha blending to the floating icons. This thing is usefull for me, because:

 

1.- You can see what is under the cursor.

2.- You dont get the ugly black background surrounding the object.

 

Let me know if you like it or not. Cause if you dont like it, the will revert those changes, and it is better to do it sooner than later.

 

Thanks for your attention :)

Share this post


Link to post
Share on other sites

Well the problem with getting rid of black in the item picture, if that is what you did, is that there are objs. that have black actually on the obj/item.

 

I'd really have to try it out myself to see how it looks...can this be compiled in the CVS client?

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.

×