-
Notifications
You must be signed in to change notification settings - Fork 7
/
common.lua
39 lines (35 loc) · 989 Bytes
/
common.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- (C) Copyright 2018
-- Stefano Babic, DENX Software Engineering, [email protected].
--
-- SPDX-License-Identifier: GPL-2.0-or-later
--
-- Set default values, they can be overwritten
-- in the config.lua file
-------------------------------------------------------------------------------
-- Create Window common Header
-------------------------------------------------------------------------------
local ui = require "tek.ui"
RescueGUIHeader = ui.Group:newClass { _NAME = "_guiheader"}
function RescueGUIHeader.new(class, self)
self = self or { }
self.Class = "guiheader"
grp = ui.Group.new(class, self)
grp.Orientation = "vertical"
self.title = ui.Text:new
{
Text = self.Description or "",
}
grp:addMember(self.title)
if self.Image then
self.logo = ui.ImageWidget:new
{
Width = "fill",
Height = "fill",
Mode = "inert",
Image = self.Image,
HAlign = "center",
}
grp:addMember(self.logo)
end
return grp
end