mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
refactor(程序): 更新事件监听和多行字符串格式
将imageview.lua中的event.pull改为os.pullEvent 在time.lua中使用多行字符串语法改善帮助文本格式
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
local http = require("http")
|
local http = require("http")
|
||||||
local paintutils = require("paintutils")
|
local paintutils = require("paintutils")
|
||||||
local term = require("term")
|
local term = require("term")
|
||||||
local event = require("event")
|
|
||||||
local shell = require("shell")
|
local shell = require("shell")
|
||||||
|
|
||||||
-- 帮助信息函数
|
-- 帮助信息函数
|
||||||
@@ -78,7 +78,7 @@ local function main(args)
|
|||||||
|
|
||||||
-- 监听ESC键
|
-- 监听ESC键
|
||||||
while true do
|
while true do
|
||||||
local _, key = event.pull("key")
|
local _, key = os.pullEvent("key")
|
||||||
if key == 27 then -- ESC键
|
if key == 27 then -- ESC键
|
||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorPos(1, 1)
|
term.setCursorPos(1, 1)
|
||||||
|
|||||||
@@ -7,14 +7,15 @@ local function printHelp()
|
|||||||
print("Options:")
|
print("Options:")
|
||||||
print(" --help, -h Show this help message")
|
print(" --help, -h Show this help message")
|
||||||
print(" --format, -f <fmt> Specify time format string (see below for details)")
|
print(" --format, -f <fmt> Specify time format string (see below for details)")
|
||||||
print("
|
print([[
|
||||||
Formats for --format option:")
|
Formats for --format option:
|
||||||
print(" %Y: Year (4 digits)")
|
%Y: Year (4 digits)
|
||||||
print(" %m: Month (01-12)")
|
%m: Month (01-12)
|
||||||
print(" %d: Day (01-31)")
|
%d: Day (01-31)
|
||||||
print(" %H: Hour (00-23)")
|
%H: Hour (00-23)
|
||||||
print(" %M: Minute (00-59)")
|
%M: Minute (00-59)
|
||||||
print(" %S: Second (00-59)")
|
%S: Second (00-59)
|
||||||
|
]])
|
||||||
print(" %A: Full weekday name")
|
print(" %A: Full weekday name")
|
||||||
print(" %B: Full month name")
|
print(" %B: Full month name")
|
||||||
print("
|
print("
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
-- LeonOS installer
|
-- LeonOS installer
|
||||||
local INSTALLER_VERSION = "0.3.7 Beta 7"
|
local INSTALLER_VERSION = "0.3.7 Beta 8"
|
||||||
local DEFAULT_ROM_DIR = "/leonos"
|
local DEFAULT_ROM_DIR = "/leonos"
|
||||||
|
|
||||||
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
|
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
|
||||||
|
|||||||
Reference in New Issue
Block a user