-
Notifications
You must be signed in to change notification settings - Fork 788
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
Added: Initial revision of button interacted slider #1935
base: master
Are you sure you want to change the base?
Conversation
It will inherit DSizeToContents, then attach slider and buttons ( below ) to it. Buttons can used to interact with the slider: |
...What is it? |
Hi, a Button-interacted slider gm_flatgrass.2023-1-22.20-25-58.webm |
Fixed: Clear buttons removing buttons array also
The idea is for the user to interact with slider faster. It requites one action to snap to 45 degrees for example and can be customized for the buttons to do different actions: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/lua/vgui/dasminsliderbutton.lua |
You might want to rework your coding style according to https://github.com/Facepunch/garrysmod/blob/master/CONTRIBUTING.md, though. |
Yes, sir, sadly I do not really have time during the day of work and pretty tired to do in the evening. Finished the final revision though. Works like a charm! |
Fixed: SetTall in lazt mode updating element padding
Done. Fixed also Set(Tall/Wide) when passing only panel size |
Hi, @Grocel @robotboy655 I wonder is it worth it to do some factorization: Or this panel is fine as it is ? |
@dvdvideo1234 What's the status of this PR? Did you take a look into the coding style the game base file requires? These short variable names BDX and BDY are not good variable names in this project. Other stuff I noticed is: Statements like these: if(iSiz <= 0) then return 0 end Should look like these: if ( iSiz <= 0 ) then
return 0
end Please take a look at: https://github.com/Facepunch/garrysmod/blob/master/CONTRIBUTING.md |
Done.. I think I got them all but if some are remaining pls point them out |
The ifs are still off, mind the space between brackets, also those before and after them. |
Renamed: Current slider reference to match current button one
Should be good now |
Looks much better now. I am not sure what Rubat thinks of this, though. |
I see people really tend to like this feature, so I am sharing the code of this panel here ;)