DLuaEditor.SetCode

From GMod Wiki

Jump to: navigation, search
Function
Syntax DLuaEditor.SetCode( )
Description:
Set's the code located inside the DLuaEditor control
Returns: nil
In Object: DLuaEditor
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DLuaEditor.SetCode]DLuaEditor.SetCode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates an LUA editor and adds some basic code
Used onNewerClient.png
Code
local luaeditor = vgui.Create( "DLuaEditor", yourframe )
luaeditor:SetPos( 10, 30 )
luaeditor:SetSize( 200, 300 )
luaeditor:SetCode([[
/* Oh Wow */
local garry = GetGlobalInt("awsomeness")
 
print(garry)
]])
 
Output
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox