Coverted UI over to use <Table> for aesthetic reasons

This commit is contained in:
SteelSlayer
2020-01-07 11:51:09 -06:00
parent 3c6c182086
commit 22ccb3b336
3 changed files with 59 additions and 49 deletions

View File

@@ -70,7 +70,7 @@
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
var/ui_width = 280
var/ui_height = 134
var/ui_height = 132
ui = new(user, src, ui_key, "signaler", name, ui_width, ui_height, master_ui, state)
ui.open()

View File

@@ -1,4 +1,4 @@
import { NumberInput, Button, Section, LabeledList } from '../components';
import { Table, NumberInput, Button, Section } from '../components';
import { useBackend } from '../backend';
import { toFixed } from 'common/math';
@@ -13,8 +13,12 @@ export const Signaler = props => {
return (
<Section>
<LabeledList>
<LabeledList.Item label="Frequency">
<Table>
<Table.Row>
<Table.Cell color="label">
Frequency:
</Table.Cell>
<Table.Cell collapsing>
<NumberInput
animate
unit="kHz"
@@ -35,8 +39,13 @@ export const Signaler = props => {
onClick={() => act('reset', {
reset: "freq",
})} />
</LabeledList.Item>
<LabeledList.Item label="Code">
</Table.Cell>
</Table.Row>
<Table.Row lineHeight={5}>
<Table.Cell color="label">
Code:
</Table.Cell>
<Table.Cell collapsing>
<NumberInput
animate
step={1}
@@ -55,12 +64,13 @@ export const Signaler = props => {
onClick={() => act('reset', {
reset: "code",
})} />
</LabeledList.Item>
</LabeledList>
</Table.Cell>
</Table.Row>
</Table>
<Button
mt={1}
mt={0.2}
mb={-0.2}
width={37.4}
fluid
icon="arrow-up"
content="Send Signal"
textAlign="center"

File diff suppressed because one or more lines are too long