Update
This commit is contained in:
@@ -281,6 +281,8 @@ function Element:_onPaint()
|
||||
if self._firstChild then
|
||||
self._firstChild:_postEventToAllReverse("PAINT")
|
||||
end
|
||||
|
||||
self:postChildPaint(x, y, w, h)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -362,7 +364,10 @@ end
|
||||
function Element:think()
|
||||
end
|
||||
|
||||
function Element:paint()
|
||||
function Element:paint(x, y, w, h)
|
||||
end
|
||||
|
||||
function Element:postChildPaint(x, y, w, h)
|
||||
end
|
||||
|
||||
function Element:onMousePressed(x, y, key, keyName)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--@include element.txt
|
||||
--@include element.txt
|
||||
--@include label.txt
|
||||
--@include button.txt
|
||||
--@include /koptilnya/libs/utils.txt
|
||||
@@ -31,7 +31,8 @@ function EPanel:initialize()
|
||||
}
|
||||
|
||||
self.minimizeButton = EButton:new()
|
||||
self.minimizeButton:setText("_")
|
||||
self.minimizeButton:setFont(GUI.fonts["icons"])
|
||||
self.minimizeButton:setText(string.utf8char(0xE73F))
|
||||
self.minimizeButton:setSize(32, 32)
|
||||
self.minimizeButton:setRadius(0)
|
||||
self.minimizeButton:setColorScheme(colorScheme)
|
||||
@@ -42,7 +43,7 @@ function EPanel:initialize()
|
||||
|
||||
self.closeButton = EButton:new()
|
||||
self.closeButton:setFont(GUI.fonts["icons"])
|
||||
self.closeButton:setText(string.utf8char(10005))
|
||||
self.closeButton:setText(string.utf8char(0xE006))
|
||||
self.closeButton:setSize(32, 32)
|
||||
self.closeButton:setRadius(0)
|
||||
self.closeButton:setColorScheme(colorScheme)
|
||||
|
||||
@@ -8,7 +8,7 @@ GUI = class("GUI")
|
||||
|
||||
GUI.static.fonts = {
|
||||
main = render.createFont("Roboto", 16, 700, true),
|
||||
icons = render.createFont("Roboto Mono", 24, 400, true)
|
||||
icons = render.createFont("Segoe MDL2 Assets", 32, 400, true)
|
||||
}
|
||||
|
||||
function GUI:initialize(renderDevice)
|
||||
|
||||
@@ -5,7 +5,7 @@ require("render_device.txt")
|
||||
RenderDeviceHUD = class("RenderDeviceHUD", RenderDevice)
|
||||
|
||||
function RenderDeviceHUD:initialize()
|
||||
render.setHUDActive(true)
|
||||
enableHud(player(), true)
|
||||
self:setSize(render.getResolution())
|
||||
|
||||
hook.add("hudshoulddraw", "gui_hudshoulddraw", function(name)
|
||||
|
||||
Reference in New Issue
Block a user