|
17 | 17 | */ |
18 | 18 | GameController::GameController(GameBoard& model, GameView& view) : model(model), view(view) { |
19 | 19 | using namespace std::placeholders; |
20 | | - |
| 20 | + |
21 | 21 | view.addElement(makeViewButton(std::bind(&GameController::handleBoardEvent, this, _1), {{0, 0}, {1, 1}})); |
22 | | - |
23 | | - view.addElement(makeViewButtonColor(std::bind(&GameController::nextTurn, this, _1), {{0, 0.2}, {0.1, 0.3}}, std::make_tuple(0.f, 0.f, 1.f))); |
24 | | - view.addElement(makeViewButtonColor(std::bind(&GameController::handleRoadButtonEvent, this, _1), {{0, 0}, {0.1, 0.1}}, std::make_tuple(1.f, 0.f, 0.f))); |
25 | | - view.addElement(makeViewButtonColor(std::bind(&GameController::handleSettlementButtonEvent, this, _1), {{0, 0.1}, {0.1, 0.2}}, std::make_tuple(0.f, 1.0f, 0.f))); |
26 | 22 |
|
27 | 23 | auto font = getGraphicsConfig()["font.path"]; |
28 | 24 | auto fontSize = getGraphicsConfig()["font.size"]; |
29 | 25 |
|
| 26 | + view.addElement(makeViewButtonText(std::bind(&GameController::nextTurn, this, _1), {{0, 0.2}, {0.1, 0.3}}, font, fontSize, "Turn")); |
| 27 | + view.addElement(makeViewButtonText(std::bind(&GameController::handleRoadButtonEvent, this, _1), {{0, 0}, {0.1, 0.1}}, font, fontSize, "Road")); |
| 28 | + view.addElement(makeViewButtonText(std::bind(&GameController::handleSettlementButtonEvent, this, _1), {{0, 0.1}, {0.1, 0.2}}, font, fontSize, "Stlm")); |
| 29 | + |
30 | 30 | auto playerTopY = 0.9; |
31 | 31 | for(auto i = 0; i < model.getNoOfPlayers(); i++) { |
32 | 32 | auto width = 0.15; |
|
0 commit comments