Hello, I need help with my VGUi Thingy. i Want the text pepole are writing in the DTextEntry to end up in the record command - RunConsoleCommand( "record", " I Want TheTextEntry Text here" ) if you understand :S
local Button = vgui.Create( "Button" ) //Create a button that is attached to Frame
Button:SetText( "Record" ) //Set the button's text to "Click me!"
Button:SetParent( CinemaRecorder )
Button:SetPos( 5, 30 ) //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ) //Sets the width of the button you're making
function Button:DoClick( ) //This is called when the button is clicked
RunConsoleCommand( "record", "test" )
end
local CinemaText = vgui.Create( "DTextEntry")
CinemaText:SetPos( 20,25 )
CinemaText:SetTall( 20 )
CinemaText:SetWide( 450 )
CinemaText:SetEnterAllowed( true )
CinemaText:SetParent( CinemaRecorder )
end
Help
[lua]
local CinemaText = vgui.Create( "DTextEntry")
CinemaText:SetPos( 20,25 )
CinemaText:SetTall( 20 )
CinemaText:SetWide( 450 )
CinemaText:SetEnterAllowed( true )
CinemaText:SetParent( CinemaRecorder )
local Button = vgui.Create( "Button" ) //Create a button that is attached to Frame
Button:SetText( "Record" ) //Set the button's text to "Click me!"
Button:SetParent( CinemaRecorder )
Button:SetPos( 5, 30 ) //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ) //Sets the width of the button you're making
function Button:DoClick( ) //This is called when the button is clicked
RunConsoleCommand( "record", CinemaText:GetValue() )
CinemaText:Clear()
end[/lua]
Untested.
[QUOTE=yakahughes;19918252][lua]
local CinemaText = vgui.Create( "DTextEntry")
CinemaText:SetPos( 20,25 )
CinemaText:SetTall( 20 )
CinemaText:SetWide( 450 )
CinemaText:SetEnterAllowed( true )
CinemaText:SetParent( CinemaRecorder )
local Button = vgui.Create( "Button" ) //Create a button that is attached to Frame
Button:SetText( "Record" ) //Set the button's text to "Click me!"
Button:SetParent( CinemaRecorder )
Button:SetPos( 5, 30 ) //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ) //Sets the width of the button you're making
function Button:DoClick( ) //This is called when the button is clicked
RunConsoleCommand( "record", CinemaText:GetValue() )
CinemaText:Clear()
end[/lua]
Untested.[/QUOTE]
Thank you sir, Gonna test it out now !
And a Question : How do you do that code thingy you did over ?
-snip-
You wrap your code in [noparse][lua][/lua][/noparse] tags.
[noparse][lua]code here[/lua][/noparse] will look this this:
[lua]code here[/lua]
[QUOTE=commander204;19918375]THey are [lua2][/lua2] tags remove the 2[/QUOTE]
Obviously you've never heard of [noparse][noparse][/noparse][/noparse] :downs:
[QUOTE=commander204;19918375]THey are [lua2][/lua2] tags remove the 2[/QUOTE]
You wrap your [bb]code in [noparse][noparse][/noparse][/noparse] tags.
[noparse][noparse][lua][/lua][/noparse][/noparse] will look this this:
[noparse][lua][/lua][/noparse]
[lua] Bummie
Likes
icecream [/lua]
[editline]09:00PM[/editline]
[QUOTE=BummieHEad;19918477][lua] Bummie
Likes
icecream [/lua][/QUOTE]
Strange :S
[editline]09:00PM[/editline]
Thanks for the help ! :)
[QUOTE=CombineGuru;19918428]Obviously you've never heard of [noparse][noparse][/noparse][/noparse] :downs:[/QUOTE]
I do but I didnt know they work here too.
[lua] local Button = vgui.Create( "Button" ) //Create a button that is attached to Frame
Button:SetText( "stop" ) //Set the button's text to "Click me!"
Button:SetParent( CinemaRecorder )
Button:SetPos( 5, 60 ) //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ) //Sets the width of the button you're making
function Button:DoClick( ) //This is called when the button is clicked
RunConsoleCommand( "stop" )
end [/lua]
[editline]09:14PM[/editline]
[QUOTE=BummieHEad;19918743][lua] local Button = vgui.Create( "Button" ) //Create a button that is attached to Frame
Button:SetText( "stop" ) //Set the button's text to "Click me!"
Button:SetParent( CinemaRecorder )
Button:SetPos( 5, 60 ) //Set the button's position relative to it's parent(Frame)
Button:SetWide( 100 ) //Sets the width of the button you're making
function Button:DoClick( ) //This is called when the button is clicked
RunConsoleCommand( "stop" )
end [/lua][/QUOTE]
Coooool
Your whitespace skills are horrible.
Sorry, you need to Log In to post a reply to this thread.