Pivity

[TDLib] Three's Derma Lib

Last read Never
#1

Three's Derma Lib (or TDLib for short)

It's finally here. TDLib is a completely open-source bootstrap-like VGUI library used for making quick, easy, and beautiful user interfaces for your Garry's Mod addons and gamemodes.

TDLib operates around the core principle of classes, functions which are ran on a panel that do certain things. Classes make it easy to do various things - set backgrounds, apply click and hover effects, send a net message, manipulate a panel's size and position, the possibilities are limitless.

There's way too much to fit into one post, so check out the github and official documentation here:

  1. GitHub
  2. Docs

This library is free to use in any paid addons assuming I am given proper credit.


Some demos


Jumbotron (OLD)

Code: https://pastebin.com/3acwrK6X


Info pane

Code: https://threebow.gitbooks.io/tdlib/content/examples/basic-info-pane.html


shameless plug, if you feel like giving some thanks for this for whatever reason you can send me money


i also take bitcoin 35oZ6qX9gd3DvLZCtCApdWA5fPxgxNkBoL


also give me percent cuts of revenue from your scoreboards and f4 menus


oh yeah and your first born child too thanks
Winner x 20Friendly x 4Agree x 2Funny x 1
#2

screenshots maybe?

Agree x 2
#3

shame this was made by a nodefag, it's really good

issa joke b4 anyone gets offended fuckwads

Funny x 3Disagree x 2Agree x 1Optimistic x 1
#4
ByBillyat 5th of January 2018 22:07:36
screenshots maybe?

updated post

Winner x 1Optimistic x 1
#5

Cool, I hope it doesn't get saturated

Agree x 1Optimistic x 1
#6

très bon muchos grande script

Agree x 1Disagree x 1Winner x 1Optimistic x 1
#7
ByQuack🦆at 5th of January 2018 22:23:11
très bonmuchos grande script

Funny x 5Optimistic x 1
#8

It's finally here! :D

Agree x 1
#9

I don't understand this 100% yet. Although from my understanding now, this is a great learning tool and resource to use when I get into derma. Thank you for making this and I'm guessing I will thank you even more in the future!

Agree x 1
#10
ByInspectorat 5th of January 2018 22:35:52
I don't understand this 100% yet. Although from my understanding now, this is a great learning tool and resource to use when I get into derma. Thank you for making this and I'm guessing I will thank you even more in the future!

Basic usage:

-- Instead of this
panel.Paint = function(s, w, h)
surface.SetDrawColor(Color(255, 0, 0))
surface.DrawRect(0, 0, w, h)
end

-- You can do

panel:Background(Color(255, 0, 0))

Winner x 1
#11

may have to open gmod for this one

Agree x 2
#12

This is great. Really appreciate this coming out as free.

Friendly x 1
#13

This is fucking cool, gonna buy a script from yours just to support you <3

Friendly x 2
#14
BySrlionat 6th of January 2018 08:01:32
This is fucking cool, gonna buy a script from yours just to support you <3

<3

#15

As a tiny Lithuanian guy who has been struggling learning design from scratch by himself over the past few months, I am sincerely impressed. Nice work.

Friendly x 2
#16

I thank the lord for this gift, my shitty UI can be a little less shitty now <3

Agree x 1
#17

Really great work, cheers for making this open source, I'm sure myself and many others will learn from this - big kudos.

Agree x 1
#18

Greatly appreciate you forwarding me to this. Was able to make some decent improvements.

Friendly x 1
#19

Well this would have been incredibly useful a couple of days ago before I spent hours and hours swearing at derma! I may just have to go back through my code now with this in mind, many thanks for providing such a useful addon free of charge!

Just one question, I assume that using this does not override any base functionality of Derma?

Friendly x 1
#20
Byampat 27th of January 2018 02:20:09
Greatly appreciate you forwarding me to this. Was able to make some decent improvements.

no issue, gonna post on facepunch once the new update hits

Edited

Byjwgamesukat 27th of January 2018 03:10:19
Well this would have been incredibly useful a couple of days ago before I spent hours and hours swearing at derma!I may just have to go back through my code now with this in mind, many thanks for providing such a useful addon free of charge!Just one question, I assume that using this does not override any base functionality of Derma?

yeah, this doesn't change any base derma functionality, there is a bug currently where people who set variables on panels that are named the same as a class cause errors (BLogs is an example), new version will have a fix where you will either have to initialize the panel with a function different to vgui.Create, or call a function before you do anything that just initializes the panel with TDlib and allows classes to be called on it.

Users viewing this thread
Nobody