Skip to content

Commit

Permalink
myk002 newline+msg changes pregnancy.lua
Browse files Browse the repository at this point in the history
added Newline and self.msg changes to pregnancy.lua
  • Loading branch information
Pebob authored Nov 2, 2023
1 parent fb43a1e commit 04d2b66
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gui/pregnancy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function PregnancyGui:init()
},
widgets.WrappedLabel{
frame={t=8},--, h=5},
text_to_wrap=self.msg
text_to_wrap=function() return self.msg end
},
},
},
Expand Down Expand Up @@ -291,8 +291,7 @@ function PregnancyGui:CreatePregnancy()
local bypass = true
local force = self.subviews.Force:getOptionValue()

local count = #self.msg
for i=0, count do self.msg[i]=nil end --empty self.msg
self.msg = {}

if self.subviews.min_term:getOptionLabel() > self.subviews.max_term:getOptionLabel() then
table.insert(self.msg,('Min term has to be less then max term'))
Expand Down Expand Up @@ -377,4 +376,4 @@ function PregnancyScreen:onDismiss()
view = nil
end

view = view and view:raise() or PregnancyScreen{}:show()
view = view and view:raise() or PregnancyScreen{}:show()

0 comments on commit 04d2b66

Please sign in to comment.