Skip to content

Commit 888a2e5

Browse files
authored
fix two small bugs in AxMessage (#8)
1) version checking was broken; the version should be at least the MinVersion to proceed (though I think MinVersion should be in the code and Version should be in the JSON) 2) monochrome images should set the color blending flag to `true`
1 parent 853274a commit 888a2e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

AxMessage/data/tables/axmsg-sct.tbm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function AXMessage:Init()
2727
return
2828
end
2929

30-
if not self.Config.MinVersion or self.Config.MinVersion < self.Version then
30+
if not self.Config.MinVersion or self.Version < self.Config.MinVersion then
3131
ba.warning("AXMESSAGE: Config file found is for an obsolete version. If you are upgrading, please use a brand new axmessage.cfg as a template and move your settings over. More details found in axmsg-sct.tbm.\nAborting script initialization!\n")
3232
return
3333
end
@@ -357,7 +357,7 @@ function AXMessage:DrawMessageBox()
357357

358358
if self.Monochrome then
359359
if self.Image.file2:isValid() then
360-
gr.drawImage(self.Image.file2, self.Position.x, self.Position.y, self.Position.x + self.Image.w, self.Position.y + self.Image.h, 0, 0, 1, 1, 0.5 )
360+
gr.drawImage(self.Image.file2, self.Position.x, self.Position.y, self.Position.x + self.Image.w, self.Position.y + self.Image.h, 0, 0, 1, 1, 0.5, true)
361361
end
362362
gr.setColor(self.Color.HUD[1], self.Color.HUD[2], self.Color.HUD[3], self.Color.HUD[4])
363363
--gr.drawMonochromeImage(self.Image.file, self.Position.x, self.Position.y)

0 commit comments

Comments
 (0)