Skip to content

Commit

Permalink
[MIRROR] Fixes the color matrix editor (#2777)
Browse files Browse the repository at this point in the history
* Fixes the color matrix editor (#82478)

## About The Pull Request

It was sending back stringified numbers as inputs. This came from a
typescript cleanup pr from sync (#82000) and was ultimately caused by
a... I think misunderstanding of how the color list works (#67967)

## Why It's Good For The Game

Works like a charm now, which is good cause I use it a lot

## Changelog
:cl:
fix: The color matrix editor now works properly again
/:cl:

* Fixes the color matrix editor

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: LemonInTheDark <[email protected]>
  • Loading branch information
3 people authored Apr 8, 2024
1 parent 239c743 commit 5041c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Window } from '../layouts';

type Data = {
mapRef: string;
currentColor: string[];
currentColor: number[];
};

const PREFIXES = ['r', 'g', 'b', 'a', 'c'] as const;
Expand Down Expand Up @@ -49,7 +49,7 @@ export const ColorMatrixEditor = (props) => {
format={(value) => toFixed(value, 2)}
onDrag={(value) => {
let retColor = currentColor;
retColor[row * 4 + col] = `${value}`;
retColor[row * 4 + col] = value;
act('transition_color', {
color: retColor,
});
Expand Down

0 comments on commit 5041c34

Please sign in to comment.