Better option for textbox

I have been using the textboxes for a long time, but they’re trash and I don’t even know how to change the colors of it. isn’t there a better alternative for textboxes (not prompts)

Use CSS styling and manual changes to the clip’s color. Should help!

1 Like

Problem: interacting with CSS in JavaScript is already annoying, and infuriating in Wick

1 Like

well then i guess he’s screwed

If you go inside of the textbox itself, and inside of load script after the inputElem has been defined add this line of code:

 this.inputElem.style="background-color: black;color:white; font-size: 5px;"; 

You could change it’s color, text color, font size, that stuff.
You can delete the font size part at the end if you don’t want to change it.
Here’s an example:
My Project4-20-2024_10-37-27.wick (4.6 KB)
I also defined the box as a “textarea”
Look inside of the load script of the textbox, line 20 & 21.

2 Likes

how do I make it so I cant drag it and make it bigger while the project is running

Inside of the textbox, load script again, change “textarea” in line 20 to “input”

That should remove the drag-to-expand thing

1 Like

another question, how do I generate a box instead of an input? If it’s even possible. (just a normal box)

A box of what? Just some DIV? An iFrame? A marquee/!??!

Just a square, a plain square that I can change its properties.

So how the textbox in wick editor is that the code creates a div (container), and creates an input element, with different properties, then attaches that element to the div container.

You can change the element type in line 20 load script into any form you’d like.
“input” for regular textbox, “textarea” for an expandable textbox, “canvas” for a canvas element (which you can draw on and all), “checkbox” for checkboxes, “button” for… literally a button, “iframe” for an iframe, and the list goes on.

As an example, inside of the textbox, load script, line 20 and after, I switched the element type to “canvas” and defined some style properties, then from the project, inside the object’s update script, I added in 3 rectangles with lower opacity in update script. Since their opacity is low and we’re in the update script, it creates a cool fade effect.

canvas.wick (4.7 KB)
You can look up canvas functions and more of that stuff if it’s to your interest.

1 Like