From 7e1b70211115a6f1be99d81d412530645c929942 Mon Sep 17 00:00:00 2001 From: WS64 Date: Thu, 21 Aug 2014 22:30:01 +0200 Subject: [PATCH] Allow to take an image from paretn instead of info-i.png --- frontend/ui/widget/infomessage.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/ui/widget/infomessage.lua b/frontend/ui/widget/infomessage.lua index 939e800c3..dc962e690 100644 --- a/frontend/ui/widget/infomessage.lua +++ b/frontend/ui/widget/infomessage.lua @@ -26,6 +26,10 @@ local InfoMessage = InputContainer:new{ } function InfoMessage:init() + if not self.image then + self.image_width = nil + self.image_height = nil + end if Device:hasKeys() then self.key_events = { AnyKeyPressed = { { Input.group.Any }, @@ -53,7 +57,9 @@ function InfoMessage:init() HorizontalGroup:new{ align = "center", ImageWidget:new{ - file = "resources/info-i.png" + file = self.image or "resources/info-i.png", + width = self.image_width, + height = self.image_height }, HorizontalSpan:new{ width = 10 }, TextBoxWidget:new{