From 87149af4c7f99a2df951fecdd628f11a836eb2ab Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Tue, 6 May 2025 23:10:52 -0400 Subject: [PATCH] Make the LEL layout look perty. --- README.md | 8 +++++--- demos/calc.cpp | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 45c3574..0d1e2b8 100644 --- a/README.md +++ b/README.md @@ -94,14 +94,14 @@ Then you configure a layout with the LEL formatting language: ```cpp $gui.layout( - "[*%(400)stack|_|_|_]" + "[*%(400)stack |_|_|_]" "[*%(400)readout|_|_|_]" "[push|pop|clear|eq]" - "[add|sub|mul|div]" + "[add |sub|mul |div]" "[btn7|btn8|btn9]" "[btn4|btn5|btn6]" "[btn1|btn2|btn3]" - "[neg|btn0|_]"); + "[neg |btn0|_ ]"); ``` This creates a simple RPN calculator UI with buttons for numbers, readouts for the results and stack, and basic math operators. For people from other languages, this is actually one big string, but C++ (like C) allows you to "concatenate" strings together that are next to each other, so I just put them on separate lines so they look more like the grid they represent. @@ -125,6 +125,8 @@ for(auto& [name, cell] : $gui.cells()) { $gui.set(id, {}); $gui.set