From b2793261193227af8165c4da2ef033775229ba2c Mon Sep 17 00:00:00 2001 From: EnderGoodra <167841498+EnderGoodra@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:28:04 +1100 Subject: [PATCH] Create description.md --- mods/EnderGoodra@Textile/description.md | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 mods/EnderGoodra@Textile/description.md diff --git a/mods/EnderGoodra@Textile/description.md b/mods/EnderGoodra@Textile/description.md new file mode 100644 index 00000000..57914dd5 --- /dev/null +++ b/mods/EnderGoodra@Textile/description.md @@ -0,0 +1,31 @@ +# Textile +A Balatro mod that modifies the base game's `evaluate()` function, adding in some extra style options for text. + +## Changes: +`{B:}` A new text style that creates a box around the selection, much like `{X: }` does for the base game. The color for the box is selected in a similar way to `{V: }`, where the provided integer acts as the index in the `colours` table, returned from `loc_vars`. + +Note that this allows a box to contain only space characters if desired, unlike `{X: }` which truncates any whitespace characters present. +```lua +text = { + 'This is a {B:1,C:white}test{} for the {B:2,C:red}B{} style' +} +``` +```lua +loc_vars = function(self, info_queue, card) + return { + vars = { + colours = { + G.C.SECONDARY_SET.Tarot, -- at index 1 + HEX("38000b"), -- at index 2 + }, + }, + } +end +``` + +`{X: }` now supports having its text color assigned using `{V: }` +```lua +text = { + 'This is a {X:1,C:white}test{} for the {X:2,V:1}X{} change' +} +```