draugath

RmlUi - rmlinput - main.lua

Jan 19th, 2013 (edited)
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. declare("rmlinput", {})
  2.  
  3. rmlinput.window = rmlui.contexts[1]:LoadDocument("plugins/rmlinput/input.rml")
  4. local input = rmlinput.window:GetElementById("input")
  5. local clearbutton = rmlinput.window:GetElementById("clearbutton")
  6.  
  7. local function clear_input(event)
  8.     console_print("input", tostring(input), tostring(input.tag_name), tostring(input.attributes.value))
  9.     input.attributes.value = ""
  10.     console_print("input", tostring(input), tostring(input.tag_name), tostring(input.attributes.value))
  11. end
  12. clearbutton:AddEventListener("click", clear_input)
Advertisement
Add Comment
Please, Sign In to add comment