split the selection panel into one card per kind of selection
This commit is contained in:
29
src/ui/selection/StorageContent.cpp
Normal file
29
src/ui/selection/StorageContent.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "StorageContent.h"
|
||||
|
||||
#include "Building.h"
|
||||
#include "BuildingTarget.h"
|
||||
#include "SelectionNames.h"
|
||||
|
||||
StorageContent::StorageContent(const SelectionContext& context,
|
||||
const SelectionRequest& request, QWidget* parent)
|
||||
: BufferedBuildingContent(context, request.buildings.front(), parent)
|
||||
{
|
||||
}
|
||||
|
||||
void StorageContent::refreshConfiguration()
|
||||
{
|
||||
const BuildingTarget target = resolveBuildingTarget(getContext(), getBuildingId());
|
||||
if (!target.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
setBuildingIdentity(target.type, getBuildingTypeName(target.type));
|
||||
}
|
||||
|
||||
BufferedBuildingContent::CycleInfo StorageContent::getCycleInfo(
|
||||
const Building& /*building*/) const
|
||||
{
|
||||
// No recipe, no cycle: the card shows the output buffer alone, with no per-cycle
|
||||
// denominators to show it against (REQ-BLD-SALVAGE-BAY).
|
||||
return CycleInfo();
|
||||
}
|
||||
Reference in New Issue
Block a user