Example:
Code: Select all
parciEnergyGauge =
GaugeImage(
JustifyBottom,
ImportImageFromFile("mods/CortUI/media/cortui_parci_energy.png", true),
GetPercentEnergy(Me, OnEveryFrame)
);
From left to right, Energy Full, Energy low R4 way (correctly displayed truncated from top), Energy low R5 way (wrongly displayed truncated from bottom):
Also, some of you might use the following to do the same job since it does not suffer from the truncated from bottom issue:
Code: Select all
parciEnergyGauge =
GaugeImageRect(
JustifyBottom,
ImportImageFromFile("mods/CortUI/media/cortui_parci_energy.png", true),
Rect(0, 0, 19, 82), // which part of the image to use
true, // this set 3D mode
GetPercentEnergy(Me, OnEveryFrame)
);
Imago tried to locate the source of these issues in R5 but due to the complexity of the code and Imago's limited available time for this, a fix was not found and another pointed out the correct method to call the gauge, that doesn't suffer from any of the above issues.
ALL you need to do is wrap your calls into BlendImage calls.
For the 1st case you can do this:
Code: Select all
parciEnergyGauge =
BlendImage(
GaugeImage(
JustifyBottom,
ImportImageFromFile("mods/CortUI/media/cortui_parci_energy.png", true),
GetPercentEnergy(Me, OnEveryFrame)
),
BlendModeAdd
);
For the 2nd case you can do this (although this crushes R4, so you have to wait for R5):
Code: Select all
parciEnergyGauge =
BlendImage(
GaugeImageRect(
JustifyBottom,
ImportImageFromFile("mods/CortUI/media/cortui_parci_energy.png", true),
Rect(0, 0, 19, 82), // which part of the image to use
true, // this set 3D mode
GetPercentEnergy(Me, OnEveryFrame)
),
BlendModeAdd //hudBlendMode
);