-
Notifications
You must be signed in to change notification settings - Fork 199
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
[WIP] Round corners and modify tabed windows. #2554
base: main
Are you sure you want to change the base?
Conversation
* Rounded buttons and windows * Reworked tabed windows * Better corner switch handle
…on non buttons widgets.
It looks great! Some comments:
|
I changed it to the same color as the one for active buttons to "unify" active tab like the ones in Outfit window and active buttons.
I'll look at this. I also planned to remove all the hard coded values to defines ofc.
True. I think the best is just to move all the tabbar up a little as this this will also fix the strang looking of tabbar inside windows.
Fullscreen windows like map should not change as i not apply it to windows which not have tabs. About land one, it just appear like the screenshot but bottom stick to the top of the bottom blue bar and side stick to the game window.
I'm currently looking at this, i first try to change the graphics.rectangle method to behave like the love2d 0.10+ one. |
* Rounded some luatk widget
* Changed some toolkit rounded rect by gl ones.
* Removed rounded from toolkit
* Implemented it for rectangles and circles. * Fixed TabedWindows behaviour.
* Some lua API opt fix * Rename renderRectEmpty and renderRect
OK, I took a quick look at it. Some notes.
I still have to play around a bit more. However, it seems to be quite nice. |
Hum, strange but ok x')
I guess some doubles values may be floored through the functions arguments typecasting on some calls. I thought about it at a point but forgot to double check. Else i guess we must choose right values for line_width as for borders radius. For multiple elements, i choosen values "logicaly" without more testing than required i guess.
It is intended, i globally removed windows title while i was working on windows size and i just seen it as useless x') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks good, however there's some hardcoded stuff that should probably be fixed, and some stuff that should be made explicit. Some of the major points are:
- Don't do the conditional rounding in renderPane
- Don't hardcode window / widget names, use parameters instead
- Would be nice to have a fullscreen fallback for when running at minimum resolution. As in, don't show the background when landed at minimum resolution at all. Please see screenshot of 4. for an example.
- The rectangular tabs have some weird offsets as shown in the screenshot below for the selected tab
- The buttons are less visible, but the border is stronger compared to the main branch
- There is also a difference in border brightness between the round and not round variant. Likely due to using the GL_LINE_LOOP. Probably would make more sense to just use a shader for all. You can use the discard; command to avoid rendering a pixel to be a bit faster.
Another thing I just noticed, since it doesn't full resolution on landed at minimum resolution (1280x720), you actually can see the bottom bar as shown in the first screenshot of the previous post. In the current main, it covers up everything. This means that it is likely that the effective height es being further reduced, likely making worse some of the issues we have with lack of scrolling text and too large descriptions. |
* Use the rect.frag
* Frags looks finally well setup x) * Added Session.vim to .gitignore
|
|
This is my in progress modifications to gui.
Remaining work :
Recenter home window and Esc menu.
Fix unaligned things in widgets (scrollbar, background ...) or just use regular corner for them.
Implement love.graphics.rectangle as in love 0.10 (https://love2d.org/wiki/love.graphics.rectangle)
Implement love.graphics.setLineWidth(width)
Fix info window top go out of the screen when game window height is reduced.
Use renderShaderH for all rounded rectangles.
Allow player to choose between rounded UI and sharp one.
Verify Doxygenation.
Replace magic numbers. ?
Add missing documentation ?
Updated preview:
https://www.youtube.com/watch?v=DHr2B4N0UT8