History log of /src/stand/lua/drawer.lua (Results 201 – 225 of 237)
Revision Date Author Comments
# 972c7fcd 02-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Use string literal \xNN instead of string.char()


# 04af4229 26-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: More argument name expansion, part 2

screen also has some instances, but it also has other cleanup to go with it.
Because of this, I will be committing the screen changes separately.


# 322a2ddd 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Clean up naming conventions a little bit

We mostly use camel case for function names, but some local functions got
mixed in using internal underscores. Doubles down on camel case.


# d709f254 24-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Remove unused variable; we now use the effective line number


# 1afbc37a 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Track effective line number, use it for drawing

Takes into account hidden entries, so that we don't draw blank lines in
place of a hidden item.


# 9ed6f9ef 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Use "local function x()" instead of "local x = function()"

The latter is good, but the former is more elegant and clear about what 'x'
is. Adopt it, preferably only using the latter kind

lualoader: Use "local function x()" instead of "local x = function()"

The latter is good, but the former is more elegant and clear about what 'x'
is. Adopt it, preferably only using the latter kind of notation where needed
as values for tables.

show more ...


# 72e39d71 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

Add SPDX tags to lua files


# 66964bbc 22-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Attend to some 80-col issues, pointed out by luacheck

Graphics have a tendency to cause 80-col issues, so make an exception to our
standard indentation guidelines for these graphics. This

lualoader: Attend to some 80-col issues, pointed out by luacheck

Graphics have a tendency to cause 80-col issues, so make an exception to our
standard indentation guidelines for these graphics. This does not hamper
readability too badly.

Two 40-column strings of spaces is trivially replaced with
string.rep(" ", 80)

show more ...


# e2df27e3 22-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Address some 'luacheck' concerns

luacheck pointed out an assortment of issues, ranging from non-standard
globals being created as well as unused parameters, variables, and redundant
assig

lualoader: Address some 'luacheck' concerns

luacheck pointed out an assortment of issues, ranging from non-standard
globals being created as well as unused parameters, variables, and redundant
assignments.

Using '_' as a placeholder for values unused (whether it be parameters
unused or return values unused, assuming multiple return values) feels clean
and gets the point across, so I've adopted it. It also helps flag candidates
for cleanup later in some of the lambdas I've created, giving me an easy way
to re-evaluate later if we're still not using some of these features.

show more ...


# 1f6c6d86 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Replace 8-space indentation with a single tab


# 4f437f9e 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Allow carousel 'items' to be a table as well as a function

We don't have any in-tree users of this, but for a static set of carousel
options having to define a callback is excessive.


# a51f9f0c 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Simplify menu definitions a little further

Allow "name" entries to be simple strings, instead of just functions. We
know whether we support colors or not by the time any of this is setup,

lualoader: Simplify menu definitions a little further

Allow "name" entries to be simple strings, instead of just functions. We
know whether we support colors or not by the time any of this is setup, so
all menu names that are basically static with colors sprinkled in are good
candidates for simplification.

Also simplify "func" in many cases where it's just invoking another function
with no arguments. The downside to this simplification is that the functions
called can no longer be trivially replaced by a local module. The upside is
that it removes another layer of indirection that we likely don't need.

These can be re-evaluated later if a compelling argument is raised, on a
case-by-case basis, for replacement.

show more ...


# dd65496a 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop name requirement for menu separators


# 9f71d421 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if x or y or (z and w) then', but these situations are far and few between.

show more ...


# aedd6be5 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything over. It is not a very lua-nic convention, though, so drop it.

Excessive parenthesizing around conditionals is next on the chopping block.

show more ...


# 25c4c7a5 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Move carousel storage out into config

Carousel storage doesn't need to happen in the menu module, and indeed
storing it there introduces a circular reference between drawer and menu
that

lualoader: Move carousel storage out into config

Carousel storage doesn't need to happen in the menu module, and indeed
storing it there introduces a circular reference between drawer and menu
that only works because of global pollution in loader.lua.

Carousel choices generally map to config entries anyways, making it as good
of place as any to store these. Move {get,set}CarouselIndex functionality
out into config so that drawer and menu may both use it. If we had more
carousel functionality, it might make sense to create a carousel module, but
this is not the case.

show more ...


# b5746545 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definition

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definitions
5. Module exports
6. return

Re-organize the one-offs (config/drawer) and denote the start of module
exports with a comment.

show more ...


# e15abd1f 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Consistently declare local functions at module scope

Declare these adjacent to the local definitions at the top of the module,
and make sure they're actually declared local to pollute glo

stand/lua: Consistently declare local functions at module scope

Declare these adjacent to the local definitions at the top of the module,
and make sure they're actually declared local to pollute global namespace a
little bit less.

show more ...


# 699578a6 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Insert helpful comment for drawer.branddefs


# df74a61f 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Stick a copyright notice on drawer.lua


# 752b2d40 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Use 'graphic' instead of 'logo' for table depicting graphics

This is a more sensible name that offers less redundancy when referring to
it (vs. logodef.logo). Switch to it while the getti

stand/lua: Use 'graphic' instead of 'logo' for table depicting graphics

This is a more sensible name that offers less redundancy when referring to
it (vs. logodef.logo). Switch to it while the getting is good.

show more ...


# 29aa5794 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Refactor brands into drawer.branddefs


# bb26c57d 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Refactor logos into drawer.logodefs table

This refactor makes it straightforward to add new logos for drawing and
organizes logo definitions in a logical manner.

The graphic to be drawn

stand/lua: Refactor logos into drawer.logodefs table

This refactor makes it straightforward to add new logos for drawing and
organizes logo definitions in a logical manner.

The graphic to be drawn for each logo may again be modified outside of
drawer, but it must be done on a case-by-case basis as a modification to the
loader_logo.

show more ...


# 02122e53 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Reduce exposure of the drawer module

As part of an effort to slowly reduce our exports overall to a set of stable
properties/functions, go ahead and reduce what drawer exposes to others.

stand/lua: Reduce exposure of the drawer module

As part of an effort to slowly reduce our exports overall to a set of stable
properties/functions, go ahead and reduce what drawer exposes to others.

The graphics should generally not be modified on their own, but their
position could be modified if additional grahics also need to be drawn.
Export position/shift information, but leave the actual graphic local to
the module.

The next step will be to create a 'menudef' that gets exported instead, with
each entry in the menudef table describing the graphic to be drawn along
with specific positioning information.

show more ...


# da56fe38 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Move drawer.menu_name_handlers further up

As a good candidate for modification, move this table further up in the
module to improve visibility.


12345678910