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) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui) if(!ui)
var/ui_width = 280 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 = new(user, src, ui_key, "signaler", name, ui_width, ui_height, master_ui, state)
ui.open() 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 { useBackend } from '../backend';
import { toFixed } from 'common/math'; import { toFixed } from 'common/math';
@@ -13,8 +13,12 @@ export const Signaler = props => {
return ( return (
<Section> <Section>
<LabeledList> <Table>
<LabeledList.Item label="Frequency"> <Table.Row>
<Table.Cell color="label">
Frequency:
</Table.Cell>
<Table.Cell collapsing>
<NumberInput <NumberInput
animate animate
unit="kHz" unit="kHz"
@@ -35,8 +39,13 @@ export const Signaler = props => {
onClick={() => act('reset', { onClick={() => act('reset', {
reset: "freq", reset: "freq",
})} /> })} />
</LabeledList.Item> </Table.Cell>
<LabeledList.Item label="Code"> </Table.Row>
<Table.Row lineHeight={5}>
<Table.Cell color="label">
Code:
</Table.Cell>
<Table.Cell collapsing>
<NumberInput <NumberInput
animate animate
step={1} step={1}
@@ -55,12 +64,13 @@ export const Signaler = props => {
onClick={() => act('reset', { onClick={() => act('reset', {
reset: "code", reset: "code",
})} /> })} />
</LabeledList.Item> </Table.Cell>
</LabeledList> </Table.Row>
</Table>
<Button <Button
mt={1} mt={0.2}
mb={-0.2} mb={-0.2}
width={37.4} fluid
icon="arrow-up" icon="arrow-up"
content="Send Signal" content="Send Signal"
textAlign="center" textAlign="center"

File diff suppressed because one or more lines are too long