Skip to content
Damian Monogue edited this page Aug 13, 2019 · 6 revisions

Welcome

Thank you for picking fText, demonnic's library for formatting text in Mudlet! fText is currently comprised of 3 main parts, the string formatter, a reusable string formatter, and a tablemaker for creating formatted, complex text displays.

fText: the basis of it all

Born from a series of functions I wrote due to a request in the old irc help channel, I recently had reason to look back over them and I cringed so hard I almost pulled a face muscle. So I rewrote them to be one function, and then created wrappers to access the specific functionality of the old functions.

Point being, fText is responsible for actually taking a table of formatting options and a string and churning out the formatted string. You can read about it here.

If you're coming from my old, original align() functions, the following code snippet in a script will allow your existing code to work while still gaining the benefits of the new version. It will also map the new functions to the global namespace, you rebel you.

function cfText(str, options)
  return demonnic:cfText(str, options)
end
function dfText(str, options)
  return demonnic:dfText(str, options)
end
function hfText(str, options)
  return demonnic:hfText(str, options)
end
function fText(str, options)
  return demonnic:fText(str, options)
end
function align(str, options)
  return demonnic:align(str, options)
end
function dalign(str, options)
  return demonnic:dalign(str, options)
end
function calign(str, options)
  return demonnic:calign(str, options)
end
function halign(str, options)
  return demonnic:halign(str, options)
end

TextFormatter: now reusable and adjustable

But I wasn't done yet, oh no. I grew tired of saving tables of formatting options and passing them into fText over and over. I needed something which would format text the same way, every time. But which I could also change parameters on. So I made the TextFormatter, which works like fText except it keeps track of its own internal formatting options. You can read about it here

TableMaker: but wait, there's more!

But honestly, my end goal was always to be able to display fully formatted sheets of text in the main console or a miniconsole. Why should labels get all the fancy formatting fun? It's downright despicable discrimination dangnabbit. Ok not really, but I felt it was past time to get something put together and released, as I couldn't find anything that covered this when I went looking. You can read about it here

You can’t perform that action at this time.