From 33aed8406709c987cb1fa3cec4a04735d46e8017 Mon Sep 17 00:00:00 2001 From: Oliver Cooper Date: Tue, 11 Nov 2014 19:40:05 +1030 Subject: [PATCH] Bedrock update (monitor support) --- System/API/Bedrock.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/System/API/Bedrock.lua b/System/API/Bedrock.lua index d71fd78..038c708 100755 --- a/System/API/Bedrock.lua +++ b/System/API/Bedrock.lua @@ -1,4 +1,4 @@ ---Bedrock Build: 269 +--Bedrock Build: 270 --This code is squished down in to one, rather hard to read file. --As such it is not much good for anything other than being loaded as an API. --If you want to look at the code to learn from it, copy parts or just take a look, @@ -709,7 +709,9 @@ OnDraw = function(self, x, y) elseif self.Align == 'Center' then _x = math.floor((self.Width - #self.Text) / 2) end - Drawing.DrawCharacters(x + _x, y, self.Text, txt, bg) + + + Drawing.DrawCharacters(x + _x, y-1+math.ceil(self.Height/2), self.Text, txt, bg) end OnLoad = function(self) @@ -2762,11 +2764,11 @@ OnDraw = nil OnQuit = nil local eventFuncs = { - OnClick = {'mouse_click'}, + OnClick = {'mouse_click', 'monitor_touch'}, OnKeyChar = {'key', 'char'}, OnDrag = {'mouse_drag'}, OnScroll = {'mouse_scroll'}, - HandleClick = {'mouse_click', 'mouse_drag', 'mouse_scroll'}, + HandleClick = {'mouse_click', 'mouse_drag', 'mouse_scroll', 'monitor_touch'}, HandleKeyChar = {'key', 'char'}, HandleTimer = {'timer'} }