Page 1 of 1
drawing.draw_text != fog_of_war [new API parameter]
Posted: Sun Jul 18, 2021 5:15 pm
by XaLpHa89
Drawing does not disappear in the fog of war. Is there an option that I have so far overlooked to turn off the drawing in the fog?
Code: Select all
/c rendering.draw_text( { text = game.player.selected.force.name, target = game.player.selected, target_offset = { 0, - 3.7 }, surface = game.player.surface, color = { r = 1, g = 1, b = 1 }, scale = 2, alignment = 'center' } )

- 20210718184232_1.jpg (82.34 KiB) Viewed 1768 times
Re: drawing.draw_text != fog_of_war
Posted: Mon Jul 19, 2021 10:37 am
by Qon
I think lines are always not drawn in FoW, so not sure why it's different (if it is). Lines can be drawn on top of entities and below, is it the same for text? Does that alter how text is affected for FoW maybe? Just throwing guesses out of things I would test.
Parameter draw_on_fog
Posted: Mon Jul 19, 2021 6:25 pm
by XaLpHa89
Qon wrote: Mon Jul 19, 2021 10:37 am
I think lines are always not drawn in FoW, so not sure why it's different (if it is). Lines can be drawn on top of entities and below, is it the same for text? Does that alter how text is affected for FoW maybe? Just throwing guesses out of things I would test.
Your thoughts were correct, with the parameter draw_on_ground I was able to draw under the FoW. Although it solves my problem, it just looks ugly. I would like to draw above the player and below the FoW. I think a new API parameter "draw_on_fog" is needed.
LuaRendering.draw_text
Re: drawing.draw_text != fog_of_war [new API parameter]
Posted: Tue Jul 20, 2021 4:48 am
by ssilk
moved from suggestions to modding interface requests