-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FormSpec: support custom size and spacing for slots in list #7971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…_API_VERSION = 2)
bd5c13a to
d2479a4
Compare
c3dfc10 to
70b850c
Compare
|
Though I really don't know how to set the options per-element without adding parameters to |
|
Actually, this is fine if it only affects lists registered after it. I forgot how table options worked |
|
It doesn't work like that, these options are set on parsing and used at rendering, so the last |
70b850c to
7a2529a
Compare
|
@rubenwardy this PR has been tested and works now, though I agree that per- So I looked to
Tell me which one you prefer and I'll implement it. |
|
Btw this PR is ready since last commit, I decided to implement the first option since I had no answer. |
|
Nice, the PR looks correct. I'll need to test it and look into |
|
I suggest that this element follows the style of BTW, how is the border size calculated? Is it in pixels, or a fraction of |
|
This should migrate across to use #8383 |
|
That pr is ready for review |
|
@rubenwardy I'm still around so ping me when you want to move this forward. |
|
@Unarelith :) |
|
I will try to rebase this PR soon, probably next week. |
|
New PR (#9240) created to rebase this one. It was way easier to add the modifications one by one rather than trying to rebase and fix all conflicts. Anyway, it's almost completely working now, I just have one small issue I didn't have before. |
I really like #5395 but it seems dead, so I decided to rebase it and to take it further.
@rubenwardy suggested changes, I made them, however these changes makes the styling "global" instead of per-inventory list.
listoptions[<spacing factor width>,<spacing factor height>;<img factor size>;<border_size>]Set inventory list style
spacing factor widthandspacing factor heightare spacing factor sizes (relative to the slot size) of a slotexample 1 : (0.0,0.0) for spacing means that there are no space between slots
example 2 : (1.0,1.0) for spacing means that default space between slots is used
example 3 : (2.0,2.0) for spacing means that default space between slots x2 is used
img factor sizeis the size factor (relative to the screen size) of a slot : a slot is always a squarethe default value for the img factor size is 1.0 (42 pixels with border included for a 800x600 screen size)
example 1 : 1.0 for img factor size means that you use the default size for a slot
example 2 : 2.0 for img factor size means that you use the default size x2 for a slot
border sizeis the size of the border of a slot (wasn't in the original PR)Example 1
Example 2
Example 3