Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onLoad()
- -- First remove the existing inputs on the object
- self.clearInputs()
- -- Next, recreate the input. The text value is taken from the object memo field
- self.createInput({
- input_function = "save_value_to_description",
- function_owner = self,
- label = "Enter your description",
- alignment = 2,
- position = {x=0, y=1, z=0},
- width = 800,
- height = 300,
- font_size = 64,
- font_color = {r=0, g=0, b=0},
- color = {r=0, g=0, b=0},
- text = self.memo
- })
- end
- function save_value_to_description(obj, color, input, stillEditing)
- -- When a user finishes editing the input field, copy the text to the object
- -- memo field so it can be retrieved later
- if not stillEditing then
- self.memo = input
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement