diff --git a/scripts/compile_ubuntu.sh b/scripts/compile_ubuntu.sh old mode 100644 new mode 100755 index 162a3e9d83bcb70ab5c70b7755d50f36967a7b32..9608645c05163d64b62041e0be062ce0f5fc2748 --- a/scripts/compile_ubuntu.sh +++ b/scripts/compile_ubuntu.sh @@ -1,5 +1,11 @@ #!/bin/bash +# INSTRUCTIONS +# run this file from the wizard directory +# make executable (if necessary) with chmod +x scripts/compile_ubuntu.sh +# run with ./scripts/compile_ubuntu.sh + + # path to the assets folder containing the .ttf files ASSETS_DIR="./assets" FONT_NAME1="JunicodeBold.ttf" diff --git a/scripts/prepare_ubuntu.sh b/scripts/prepare_ubuntu.sh old mode 100644 new mode 100755 diff --git a/src/client/messageBoxes/ScoreBoardDialog.cpp b/src/client/messageBoxes/ScoreBoardDialog.cpp index b9c529755a0879b8c583d3d8e0a8dce9b35c5d87..9d660e0da2370a87a4e79e893ba327de42b6d3ad 100644 --- a/src/client/messageBoxes/ScoreBoardDialog.cpp +++ b/src/client/messageBoxes/ScoreBoardDialog.cpp @@ -2,7 +2,6 @@ #include <wx/grid.h> #include <algorithm> - ScoreBoardDialog::ScoreBoardDialog(wxWindow* parent, const std::string& title, const std::string& message, game_state* gameState) : wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxSize(400, 250), wxDEFAULT_DIALOG_STYLE | wxSTAY_ON_TOP){ wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); @@ -18,10 +17,38 @@ ScoreBoardDialog::ScoreBoardDialog(wxWindow* parent, const std::string& title, c playerNames.at(i) = players.at(i)->get_player_name(); } + + std::vector<int> currentScores(numberOfPlayers); + for (int i = 0; i < numberOfPlayers; i++) + { + currentScores[i] = players.at(i)->get_scores().back()->get_value(); + } + + // determine current winners + // Find the maximum value + int maxValue = *std::max_element(currentScores.begin(), currentScores.end()); + int minValue = *std::min_element(currentScores.begin(), currentScores.end()); + + // Find all indices with the maximum value + std::vector<int> maxIndices; + for (int i = 0; i < currentScores.size(); ++i) { + if (currentScores[i] == maxValue) { + maxIndices.push_back(i); + } + } + // Find all indices with the maximum value + std::vector<int> minIndices; + for (int i = 0; i < currentScores.size(); ++i) + { + if (currentScores[i] == minValue) { + minIndices.push_back(i); + } + } + int numRows = players.at(0)->get_scores().size()-1; int numCols = tableData.size(); // Assumes all vectors are the same length - // avoid showing scores that are initialized with 0 but not actual acores yet + // avoid showing scores that are initialized with 0 but not actual scores yet if (numRows >= 1) { for (int i = 0; i < numberOfPlayers; i++) { auto scores = players.at(i)->get_scores(); @@ -42,6 +69,8 @@ ScoreBoardDialog::ScoreBoardDialog(wxWindow* parent, const std::string& title, c grid->CreateGrid(numRows, numCols); + grid->SetDefaultCellAlignment(wxALIGN_CENTER, wxALIGN_CENTER); + for (int col = 0; col < numCols; ++col) { grid->SetColLabelValue(col, playerNames[col]); } @@ -50,8 +79,30 @@ ScoreBoardDialog::ScoreBoardDialog(wxWindow* parent, const std::string& title, c for (int row = 0; row < numRows; ++row) { for (int col = 0; col < numCols; ++col) { grid->SetCellValue(row, col, wxString::Format("%d", tableData[col][row]->get_value())); + if (maxIndices.size() != numberOfPlayers) // do not mark anything if all players have the same score + { + for (auto i: maxIndices) // mark all leaders + { + if (col == i && row == numRows-1) + { + grid->SetCellBackgroundColour(row, col, wxColour(0, 100, 0)); + grid->SetCellTextColour(row,col,*wxWHITE); + } + } + for (auto i: minIndices) // mark all losers + { + if (col == i && row == numRows-1) + { + grid->SetCellBackgroundColour(row, col, wxColour(102,0,51)); + grid->SetCellTextColour(row,col,*wxWHITE); + } + } + } } } + // Automatically size columns and rows to fit content + grid->AutoSizeColumns(); + grid->AutoSizeRows(); sizer->Add(grid, 1, wxEXPAND | wxALL, 10); diff --git a/src/client/messageBoxes/ScoreDialog.cpp b/src/client/messageBoxes/ScoreDialog.cpp index c962f8e36b7d5772c6198bfb6377fc0011476c2d..c7b706c2c801df54b3e0d4496889159f6c788232 100644 --- a/src/client/messageBoxes/ScoreDialog.cpp +++ b/src/client/messageBoxes/ScoreDialog.cpp @@ -20,7 +20,7 @@ ScoreDialog::ScoreDialog(wxWindow* parent, const std::string& title, const std:: // Initialize the timer to close the dialog after 5 seconds _closeTimer.SetOwner(this, wxID_ANY); - _closeTimer.Start(5000, wxTIMER_ONE_SHOT); // 5 seconds + _closeTimer.Start(2000, wxTIMER_ONE_SHOT); // 5 seconds } void ScoreDialog::OnTimerClose(wxTimerEvent& event) { diff --git a/src/client/panels/ConnectionPanel.cpp b/src/client/panels/ConnectionPanel.cpp index 16ebca94937214f630c33e0c755537751d0d8575..2b7f8b893937aa3e3b5bec5dff885f7a5bc6db75 100644 --- a/src/client/panels/ConnectionPanel.cpp +++ b/src/client/panels/ConnectionPanel.cpp @@ -33,7 +33,7 @@ ConnectionPanel::ConnectionPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) { //label width is the width of the label text this->_serverAddressField->SetFont(regularFont); //set font this->_serverAddressField->SetLabelTextColour(wxColour(255, 255, 255)); // Set label text color to white - this->_serverAddressField->SetMinSize(wxSize(-1, 27)); + this->_serverAddressField->SetMinSize(wxSize(-1, 30)); verticalLayout->Add(this->_serverAddressField, 0, wxALL | wxEXPAND, fieldSpacing); @@ -42,14 +42,14 @@ ConnectionPanel::ConnectionPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) { this->_serverPortField = new InputField(this, "Server port:", 100, wxString::Format("%i", default_port), 240); this->_serverPortField->SetFont(regularFont); this->_serverPortField->SetLabelTextColour(wxColour(255, 255, 255)); // Set label text color to white - this->_serverPortField->SetMinSize(wxSize(-1, 27)); + this->_serverPortField->SetMinSize(wxSize(-1, 30)); verticalLayout->Add(this->_serverPortField, 0, wxALL | wxEXPAND, fieldSpacing); // Player Name Input Field this->_playerNameField = new InputField(this, "Player name:", 100, "", 240); this->_playerNameField->SetFont(regularFont); this->_playerNameField->SetLabelTextColour(wxColour(255, 255, 255)); // Set label text color to white - this->_playerNameField->SetMinSize(wxSize(-1, 27)); + this->_playerNameField->SetMinSize(wxSize(-1, 30)); verticalLayout->Add(this->_playerNameField, 0, wxALL | wxEXPAND, fieldSpacing); diff --git a/src/client/panels/MainGamePanelWizard.cpp b/src/client/panels/MainGamePanelWizard.cpp index 8aa0f928c0efa9000425ebc7f6f8dfc16a6c35af..dd8d54754dd558793ce683ec3cfa4a64167d06dd 100644 --- a/src/client/panels/MainGamePanelWizard.cpp +++ b/src/client/panels/MainGamePanelWizard.cpp @@ -16,12 +16,11 @@ wxFont regularFont = wxFont(wxFontInfo(12).FaceName("Junicode")); //requires yy: //font for player names wxFont regularFontBig = wxFont(wxFontInfo(16).FaceName("Junicode")); //requires yy:35, xx:150 -//font for round announcement -wxFont magicalFontGigantic = wxFont(wxFontInfo(70).FaceName("Magic School One")); +bool isInitialized = false; -MainGamePanelWizard::MainGamePanelWizard(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(960, 680)) { - this->SetMinSize(wxSize(1000, 680)); +MainGamePanelWizard::MainGamePanelWizard(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(1200, 850)) { + this->SetMinSize(wxSize(1200, 850)); } @@ -63,7 +62,7 @@ void MainGamePanelWizard::buildGameState(game_state* gameState, player* me) - this->SetMinSize(wxSize(960, 680)); + this->SetMinSize(wxSize(1200, 850)); //create Grid to partition game panel auto sizer = new wxGridBagSizer(4,5); @@ -165,10 +164,61 @@ void MainGamePanelWizard::buildGameState(game_state* gameState, player* me) // show button to display score board this->buildScoreLeaveButtons(sizer, gameState); + // show round number and trick estimate sum + this->buildRoundDisplay(sizer, gameState); + // update Layout this->Layout(); } +// shows current round number and total estimated tricks in the current round +void MainGamePanelWizard::buildRoundDisplay(wxGridBagSizer* sizer, game_state* gameState) +{ + wxGBSizerItem* roundItem; + + /* + //in top left corner for 3 players + if (gameState->get_players().size() == 3) + { + roundItem = sizer->FindItemAtPosition(wxGBPosition(0,0)); + } + //in bottom left corner if 4-6 players + else + { + */ + roundItem = sizer->FindItemAtPosition(wxGBPosition(0,0)); + // } + wxPanel* roundPanel = dynamic_cast<wxPanel*>(roundItem->GetWindow()); + wxBoxSizer* roundSizer_vert = new wxBoxSizer(wxVERTICAL); + roundPanel->SetSizer(roundSizer_vert); + + /* + if (!roundPanel->GetSizer()) { + auto* roundSizer_vert = new wxBoxSizer(wxVERTICAL); + roundPanel->SetSizer(roundSizer_vert); + roundPanel->SetMinSize(wxSize(200, 60)); // Lock minimum size + } + */ + if(gameState->is_started()) + { + // roundPanel->GetSizer()->Clear(true); //clear existing content to avoid stacking + wxStaticText* roundText = new wxStaticText(roundPanel, wxID_ANY, "Round " + std::to_string(gameState->get_round_number() + 1),wxDefaultPosition, wxSize(roundPanel->GetMinSize().GetWidth(), 35), wxALIGN_CENTER); + wxStaticText* estimateText = new wxStaticText(roundPanel, wxID_ANY, "Predicted trick sum " + std::to_string(gameState->get_trick_estimate_sum()) + " / " + std::to_string(gameState->get_round_number() + 1) ,wxDefaultPosition, wxSize(roundPanel->GetMinSize().GetWidth(), 35), wxALIGN_CENTER); + roundText->SetForegroundColour(*wxWHITE); + roundText->SetFont(magicalFont); + roundPanel->GetSizer()->Add(roundText, 0, wxALIGN_CENTER | wxALL, 5); + + estimateText->SetForegroundColour(*wxWHITE); + estimateText->SetFont(regularFont); + roundPanel->GetSizer()->Add(estimateText, 0, wxALIGN_CENTER | wxALL, 5); + } + //roundPanel->Layout(); + //roundPanel->Refresh(); + +} + + + void MainGamePanelWizard::buildScoreLeaveButtons(wxGridBagSizer *sizer, game_state* gameState) { wxGBSizerItem* item = sizer->FindItemAtPosition(wxGBPosition(3,3)); wxPanel* panel = dynamic_cast<wxPanel*>(item->GetWindow()); @@ -260,7 +310,8 @@ void MainGamePanelWizard::buildOtherPlayers(wxGridBagSizer* sizer, game_state* g wxPanel* panel = dynamic_cast<wxPanel*>(item->GetWindow()); wxBoxSizer* playerSizer_vert = new wxBoxSizer(wxVERTICAL); panel->SetSizer(playerSizer_vert); - + // TODO: look at this + panel->SetMinSize(wxSize(150,25)); panel->SetBackgroundColour(wxColour(120,0,51)); // get other player @@ -335,7 +386,7 @@ void MainGamePanelWizard::buildTrickPile(wxGridBagSizer* sizer, game_state* game if(gameState->is_started()) { - trickPanel->SetBackgroundColour(wxColour(100,100,100)); + trickPanel->SetBackgroundColour(wxColour(102,0,51)); const std::vector<std::pair<card*, player*>> trickCards = gameState->get_trick()->get_cards_and_players(); for (const auto& it : trickCards) { @@ -352,39 +403,7 @@ void MainGamePanelWizard::buildTrickPile(wxGridBagSizer* sizer, game_state* game trickPanelSizer_hor->Add(wizardLogo, 0, wxALIGN_CENTER ); } } -/* -// TODO: round announcement shown at the beginning of every new round -void MainGamePanelWizard::showRoundOverlay(int roundNumber) { //obtain round number with std::to_string(gameState->get_round_number()+1) - // Create a panel to act as the overlay - wxPanel* overlayPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, this->GetSize()); //create panel the size of the main game panel - overlayPanel->SetBackgroundColour(wxColour(0, 0, 0, 70)); // make current game panel opaque - - // Create the text - wxString roundText = wxString::Format("ROUND %d", roundNumber); - wxStaticText* roundLabel = new wxStaticText(overlayPanel, wxID_ANY, roundText, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER); - roundLabel->SetFont(magicalFontGigantic); - roundLabel->SetForegroundColour(*wxWHITE); - - // center text - wxBoxSizer* overlaySizer = new wxBoxSizer(wxVERTICAL); - overlaySizer->AddStretchSpacer(1); - overlaySizer->Add(roundLabel, 0, wxALIGN_CENTER_HORIZONTAL); - overlaySizer->AddStretchSpacer(1); - - overlayPanel->SetSizer(overlaySizer); - - // Show the overlay - overlayPanel->Raise(); - overlayPanel->Show(); - - // Set a timer to remove the overlay after 1 second - wxTimer* timer = new wxTimer(this, wxID_ANY); - timer->Bind(wxEVT_TIMER, [this, overlayPanel](wxTimerEvent& event) { - overlayPanel->Destroy(); // Remove the overlay panel - }); - timer->Start(1000, wxTIMER_ONE_SHOT); // 1-second delay -} -*/ + void MainGamePanelWizard::buildTurnIndicator(wxGridBagSizer* sizer, game_state* gameState, player* me) { @@ -427,7 +446,8 @@ void MainGamePanelWizard::buildThisPlayer(wxGridBagSizer* sizer, game_state* gam wxGBSizerItem* meItem = sizer->FindItemAtPosition(wxGBPosition(3,2)); wxPanel* mePanel = dynamic_cast<wxPanel*>(meItem->GetWindow()); mePanel->SetBackgroundColour(wxColour(120,0,51)); - + //TODO: anschauen + mePanel->SetMinSize(wxSize(290,25)); // create sizer to align elements at bottom center wxBoxSizer* meSizer_hor = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* meSizer = new wxBoxSizer(wxVERTICAL); @@ -444,8 +464,7 @@ void MainGamePanelWizard::buildThisPlayer(wxGridBagSizer* sizer, game_state* gam if(!gameState->is_started()) { // add status text (waiting) - wxStaticText* playerScore = new wxStaticText(mePanel, wxID_ANY, "Waiting for the game to start",wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER); - //playerScore->SetFont(regularFont); + wxStaticText* playerScore = new wxStaticText(mePanel, wxID_ANY, "Waiting for the game to start",wxDefaultPosition, wxSize(290, 20), wxALIGN_CENTER); playerScore->SetForegroundColour(*wxWHITE); playerScore->SetFont(regularFont); meSizer->Add(playerScore, 0, wxALIGN_CENTER|wxALL,5); @@ -512,6 +531,22 @@ void MainGamePanelWizard::buildThisPlayer(wxGridBagSizer* sizer, game_state* gam ImagePanel *cardButton = new ImagePanel(cardPanel, cardFile, wxBITMAP_TYPE_ANY, wxDefaultPosition, scaledCardSize); + // Bind hover events for size change -> just these two + cardButton->Bind(wxEVT_ENTER_WINDOW, [cardButton, scaledCardSize](wxMouseEvent& event) { + cardButton->SetMinSize(wxSize(scaledCardSize.GetWidth() * 1.2, scaledCardSize.GetHeight() * 1.2)); + cardButton->Refresh(); + cardButton->Update(); + cardButton->GetParent()->Layout(); + }); + + cardButton->Bind(wxEVT_LEAVE_WINDOW, [cardButton, scaledCardSize](wxMouseEvent& event) { + cardButton->SetMinSize(scaledCardSize); + cardButton->Refresh(); + cardButton->Update(); + cardButton->GetParent()->Layout(); + }); + + if (gameState->get_current_player() == me && gameState->is_estimation_phase() == false) { cardButton->SetToolTip("Play card"); cardButton->SetCursor(wxCursor(wxCURSOR_HAND)); @@ -519,7 +554,7 @@ void MainGamePanelWizard::buildThisPlayer(wxGridBagSizer* sizer, game_state* gam GameController::playCard(handCard); }); } - cardPanelSizer_hor->Add(cardButton, 0, wxALIGN_TOP | wxALL, 4); + cardPanelSizer_hor->Add(cardButton, 0, wxALIGN_TOP | wxRIGHT | wxLEFT, 4); } } diff --git a/src/client/panels/MainGamePanelWizard.h b/src/client/panels/MainGamePanelWizard.h index e8ba76ba62c1a21fef34b322e9cbb65e7fb72d77..d5640cc814e9a246668506bdf3f9f46c0c2b31b9 100644 --- a/src/client/panels/MainGamePanelWizard.h +++ b/src/client/panels/MainGamePanelWizard.h @@ -54,11 +54,6 @@ private: * @param myPosition Position of player of the user (me). */ void buildOtherPlayers(wxGridBagSizer* sizer, game_state* gameState, player *me, int myPosition); - /** - * @brief Displays area of game which shows round number. - * @param roundNumber Number of current round. - */ - void showRoundOverlay(int roundNumber); /** * @brief Builds area of the deck which shows the trick pile. * @param sizer Positioning @@ -72,6 +67,7 @@ private: * @param gameState Current game state. */ void buildTrumpCard(wxGridBagSizer* sizer, game_state* gameState); + void buildRoundDisplay(wxGridBagSizer* sizer, game_state* gameState); /** * @brief Builds score board button and leave game button. @@ -85,7 +81,7 @@ private: // also set in the constructor implementation wxSize const panelSize = wxSize(960, 680); ///< Size of the panel. - wxSize const cardSize = wxSize(70, 108); ///< Size of the shown cards. + wxSize const cardSize = wxSize(85, 131); ///< Size of the shown cards. }; #endif //MAINGAMEPANELWIZARD_H diff --git a/src/client/panels/TrickEstimationPanel.cpp b/src/client/panels/TrickEstimationPanel.cpp index fdb337156731a3da50c5034883d7f5720b3bebe8..6ec122cedc0fb04021ec7e43ad941faae84e2895 100644 --- a/src/client/panels/TrickEstimationPanel.cpp +++ b/src/client/panels/TrickEstimationPanel.cpp @@ -8,7 +8,7 @@ wxFont regularFontTrick = wxFont(wxFontInfo(12).FaceName("Junicode")); wxFont regularFontTrickBig = wxFont(wxFontInfo(18).FaceName("Junicode")); TrickEstimationPanel::TrickEstimationPanel(wxWindow* parent): wxPanel(parent, wxID_ANY, wxDefaultPosition, - wxSize(960, 680)){} + wxSize(1200, 850)){} TrickEstimationPanel::~TrickEstimationPanel() { delete _trickEstimateField; @@ -25,7 +25,7 @@ void TrickEstimationPanel::buildGameState(game_state* gameState, player* me) wxPanel *panel = new wxPanel(this, wxID_ANY); this->SetBackgroundColour(wxColour(102,0,51)); - this->SetMinSize(wxSize(1000, 680)); // a bit wider to make scoreboard button fit fully + this->SetMinSize(wxSize(1200, 850)); // a bit wider to make scoreboard button fit fully //create 3x3 Grid auto sizer = new wxGridBagSizer(4,3); @@ -154,7 +154,7 @@ void TrickEstimationPanel::buildTrumpColor(wxGridBagSizer *sizer, game_state *ga wxStaticText* trumpText = new wxStaticText(trumpPanel, wxID_ANY, "TRUMP CARD",wxDefaultPosition, wxSize(120, 20), wxALIGN_CENTER); trumpText->SetForegroundColour(*wxWHITE); - trumpText->SetFont(regularFontTrickBig); + trumpText->SetFont(regularFontTrick); int trumpColor = gameState->get_trump_color(); int trumpCardValue = gameState->get_trump_card_value(); @@ -218,7 +218,7 @@ void TrickEstimationPanel::buildHand(wxGridBagSizer *sizer, game_state *gameStat void TrickEstimationPanel::buildCenter(wxGridBagSizer* sizer, game_state* gameState){ wxGBSizerItem* centerItem = sizer->FindItemAtPosition(wxGBPosition(1,1)); wxPanel* centerPanel = dynamic_cast<wxPanel*>(centerItem->GetWindow()); - + centerPanel->SetBackgroundColour(wxColor(100, 100, 100)); //grey panel // add sizer to center the text auto centerPanelSizer_vert = new wxBoxSizer(wxVERTICAL); centerPanel->SetSizer(centerPanelSizer_vert); @@ -228,18 +228,16 @@ void TrickEstimationPanel::buildCenter(wxGridBagSizer* sizer, game_state* gameSt centerPanelSizer_hor->Add(centerPanelSizer_vert2, 1, wxALIGN_CENTER); // add round number - wxStaticText* roundNumber = new wxStaticText(centerPanel, wxID_ANY, "Round: " + std::to_string(gameState->get_round_number()+1),wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER); + wxStaticText* roundNumber = new wxStaticText(centerPanel, wxID_ANY, "Round " + std::to_string(gameState->get_round_number()+1),wxDefaultPosition, wxSize(80, 43), wxALIGN_CENTER); roundNumber->SetForegroundColour(*wxWHITE); - roundNumber->SetFont(regularFontTrick); + roundNumber->SetFont(magicalFontTrick); - wxStaticText* trickSum = new wxStaticText(centerPanel, wxID_ANY, "Current prediction sum: " + std::to_string(gameState->get_trick_estimate_sum()),wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER); + wxStaticText* trickSum = new wxStaticText(centerPanel, wxID_ANY, "Current prediction sum " + std::to_string(gameState->get_trick_estimate_sum()) + " / " + std::to_string(gameState->get_round_number() + 1),wxDefaultPosition, wxSize(centerPanel->GetMinSize().GetWidth(), 43), wxALIGN_CENTER); trickSum->SetForegroundColour(*wxWHITE); trickSum->SetFont(regularFontTrick); - - centerPanelSizer_vert2->Add(roundNumber, 0, wxALIGN_CENTER); - centerPanelSizer_vert2->Add(trickSum, 0, wxALIGN_CENTER); - + centerPanelSizer_vert2->Add(roundNumber, 0, wxALIGN_CENTER|wxALL); + centerPanelSizer_vert2->Add(trickSum, 0, wxALIGN_CENTER|wxALL); } void TrickEstimationPanel::buildThisPlayer(wxGridBagSizer* sizer, game_state* gameState, player* me) @@ -253,7 +251,7 @@ void TrickEstimationPanel::buildThisPlayer(wxGridBagSizer* sizer, game_state* ga mePanel->SetBackgroundColour(wxColour(120,0,51)); // add our name - wxStaticText* playerName = new wxStaticText(mePanel, wxID_ANY, me->get_player_name(),wxDefaultPosition, wxSize(150, 35), wxALIGN_CENTER); + wxStaticText* playerName = new wxStaticText(mePanel, wxID_ANY, me->get_player_name(),wxDefaultPosition, wxSize(mePanel->GetMinSize().GetWidth(), 35), wxALIGN_CENTER); playerName->SetForegroundColour(*wxWHITE); playerName->SetFont(regularFontTrickBig); @@ -267,7 +265,7 @@ void TrickEstimationPanel::buildThisPlayer(wxGridBagSizer* sizer, game_state* ga mePanel->SetBackgroundColour(wxColour(50,0,51)); // add input field for trick estimate - wxStaticText* inputLabel = new wxStaticText(mePanel, wxID_ANY, "Trick Estimate:",wxDefaultPosition, wxSize(130, 20), wxALIGN_CENTER); + wxStaticText* inputLabel = new wxStaticText(mePanel, wxID_ANY, "Trick estimate:",wxDefaultPosition, wxSize(130, 20), wxALIGN_CENTER); inputLabel->SetForegroundColour(*wxWHITE); inputLabel->SetFont(regularFontTrick); mePanelSizer_vert->Add(inputLabel, 0, wxALIGN_CENTER); @@ -276,7 +274,7 @@ void TrickEstimationPanel::buildThisPlayer(wxGridBagSizer* sizer, game_state* ga this->_trickEstimateField = new InputField(mePanel, "", 0, "", 80); this->_trickEstimateField->SetLabelTextColour(wxColour(255, 255, 255)); // Set label text color to white mePanelSizer_vert->Add(_trickEstimateField, 0, wxALIGN_CENTER|wxALL, 10); - + _trickEstimateField->SetFont(regularFontTrick); // show button that allows our player to start the game wxButton* submitEstimateButton = new wxButton(mePanel, wxID_ANY, "Submit", wxDefaultPosition, wxSize(80, 43)); submitEstimateButton->SetFont(magicalFontTrick); diff --git a/src/client/panels/TrickEstimationPanel.h b/src/client/panels/TrickEstimationPanel.h index bd42b4f8e16bd403b5febeafc3cd1e3e62b3109c..57d64952ecb71e859b20586e9f577417f22f6216 100644 --- a/src/client/panels/TrickEstimationPanel.h +++ b/src/client/panels/TrickEstimationPanel.h @@ -19,7 +19,7 @@ public: void buildGameState(game_state* gameState, player* me); private: wxSize const panelSize = wxSize(960, 680); - wxSize const cardSize = wxSize(70, 108); + wxSize const cardSize = wxSize(85, 131); void buildCenter(wxGridBagSizer* sizer, game_state* gameState); void buildTrumpColor(wxGridBagSizer* sizer, game_state* gameState); diff --git a/src/common/game_state/game_state.cpp b/src/common/game_state/game_state.cpp index 625c5f804d74c8c5a2b9bad04459c391a93d8266..58e7d03d5a1ea1f898656aad6cdbc9baee6f8745 100644 --- a/src/common/game_state/game_state.cpp +++ b/src/common/game_state/game_state.cpp @@ -195,7 +195,6 @@ int game_state::get_trick_estimate_sum() const unsigned int game_state::get_max_round_number() const { - //return 1; return 60 / _players.size(); }