mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 23:26:19 +00:00
Make error messages copyable (#614)
* Make error copyable * Allow partial copying or double click full copy
This commit is contained in:
@@ -57,8 +57,16 @@ function Error:render()
|
|||||||
end,
|
end,
|
||||||
}, {
|
}, {
|
||||||
ErrorMessage = Theme.with(function(theme)
|
ErrorMessage = Theme.with(function(theme)
|
||||||
return e("TextLabel", {
|
return e("TextBox", {
|
||||||
|
[Roact.Event.InputBegan] = function(rbx, input)
|
||||||
|
if input.UserInputType ~= Enum.UserInputType.MouseButton1 then return end
|
||||||
|
rbx.SelectionStart = 0
|
||||||
|
rbx.CursorPosition = #rbx.Text+1
|
||||||
|
end,
|
||||||
|
|
||||||
|
|
||||||
Text = self.props.errorMessage,
|
Text = self.props.errorMessage,
|
||||||
|
TextEditable = false,
|
||||||
Font = Enum.Font.Code,
|
Font = Enum.Font.Code,
|
||||||
TextSize = 16,
|
TextSize = 16,
|
||||||
TextColor3 = theme.ErrorColor,
|
TextColor3 = theme.ErrorColor,
|
||||||
@@ -66,10 +74,9 @@ function Error:render()
|
|||||||
TextYAlignment = Enum.TextYAlignment.Top,
|
TextYAlignment = Enum.TextYAlignment.Top,
|
||||||
TextTransparency = self.props.transparency,
|
TextTransparency = self.props.transparency,
|
||||||
TextWrapped = true,
|
TextWrapped = true,
|
||||||
|
ClearTextOnFocus = false,
|
||||||
Size = UDim2.new(1, 0, 1, 0),
|
|
||||||
|
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
})
|
})
|
||||||
end),
|
end),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user