Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blackjack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engeler
Blackjack
Commits
e6168d34
Commit
e6168d34
authored
2 years ago
by
spiasecki
Browse files
Options
Downloads
Patches
Plain Diff
Clearing + comments + color of panel
parent
10b54d08
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/client/panels/BetPanel.cpp
+5
-3
5 additions, 3 deletions
source/client/panels/BetPanel.cpp
with
5 additions
and
3 deletions
source/client/panels/BetPanel.cpp
+
5
−
3
View file @
e6168d34
...
...
@@ -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
(
5
0
,
2
05
,
5
0
);
wxColor
lightGreen
=
wxColor
(
21
0
,
2
10
,
21
0
);
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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment