From 99423695e538d70b976437a9a051cc15adbb0101 Mon Sep 17 00:00:00 2001 From: paradoxuum Date: Sat, 10 Feb 2024 01:00:25 +0000 Subject: [PATCH] feat(ui): make history entries selectable Closes #12 --- src/client/interface/components/interface/TextField.tsx | 7 +------ .../interface/components/terminal/history/HistoryLine.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/client/interface/components/interface/TextField.tsx b/src/client/interface/components/interface/TextField.tsx index 0fc692cf..e9bd456b 100644 --- a/src/client/interface/components/interface/TextField.tsx +++ b/src/client/interface/components/interface/TextField.tsx @@ -4,12 +4,6 @@ import { BindingOrValue } from "@rbxts/pretty-react-hooks"; import { DEFAULT_FONT } from "../../constants/fonts"; import { TextProps } from "./Text"; -const GRADIENT = new NumberSequence([ - new NumberSequenceKeypoint(0, 0), - new NumberSequenceKeypoint(0.75, 0), - new NumberSequenceKeypoint(1, 1), -]); - interface TextFieldProps extends TextProps { text?: BindingOrValue; placeholderText?: BindingOrValue; @@ -40,6 +34,7 @@ export const TextField = forwardRef( TextXAlignment={props.textXAlignment} TextYAlignment={props.textYAlignment} TextScaled={props.textScaled} + RichText={props.richText} AutomaticSize={props.textAutoResize} Size={props.size} Position={props.position} diff --git a/src/client/interface/components/terminal/history/HistoryLine.tsx b/src/client/interface/components/terminal/history/HistoryLine.tsx index 770adaad..6d5b7813 100644 --- a/src/client/interface/components/terminal/history/HistoryLine.tsx +++ b/src/client/interface/components/terminal/history/HistoryLine.tsx @@ -8,6 +8,7 @@ import { Frame } from "../../interface/Frame"; import { Group } from "../../interface/Group"; import { Outline } from "../../interface/Outline"; import { Text } from "../../interface/Text"; +import { TextField } from "../../interface/TextField"; interface HistoryLineProps { data: HistoryEntry; @@ -53,7 +54,7 @@ export function HistoryLine({ data, size, position, order }: HistoryLineProps) { /> - );