void State_selectPart::redraw() { Player player = refToFleet.captain; int line = 1; console->clear(); console->setDefaultForeground(TCODColor::white); console->print(1, line++, ""); // First list all the relevant parts. if (parttype == 'c') // CANNONS { for (auto it = player.cannonInventory.begin(); it < player.cannonInventory.end(); it++) { console->print(1, line++, (it->shopName()).c_str()); // List the names } } else if (parttype == 'a') // ARMOR { for (auto it = player.armorInventory.begin(); it < player.armorInventory.end(); it++) { console->print(1, line++, (it->shopName()).c_str()); // List the names } } else if (parttype == 's') // SAILS { for (auto it = player.sailInventory.begin(); it < player.sailInventory.end(); it++) { console->print(1, line++, (it->shopName()).c_str()); // List the names } } invertLine(console, selector + 2); console->setDefaultForeground(MabinogiBrown); console->printFrame(0, 0, console->getWidth(), console->getHeight(), false); }
ArestShopPlugin::ArestShopPlugin() { createLoggers(shopName()); }