From e6168d340418816a6b207dd7250ca61795fc1b59 Mon Sep 17 00:00:00 2001
From: spiasecki <spiasecki@student.ethz.ch>
Date: Thu, 26 May 2022 13:43:55 +0200
Subject: [PATCH] Clearing + comments + color of panel

---
 source/client/panels/BetPanel.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/source/client/panels/BetPanel.cpp b/source/client/panels/BetPanel.cpp
index 925a648..037059f 100644
--- a/source/client/panels/BetPanel.cpp
+++ b/source/client/panels/BetPanel.cpp
@@ -3,7 +3,7 @@
 BetPanel::BetPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) {}
 
 BetPanel::BetPanel(wxWindow* parent, game_state* gameState, player* me) : wxPanel(parent, wxID_ANY) {
-    // update myself ? (maybe not needed)
+    // update myself
     std::vector<player*> players = gameState->get_players();
     std::vector<player*>::iterator it = std::find_if(players.begin(), players.end(), [me](const player* x) {
         return x->get_id() == me->get_id();
@@ -16,7 +16,7 @@ BetPanel::BetPanel(wxWindow* parent, game_state* gameState, player* me) : wxPane
     }
 
     // color of background
-    wxColor lightGreen = wxColor(50, 205, 50);
+    wxColor lightGreen = wxColor(210, 210, 210);
     this->SetBackgroundColour(lightGreen);
 
     wxBoxSizer* verticalLayout = new wxBoxSizer(wxVERTICAL);
@@ -37,7 +37,7 @@ BetPanel::BetPanel(wxWindow* parent, game_state* gameState, player* me) : wxPane
         this,
         "Your bet:",
         100,
-        wxString::Format("%i", game_state::_min_bet),//TODO does this not take our input as minimal bet?
+        wxString::Format("%i", game_state::_min_bet),
         240
     );
     verticalLayout->Add(this->_betSizeField, 0, wxTOP | wxLEFT | wxRIGHT, 10);
@@ -52,10 +52,12 @@ BetPanel::BetPanel(wxWindow* parent, game_state* gameState, player* me) : wxPane
     this->SetSizerAndFit(verticalLayout);
 }
 
+// get value from input field
 wxString BetPanel::getBetSize() {
     return this->_betSizeField->getValue();
 }
 
+// build text on screen
 wxStaticText* BetPanel::buildStaticText(std::string content, wxPoint position, wxSize size, long textAlignment, bool bold) {
     wxStaticText* staticText = new wxStaticText(this, wxID_ANY, content, position, size, textAlignment);
     if(bold) {
-- 
GitLab