How do I turn the Text Box hover image invisible?
The reason I put this in Scripting Support is because I don’t think there is a way to do this in the properties page, and can only be done via script, but I would rather prefer a way from the properties!
ayoub50
(Ayoub)
August 2, 2022, 9:49pm
#2
wdym hover image? the textbox has no hover image.
ayoub50
(Ayoub)
August 2, 2022, 9:53pm
#5
why would you even use a TextBox for that? use a TextLabel.
The player can type if they do a certain task.
ayoub50
(Ayoub)
August 2, 2022, 9:55pm
#7
Unfortunately, you can’t really do that.
1 Like
Oh ok
I guess I’ll use both a text label and text box
ayoub50
(Ayoub)
August 2, 2022, 9:56pm
#9
you can replace the textlabel to a textbox when tasks are done.
dutycall11
(SavageMode)
August 2, 2022, 9:57pm
#10
That’s what I meant to say
char limit
Katrist
(Katrist)
August 2, 2022, 9:59pm
#11
You can try constructing a custom icon when the player enters the UI, I’ll make a script real quick.
Zek4ry
(Astral)
August 2, 2022, 10:00pm
#12
You can stop the hover , but not the icon from appearing, it won’t appear if ‘Active’ is disabled, but it’ll still appear when you focus, 'tis easier to just change it to a TextLabel.
dutycall11
(SavageMode)
August 2, 2022, 10:02pm
#13
I already stopped that icon from appearing on focus with CursorPosition, but I can’t stop the hover.
I guess it will be extremely easier just changing it to a TextLabel
Zek4ry
(Astral)
August 2, 2022, 10:03pm
#14
The active property will disable it from appearing on ‘hover’
Katrist
(Katrist)
August 2, 2022, 10:04pm
#15
@dutycall11
Try this:
--//Services
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
--//Variables
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local Mouse = LocalPlayer:GetMouse()
local TextBox = script.Parent
--//Controls
local hoverImage = "rbxassetid://0000000"
local mouseEntered = false
--//Functions
TextBox.MouseEnter:Connect(function()
mouseEntered = true
UserInputService.MouseIconEnabled = false
local newIcon = Instance.new("ImageLabel")
newIcon.Position = UDim2.fromOffset(Mouse.X, Mouse.Y)
newIcon.Image = hoverImage
newIcon.BackgroundTransparency = 1
newIcon.Parent = PlayerGui
while mouseEntered do
newIcon.Position = UDim2.fromOffset(Mouse.X, Mouse.Y)
task.wait()
end
UserInputService.MouseIconEnabled = true
newIcon:Destroy()
end)
TextBox.MouseLeave:Connect(function()
mouseEntered = false
end)
Put it as a local script inside your TextBox.
1 Like
dutycall11
(SavageMode)
August 2, 2022, 10:06pm
#16
The problem I’m having with that is it is also hiding the mouse cursor, I only want it to hide the hover Image, I’ll just use a textlabel instead, thx for trying though!
Zek4ry
(Astral)
August 2, 2022, 10:07pm
#17
I just said like three times, if you disable the active property on the TextBox, it will disable the hover-cursor.
Katrist
(Katrist)
August 2, 2022, 10:07pm
#18
Ohh, I thought you wanted a custom hover cursor.
1 Like
dutycall11
(SavageMode)
August 2, 2022, 10:08pm
#19
I disabled the active property but that does not disable the hover-cursor
Zek4ry
(Astral)
August 2, 2022, 10:08pm
#20
Katrist
(Katrist)
August 2, 2022, 10:09pm
#21
Can’t you just disable UserInputService.MouseIconEnabled when they hover over the TextBox?
Like this:
--//Services
local UserInputService = game:GetService("UserInputService")
--//Variables
local TextBox = script.Parent
--//Functions
TextBox.MouseEnter:Connect(function()
UserInputService.MouseIconEnabled = false
end)
TextBox.MouseLeave:Connect(function()
UserInputService.MouseIconEnabled = true
end)
1 Like