aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/ClientHamr
diff options
context:
space:
mode:
authorDavid Walter Seikel2015-07-09 03:51:56 +1000
committerDavid Walter Seikel2015-07-09 03:51:56 +1000
commitbfe20f0537c72191de2aa872d032b4233ef49ecf (patch)
tree4a0fe09070317813b33e5f66e969f876b5b13e50 /docs/ClientHamr
parentFix up yet another API break. (diff)
downloadSledjHamr-bfe20f0537c72191de2aa872d032b4233ef49ecf.zip
SledjHamr-bfe20f0537c72191de2aa872d032b4233ef49ecf.tar.gz
SledjHamr-bfe20f0537c72191de2aa872d032b4233ef49ecf.tar.bz2
SledjHamr-bfe20f0537c72191de2aa872d032b4233ef49ecf.tar.xz
Document crazy idea I had for implementing Skang's _123 via metatables.
Diffstat (limited to 'docs/ClientHamr')
-rw-r--r--docs/ClientHamr/README.GuiLua9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ClientHamr/README.GuiLua b/docs/ClientHamr/README.GuiLua
index 72f13f3..3d4bb1c 100644
--- a/docs/ClientHamr/README.GuiLua
+++ b/docs/ClientHamr/README.GuiLua
@@ -165,6 +165,15 @@ This could even allow relative placement as mentioned in the skang TODO -
165 165
166foo = widget.label(0, "otherWidget+0.1", 0.5, 0, 'Text goes here") 166foo = widget.label(0, "otherWidget+0.1", 0.5, 0, 'Text goes here")
167 167
168While failing to fall asleep, I had another idea, though not sure how
169feasible it is just yet. _123 could use a metatable thingy at the
170lowest level, and just translates that to a value, the value being a
171number. Or something hand wavey like that. lol
172
173In skang.lua _M is the modules table, and it's a local, it's also a
174proxy table. So _M's metatable's __index could check if it's a _123,
175then return the 123 as the value. As a bonus, we could do arithmatic
176via this metatable.
168 177
169"widget" would be a table with functions for dealing with widgets. It 178"widget" would be a table with functions for dealing with widgets. It
170would include metatable stuff for widget set introspection. So 179would include metatable stuff for widget set introspection. So