• Print

Author Topic: How to have tabs  (Read 5561 times)

0 Members and 1 Guest are viewing this topic.

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
How to have tabs
« on: January 21, 2015, 03:14:44 pm »
I'm trying to make a vgui code that allows
Tabs. How do I do that? I hear some use multiple files per tab. Like the TTT Damagelogs. How do that. This is my current code. How do I make each tab into 2 files. This is 2 tabs in 1 file
Code: Lua
  1. function DermaTest()
  2. local DermaPanel = vgui.Create( "DFrame" )
  3. DermaPanel:SetPos( ScrW()/2 - 225, ScrH()/2 -100 )
  4. DermaPanel:SetSize( 350, 400 )
  5. DermaPanel:SetTitle( "Testing Derma Stuff" )
  6. DermaPanel:SetVisible( true )
  7. DermaPanel:SetDraggable( true )
  8. DermaPanel:ShowCloseButton( true )
  9. DermaPanel:MakePopup()
  10.  
  11. local PropertySheet = vgui.Create( "DPropertySheet", DermaPanel )
  12. PropertySheet:SetPos( 5, 30 )
  13. PropertySheet:SetSize( 340, 315 )
  14.  
  15. local SheetItemOne = vgui.Create( "DCheckBoxLabel" )
  16. SheetItemOne:SetText( "Use Props?" )
  17. SheetItemOne:SetConVar( "some_convar" )
  18. SheetItemOne:SetValue( 1 )
  19. SheetItemOne:SizeToContents()
  20.  
  21. local SheetItemTwo = vgui.Create( "DCheckBoxLabel" , CategoryContentTwo )
  22. SheetItemTwo:SetText( "Use SENTs?" )
  23. SheetItemTwo:SetConVar( "some_convar" )
  24. SheetItemTwo:SetValue( 1 )
  25. SheetItemTwo:SizeToContents()
  26.  
  27. PropertySheet:AddSheet( "ULX Menu", SheetItemOne, "icon16/user.png",
  28. false, false, "WOW It's a text box!!!" )
  29. PropertySheet:AddSheet( "Super Menu", SheetItemTwo, "icon16/group.png",
  30. false, false, "Can I haz meh cheezburger now?" )
  31. end
  32.  
  33. concommand.Add( "dermatest", DermaTest )
  34.  
  35.  
  36. net.Receive('Derma_Test', function()
  37. RunConsoleCommand('dermatest')
  38. print('derma_test')
  39. end )
  40.  
Newb Coder. Soon to get better

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: How to have tabs
« Reply #1 on: January 21, 2015, 03:29:51 pm »
I dont have the info but you can try: the Gmod Wiki

Also how are you learning lua i would LOVE to learn so maybe you can fill me in... Thanks

The wiki was helpful to me so look in that

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
Re: How to have tabs
« Reply #2 on: January 21, 2015, 03:31:44 pm »

I dont have the info but you can try: the Gmod Wiki

Also how are you learning lua i would LOVE to learn so maybe you can fill me in... Thanks

The wiki was helpful to me so look in that

I usually use the wiki and fool around with code. I might get a tutor soon
Newb Coder. Soon to get better

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: How to have tabs
« Reply #3 on: January 21, 2015, 04:02:02 pm »
Lua is actually pretty easy to learn. You can visit here: /index.php/topic,4633.0.html to view resources. I learned by going through the book and applying practice.

Also if you want to add me on Skype, I can give you a little "101 course" and so on when I'm available.
Once you get to know me, you'll find you'll have never met me at all.

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
Re: How to have tabs
« Reply #4 on: January 23, 2015, 06:41:05 pm »
Also I want to be able to add multiple VGUI things on the pannel
Newb Coder. Soon to get better

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
Re: How to have tabs
« Reply #5 on: March 23, 2015, 04:16:23 pm »
Lua is actually pretty easy to learn. You can visit here: /index.php/topic,4633.0.html to view resources. I learned by going through the book and applying practice.

Also if you want to add me on Skype, I can give you a little "101 course" and so on when I'm available.
Sorry for late response, whats your username?
Newb Coder. Soon to get better

Offline Livaco

  • Full Member
  • ***
  • Posts: 133
  • Karma: -37
    • Livaco
Re: How to have tabs
« Reply #6 on: March 27, 2015, 09:47:41 am »
You Need To Do This Code

Code: Lua
  1. local CATEGORY_NAME = "WhatTheNameIs"
Here To Help And Be Happy And Help :)

My Website
My Addons
PermaBanV1.0

Quote from:  Livaco on April 12 at 9:10:20 PM
I May Be Dum But Am Still Better Then The Rest

Livaco Products©

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: How to have tabs
« Reply #7 on: March 27, 2015, 02:23:55 pm »
You Need To Do This Code

Code: Lua
  1. local CATEGORY_NAME = "WhatTheNameIs"
Livaco, no. That's not what OP was asking at all.
You're bumping old threads. There's a warning about that for a reason.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Livaco

  • Full Member
  • ***
  • Posts: 133
  • Karma: -37
    • Livaco
Re: How to have tabs
« Reply #8 on: March 27, 2015, 02:30:08 pm »
Oh Ok,,,,,
Here To Help And Be Happy And Help :)

My Website
My Addons
PermaBanV1.0

Quote from:  Livaco on April 12 at 9:10:20 PM
I May Be Dum But Am Still Better Then The Rest

Livaco Products©

  • Print