diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-06-04 18:45:39 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-06-04 18:45:39 +0200 |
| commit | 3695589a47c7434f4c5abbe2ebead052c0d07ba6 (patch) | |
| tree | a42301bac4000cd1f4f6a10d16dfb5a779f12d97 /src/main/resources | |
| parent | 9c32c6e824058181002b0518e7e12c3425715b4b (diff) | |
| download | Firmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.tar.gz Firmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.tar.bz2 Firmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.zip | |
feat: Add macro editing UI
Diffstat (limited to 'src/main/resources')
3 files changed, 114 insertions, 0 deletions
diff --git a/src/main/resources/assets/firmament/gui/config/macros/combos.xml b/src/main/resources/assets/firmament/gui/config/macros/combos.xml new file mode 100644 index 0000000..b2865ab --- /dev/null +++ b/src/main/resources/assets/firmament/gui/config/macros/combos.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Root xmlns="http://notenoughupdates.org/moulconfig" xmlns:firm="http://firmament.nea.moe/moulconfig" +> + <Panel background="TRANSPARENT" insets="10"> + <Column> + <Meta beforeClose="@beforeClose"/> + <ScrollPanel width="380" height="300"> + <Align horizontal="CENTER"> + <Array data="@actions"> + <!-- evenBackground="#8B8B8B" oddBackground="#C6C6C6" --> + <Panel background="TRANSPARENT" insets="3"> + <Panel background="VANILLA" insets="6"> + <Column> + <Row> + <Text text="@command" width="280"/> + </Row> + <Row> + <Text text="@formattedCombo" width="250"/> + <Align horizontal="RIGHT"> + <Row> + <firm:Button onClick="@edit"> + <Text text="Edit"/> + </firm:Button> + <Spacer width="12"/> + <firm:Button onClick="@delete"> + <Text text="Delete"/> + </firm:Button> + </Row> + </Align> + </Row> + </Column> + </Panel> + + </Panel> + </Array> + </Align> + </ScrollPanel> + <Align horizontal="RIGHT"> + <Row> + <firm:Button onClick="@discard"> + <Text text="Discard Changes"/> + </firm:Button> + <firm:Button onClick="@saveAndClose"> + <Text text="Save & Close"/> + </firm:Button> + <firm:Button onClick="@save"> + <Text text="Save"/> + </firm:Button> + <firm:Button onClick="@addCommand"> + <Text text="Add Combo Command"/> + </firm:Button> + </Row> + </Align> + </Column> + </Panel> +</Root> diff --git a/src/main/resources/assets/firmament/gui/config/macros/editor.xml b/src/main/resources/assets/firmament/gui/config/macros/editor.xml new file mode 100644 index 0000000..50a1d99 --- /dev/null +++ b/src/main/resources/assets/firmament/gui/config/macros/editor.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Root xmlns="http://notenoughupdates.org/moulconfig" xmlns:firm="http://firmament.nea.moe/moulconfig" +> + <Center> + <Panel background="VANILLA" insets="10"> + <Column> + <Row> + <firm:Button onClick="@back"> + <Text text="←"/> + </firm:Button> + <Text text="Editing command macro"/> + </Row> + <Row> + <Text text="Command: /"/> + <Align horizontal="RIGHT"> + <TextField value="@command" width="200"/> + </Align> + </Row> + <Row> + <Text text="Key Combo:"/> + <Align horizontal="RIGHT"> + <firm:Button onClick="@addStep"> + <Text text="+"/> + </firm:Button> + </Align> + </Row> + <Array data="@combo"> + <Row> + <firm:Fixed width="160"> + <Indirect value="@button"/> + </firm:Fixed> + <Align horizontal="RIGHT"> + <firm:Button onClick="@delete"> + <Text text="Delete"/> + </firm:Button> + </Align> + </Row> + </Array> + </Column> + </Panel> + </Center> +</Root> diff --git a/src/main/resources/assets/firmament/gui/config/macros/index.xml b/src/main/resources/assets/firmament/gui/config/macros/index.xml new file mode 100644 index 0000000..3fa9f99 --- /dev/null +++ b/src/main/resources/assets/firmament/gui/config/macros/index.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Root xmlns="http://notenoughupdates.org/moulconfig" + xmlns:firm="http://firmament.nea.moe/moulconfig"> + <Center> + <Tabs> + <Tab> + <Tab.Header> + <Text text="Combo Macros"/> + </Tab.Header> + <Tab.Body> + <Fragment value="firmament:gui/config/macros/combos.xml" bind="@combos"/> + </Tab.Body> + </Tab> + </Tabs> + </Center> +</Root> |
