menu.lua (2a11b810906a920784501ec3fbf0c5da41b941dd) menu.lua (04af422907599825aa89cce0399932835d414103)
1--
2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3--
4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
5-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
6-- All rights reserved.
7--
8-- Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

35local config = require("config")
36local screen = require("screen")
37local drawer = require("drawer")
38
39local menu = {}
40
41local drawn_menu
42
1--
2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3--
4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
5-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
6-- All rights reserved.
7--
8-- Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

35local config = require("config")
36local screen = require("screen")
37local drawer = require("drawer")
38
39local menu = {}
40
41local drawn_menu
42
43local function OnOff(str, b)
44 if b then
43local function OnOff(str, value)
44 if value then
45 return str .. color.escapef(color.GREEN) .. "On" ..
46 color.escapef(color.WHITE)
47 else
48 return str .. color.escapef(color.RED) .. "off" ..
49 color.escapef(color.WHITE)
50 end
51end
52

--- 426 unchanged lines hidden ---
45 return str .. color.escapef(color.GREEN) .. "On" ..
46 color.escapef(color.WHITE)
47 else
48 return str .. color.escapef(color.RED) .. "off" ..
49 color.escapef(color.WHITE)
50 end
51end
52

--- 426 unchanged lines hidden ---