Skip to content

Commit

Permalink
Renamed FactoryReport::txtProductDescription to mTxtProductDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar139 committed Jul 30, 2024
1 parent fe0dd7b commit a80c146
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions OPHD/UI/Reports/FactoryReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ FactoryReport::FactoryReport() :

add(lstProducts, {cboFilterByProduct.rect().position.x + cboFilterByProduct.rect().size.x + 20, mRect.position.y + 230});

txtProductDescription.height(128);
txtProductDescription.textColor(constants::PrimaryTextColor);
mTxtProductDescription.height(128);
mTxtProductDescription.textColor(constants::PrimaryTextColor);

fillLists();
}
Expand All @@ -140,7 +140,7 @@ void FactoryReport::clearSelected()
{
lstFactoryList.clearSelected();
selectedFactory = nullptr;
txtProductDescription.text("");
mTxtProductDescription.text("");
}


Expand Down Expand Up @@ -270,8 +270,8 @@ void FactoryReport::onResize()
lstProducts.size({detailPanelRect.size.x / 3, detailPanelRect.size.y - 219});
lstProducts.selectionChanged().connect({this, &FactoryReport::onProductSelectionChange});

txtProductDescription.position(lstProducts.rect().crossXPoint() + NAS2D::Vector{158, 0});
txtProductDescription.width(mRect.size.x - txtProductDescription.positionX() - 30);
mTxtProductDescription.position(lstProducts.rect().crossXPoint() + NAS2D::Vector{158, 0});
mTxtProductDescription.width(mRect.size.x - mTxtProductDescription.positionX() - 30);
}


Expand All @@ -289,7 +289,7 @@ void FactoryReport::onVisibilityChange(bool visible)

if (selectedProductType != ProductType::PRODUCT_NONE)
{
txtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
mTxtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
}
}

Expand Down Expand Up @@ -416,11 +416,11 @@ void FactoryReport::onListSelectionChange()

if (productTypeInRange(selectedProductType))
{
txtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
mTxtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
}
else
{
txtProductDescription.text("");
mTxtProductDescription.text("");
}

StructureState state = selectedFactory->state();
Expand All @@ -431,7 +431,7 @@ void FactoryReport::onListSelectionChange()
void FactoryReport::onProductSelectionChange()
{
selectedProductType = static_cast<ProductType>(lstProducts.isItemSelected() ? lstProducts.selected().tag : 0);
txtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
mTxtProductDescription.text(ProductCatalogue::get(selectedProductType).Description);
}


Expand Down Expand Up @@ -494,7 +494,7 @@ void FactoryReport::drawProductPane(Renderer& renderer)
{
renderer.drawText(fontBigBold, ProductCatalogue::get(selectedProductType).Name, NAS2D::Point{position_x, detailPanelRect.position.y + 180}, constants::PrimaryTextColor);
renderer.drawImage(productImage(selectedProductType), NAS2D::Point{position_x, lstProducts.positionY()});
txtProductDescription.update();
mTxtProductDescription.update();
}

if (selectedFactory->productType() == ProductType::PRODUCT_NONE) { return; }
Expand Down
2 changes: 1 addition & 1 deletion OPHD/UI/Reports/FactoryReport.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class FactoryReport : public ReportInterface

ListBox<> lstProducts;

TextArea txtProductDescription;
TextArea mTxtProductDescription;

Factory* selectedFactory = nullptr;
ProductType selectedProductType = ProductType::PRODUCT_NONE;
Expand Down

0 comments on commit a80c146

Please sign in to comment.