1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-18 08:15:12 +00:00

Ui enhancements 2.0 (#31)

* canvas overhaul

* minor tweaks

* list mode for overview

* bugfixes + tweaks for editor 2.0

* minor tweaks

* more editor work

* refactor + new transitions

* use layout() where appropriate and cleanup

* mouse triple click + textEntry scroll ind

* cleanup

* cleanup + theme editor

* color rework + cleanup

* changes for deprecated ui methods

* can now use named colors
This commit is contained in:
kepler155c
2020-04-21 22:40:59 -06:00
committed by GitHub
parent cdd0b6c4d2
commit 7224d441ca
92 changed files with 2471 additions and 1773 deletions

View File

@@ -1,7 +1,6 @@
local UI = require('opus.ui')
local Util = require('opus.util')
local colors = _G.colors
local help = _G.help
UI:configure('Help', ...)
@@ -12,11 +11,11 @@ for _,topic in pairs(help.topics()) do
end
UI:addPage('main', UI.Page {
labelText = UI.Text {
UI.Text {
x = 3, y = 2,
value = 'Search',
},
filter = UI.TextEntry {
UI.TextEntry {
x = 10, y = 2, ex = -3,
limit = 32,
},
@@ -38,9 +37,7 @@ UI:addPage('main', UI.Page {
elseif event.type == 'grid_select' then
if self.grid:getSelected() then
local name = self.grid:getSelected().name
UI:setPage('topic', name)
UI:setPage('topic', self.grid:getSelected().name)
end
elseif event.type == 'text_change' then
@@ -57,6 +54,7 @@ UI:addPage('main', UI.Page {
self.grid:update()
self.grid:setIndex(1)
self.grid:draw()
else
return UI.Page.eventHandler(self, event)
end
@@ -64,13 +62,12 @@ UI:addPage('main', UI.Page {
})
UI:addPage('topic', UI.Page {
backgroundColor = colors.black,
backgroundColor = 'black',
titleBar = UI.TitleBar {
title = 'text',
event = 'back',
},
helpText = UI.TextArea {
backgroundColor = colors.black,
x = 2, ex = -1, y = 3, ey = -2,
},
accelerators = {