Skip to content

Commit 8844ea3

Browse files
committed
Changed some color buttons into text buttons
1 parent 80001db commit 8844ea3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/GameController.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
*/
1818
GameController::GameController(GameBoard& model, GameView& view) : model(model), view(view) {
1919
using namespace std::placeholders;
20-
20+
2121
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)));
2622

2723
auto font = getGraphicsConfig()["font.path"];
2824
auto fontSize = getGraphicsConfig()["font.size"];
2925

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+
3030
auto playerTopY = 0.9;
3131
for(auto i = 0; i < model.getNoOfPlayers(); i++) {
3232
auto width = 0.15;

0 commit comments

Comments
 (0)