🎉Textbox

input lord

var textbox =new Textbox({
  name:"text",//textbox name
  position:{//you enter where it will be on the screen
    x:"50%",y:"50%"
  },
  scale:{//automatically adjusts if you do not add this
    x:"25px",
    y:"25px"
  },
  layer:100,//you don't have to type is automatically set to 100
  placeholder:"sa",//it writes into it what to do when you do nothing
  value:"selam",//comes with an automatic value
  eval:`
  console.log(event.data)
  //for example, write to console, you can use functions
  `,
  removeable:true//erases itself after sending data
})

You don't have to add anything other than name and position.

textboxfocus = function(key){
  console.log("You focused the textbox:"+key)//textbox name
}

Update

textbox.update({
    value:"hi"
})
//or 
updateData({
    name:"textbox",
    value:"hi"
})

Get

console.log(textbox.get())
console.log(getData("textbox"))
//Example
console.log(
textbox.get().value
)

Remove

textbox.remove()
removeData("textbox")

Last updated