Add 'container w h' command

This commit is contained in:
2025-03-19 15:44:00 -04:00
parent 8072af2c49
commit 4553a0c8ac
2 changed files with 10 additions and 4 deletions

View File

@@ -218,7 +218,14 @@ namespace CaveGame::ClientApp {
{"tile-list", {}, [this](const CommandArgs& args) { return TileListCmd(args); }},
{"item-list", {}, [this](const CommandArgs& args) { return ItemListCmd(args); }},
{"container", {}, [this](const CommandArgs& args) {
Log(std::format("Size: {}", args.size()));
if (args.size() == 3)
{
int w = std::stoi(args[1]);
int h = std::stoi(args[2]);
GameSession()->HUD()->Add(new ContainerWindow(GameSession()->HUD(), w, h, "Test Container"));
}
}}
};

View File

@@ -109,15 +109,15 @@ namespace CaveGame::ClientApp
this->assets.TempLoadSimple();
this->assets.EnqueueDefaultAssetsFolder();
for (int i = 0; i < 10; i++)
{
//for (int i = 0; i < 10; i++)
//{
assets.EnqueueTexture("assets/textures/redacted.png");
assets.EnqueueTexture("assets/textures/bg.png");
assets.EnqueueTexture("assets/textures/player.png");
assets.EnqueueTexture("assets/textures/explosion.png");
assets.EnqueueTexture("assets/textures/title_1.png");
assets.EnqueueTexture("assets/textures/ash_wip_potions.png");
}
//}
ChangeScene(splash_ctx);
@@ -220,7 +220,6 @@ namespace CaveGame::ClientApp
// TODO: Nuke this once JUI can consume input.
if (InGame())
GameSession()->WorldEditToolControlsUpdate(elapsed);
}
void CaveGameWindow::Update(float elapsed)