Contunuing work on PNRP tonight
I have come across several anoying things with this update.
1.) DPanelList - Depreciated, and although there are no notes on changes to this, there has been some. Have had to do a work around to get the backgroiund color back.
As posted at
http://garry.tv/post/10207256726/still-codingOne of the things I’m changing is DPanelList. If you’ve done a lot of GUI work in Lua you probably know what this is. It’s a panel that organises panels inside itself, and adds a scrollbar if it overflows. It’s also a huge mess. Over the years it’s been added to and bent to be used in situations it really shouldn’t have been.
In the new update I’m phasing it out. I’m phasing the way it works out too. We have a panel:GetChildren() now - so there’s no need for a panel like DPanelList to keep track of its children in an .Items table. Because we’re using GetChildren the order they’re stored in becomes important (the first one will be at the top, then the second one etc).
Instead of having a one size fits all solution like DPanelList - I’m moving towards general layout panels (DLineLayout, DIconLayout). These new layout panels don’t automatically add a scrollbar, so you have to dock them to a DScrollPanel to get scrolling functionality. This cleans everything up.
I probably won’t chop DPanelList out of the next update completely - but it won’t be updated with the newer derma features like the new style or the drag and drop stuff - and it’s usage will be discouraged.
I apreciate adding more functionality, but I dont see the need to remove a working function that has a nice simple use when you dont need the more expansive method.
2.) DNumSlider - This is caused more by the above problem. In compensation with the new bacground, DNumSlider does not adjust its text color correctly. It also seems that this method does not have any options for changing its text color. I have tried quite a few not listed.
3.) DComboBox - Or what used to be DComboBox, but is now DMultiChoice. Or I should say that DMultiChoice is now DComboBox, and DMultiChoice is going away. Or has gone in GMod 13..... So now I will need to use DListView wich can do the same as the old DComboBox, but takes some changes on my end.
Here is Garrys post on DComboBox on his Google Docs file named “Reasons why the shit you coded is now broke”
https://docs.google.com/document/d/1khS ... ?hl=en_US#DComboBox is swapped with DMultiChoice.
When I originally made them they were named the wrong way around. DMultiChoice is now removed. This is because DListView was basically recreating all the functionality of DMultiChoice. DListView has extra settings to remove colums and headers - which make it exactly like the old DComboBox. Complicated eh?
Thats it for the moment, back to work.