Map icons - #47
Conversation
| @@ -284,8 +284,9 @@ func reset_minimap_masks(): | |||
| compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height) | |||
|
|
|||
| for minimap_path in $Control/MiniMap.get_children(): | |||
There was a problem hiding this comment.
Rename. It's not just minimap_path now.
There was a problem hiding this comment.
In the non minimap I have the two types split into different parent nodes.
Lines 410 to 417 in 55fff1e
Maybe it makes sense to also do that for the minimap now that it will have icons.
| var texture = Utils.new().generate_texture(texture_path) | ||
| self.texture = texture | ||
| # TODO: Figure out a better heuristic. Why 0.2? | ||
| var scaling_factor = 0.1 |
There was a problem hiding this comment.
This was the complexity that prevented me from doing this in the previous version. Maybe look at what taco or blish hud does for this? I do not know what the right answer is.
| @@ -0,0 +1,16 @@ | |||
| class_name Utils | |||
|
|
|||
| func load_image_from_path(path: String): | |||
There was a problem hiding this comment.
Any chance I can convince you to use the same texture loaders for both the icon textures and the path textures? It would be a nice decrease in complexity. Also take a look at #19 to make sure that your solution is compatible with that eventual goal, otherwise the texture loading might need to be rewritten again at a later date.
There was a problem hiding this comment.
Good suggestion, have attempted to reuse the util function for both paths and icons. Also accept another parameter, RGB vs sRGB and added 2d and 3d textures for paths.
Render icons on megamap and minimap.