From 96fa7fa1e2951bb7c96b7de3bca6715aaf5a50ad Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Thu, 16 Feb 2023 18:23:14 -0800 Subject: [PATCH] fix position of errors panel --- plugins/lua/buildingplan.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/lua/buildingplan.lua b/plugins/lua/buildingplan.lua index 6bf35bc2a..82172613d 100644 --- a/plugins/lua/buildingplan.lua +++ b/plugins/lua/buildingplan.lua @@ -261,7 +261,7 @@ PlannerOverlay.ATTRS{ default_pos={x=5,y=9}, default_enabled=true, viewscreens='dwarfmode/Building/Placement', - frame={w=56, h=18}, + frame={w=56, h=20}, } function PlannerOverlay:init() @@ -347,17 +347,20 @@ function PlannerOverlay:init() local error_panel = widgets.ResizingPanel{ view_id='errors', - frame={t=14, l=0, r=0, h=3}, + frame={t=14, l=0, r=0}, frame_style=gui.MEDIUM_FRAME, frame_background=gui.CLEAR_PEN, } error_panel:addviews{ widgets.WrappedLabel{ + frame={t=0, l=0, r=0}, text_pen=COLOR_LIGHTRED, text_to_wrap=get_placement_errors, + visible=function() return #uibs.errors > 0 end, }, widgets.Label{ + frame={t=0, l=0, r=0}, text_pen=COLOR_GREEN, text='OK to build', visible=function() return #uibs.errors == 0 end,