Update GameSession.cpp
Make it actually build.
This commit is contained in:
@@ -139,14 +139,17 @@ void CaveGame::Client::GameSession::ConstructHUD() {
|
||||
|
||||
int icon_size = 16;
|
||||
|
||||
auto* tile_icon_canvas = new RenderTarget({icon_size, icon_size});
|
||||
JGL::J2D::Begin(tile_icon_canvas);
|
||||
auto* canvas_texture = new Texture(Vector2((float) icon_size, (float) icon_size));
|
||||
auto* tile_icon_canvas = new RenderTarget(canvas_texture, {0, 0, 0, 0});
|
||||
|
||||
JGL::J2D::Begin(tile_icon_canvas, true);
|
||||
for (int x = 0; x < icon_size; x++)
|
||||
for (int y = 0; y < icon_size; y++)
|
||||
world->RenderTile(item->NumericID(), x, y, x, y);
|
||||
JGL::J2D::End();
|
||||
|
||||
img->Content(tile_icon_canvas->GetJGLTexture());
|
||||
|
||||
delete tile_icon_canvas;
|
||||
img->Content(canvas_texture);
|
||||
|
||||
auto* amount_label = new JUI::TextRect(cell);
|
||||
amount_label->BGColor({0,0,0,0});
|
||||
|
Reference in New Issue
Block a user