CIF.rbxm (5.3 KB)
I found an old file on my computer for when I was making my in-game script editor.
Apparently, this code is supposed to replace the cursor and like the selection highlighter background thing.
Some of this code might be forked, especially the highlightText thing im pretty sure I did not come up with that.
I refurbished the code, and created a usuable module out of it
-- How to use
cif:setup(TextBox)
cif:setup(TextBox).fakeCursor -- get fakeCursor frame
cif:setup(TextBox).selectionTransparency -- for the selection highlight transparency
cif:setup(TextBox).selectionColor3 -- for the selection highlight color
-- to setup custom focus and focuslost functions
function cif:focused()
print("Focused")
end
function cif:focusLost()
print("Focus Lost")
-- defaultly this function is to make the fakecursor invisible,
-- so if u wish to make the cursor have like a lil animation
-- when you focus in and focus out of the textbox, you could with this
end
cif:Setup(TextBox); -- SETUP CUSTOM FUNCS BEFORE YOU ACTUALLY SETUP THE CIF
this is pretty lightweight 2, with in total 381 lines