|
|
@@ -10,7 +10,7 @@ CraftingRecipiesElement::CraftingRecipiesElement()
|
|
|
: Framework::UIMLElement()
|
|
|
{}
|
|
|
|
|
|
-//! prüft, ob dieses UIML Element für ein bestimmtes xml Element zuständig
|
|
|
+//! prüft, ob dieses UIML Element für ein bestimmtes xml Element zuständig
|
|
|
//! ist
|
|
|
bool CraftingRecipiesElement::isApplicableFor(Framework::XML::Element& element)
|
|
|
{
|
|
|
@@ -113,9 +113,8 @@ CraftingRecipies::CraftingRecipies()
|
|
|
|
|
|
nextPage = uiFactory.createButton(uiFactory.initParam);
|
|
|
nextPage->setText(">");
|
|
|
- nextPage->setToolTipText("Next Page",
|
|
|
- uiFactory.initParam.bildschirm,
|
|
|
- uiFactory.initParam.font);
|
|
|
+ nextPage->setToolTipText(
|
|
|
+ "Next Page", uiFactory.initParam.bildschirm, uiFactory.initParam.font);
|
|
|
nextPage->setSize(20, 20);
|
|
|
nextPage->setPosition(0, 35);
|
|
|
nextPage->setStyle(
|
|
|
@@ -206,7 +205,14 @@ void CraftingRecipies::render(Framework::Image& rObj)
|
|
|
for (RecipieGroup* group : recipieGroups)
|
|
|
{
|
|
|
rObj.fillRegion(x, 0, 30, 30, 0xFF000000);
|
|
|
- rObj.alphaImageScaled(x, 0, 30, 30, *group->zIcon());
|
|
|
+ if (group->zIcon())
|
|
|
+ {
|
|
|
+ rObj.alphaImageScaled(x, 0, 30, 30, *group->zIcon());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // TODO: any item icon
|
|
|
+ }
|
|
|
rObj.drawLineH(x - 1, 0, 32, 0xFFFFFFFF);
|
|
|
if (index != visibleGroupIndex)
|
|
|
{
|
|
|
@@ -214,8 +220,8 @@ void CraftingRecipies::render(Framework::Image& rObj)
|
|
|
}
|
|
|
rObj.drawLineV(x + 30, 0, 30, 0xFFFFFFFF);
|
|
|
}
|
|
|
- Framework::TextRenderer tr(dynamic_cast<Framework::Font*>(
|
|
|
- uiFactory.initParam.font->getThis()));
|
|
|
+ Framework::TextRenderer tr(
|
|
|
+ dynamic_cast<Framework::Font*>(uiFactory.initParam.font->getThis()));
|
|
|
tr.setFontSize(12);
|
|
|
Text t = Text("Machine page ") + Text(visibleGroupIndex + 1) + Text(" of ")
|
|
|
+ Text(recipieGroups.getEntryCount());
|