Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2019
Cpp
PhaseShifter
Commits
38bd1e7c
Commit
38bd1e7c
authored
Sep 17, 2019
by
Kevin Balz
Browse files
static cast
parent
aed25283
Pipeline
#3232
passed with stage
in 1 minute and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ui/hud_system.cpp
View file @
38bd1e7c
...
...
@@ -30,7 +30,7 @@ namespace phase_shifter::ui {
{
_timeLeft
-=
dt
;
auto
state
=
_beat_system
.
beat_state
();
int
max_bars
=
(
int
)
(
_max_distance
/
(
bar_speed
*
state
.
avg_beat_time
)
+
1
);
int
max_bars
=
static_cast
<
int
>
(
_max_distance
/
(
bar_speed
*
state
.
avg_beat_time
)
+
1
);
if
(
state
.
beat
&&
_beats
<
max_bars
)
{
_beats
++
;
}
...
...
@@ -67,7 +67,7 @@ namespace phase_shifter::ui {
ImGui
::
PushStyleColor
(
ImGuiCol_Border
,
"#00000000"
_imcolor
.
Value
);
// Hide Border
ImVec2
cursor
=
ImGui
::
GetCursorScreenPos
();
auto
beat_state
=
_beat_system
.
beat_state
();
int
max_bars
=
(
int
)
(
_max_distance
/
(
bar_speed
*
beat_state
.
avg_beat_time
)
+
1
);
int
max_bars
=
static_cast
<
int
>
(
_max_distance
/
(
bar_speed
*
beat_state
.
avg_beat_time
)
+
1
);
auto
line_offset
=
bar_speed
*
beat_state
.
avg_beat_time
;
auto
start_offset
=
(
max_bars
-
_beats
)
*
line_offset
;
ImGui
::
BeginChild
(
"Line"
,
{
viewport
.
z
,
90
},
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment