@@ -118,6 +118,7 @@ def calc_song_progress_percent(song_length,song_start_time,current_time): # ret
118
118
119
119
120
120
def run_FGHJ (screen ,clock ,song_name ,stage_speed ,offset ,judgement_shown ,guide_line_shown ):
121
+ global bar_color
121
122
game_run = True
122
123
score = [0 ]
123
124
chart_info = get_chart (song_name )
@@ -137,7 +138,7 @@ def run_FGHJ(screen,clock,song_name,stage_speed,offset,judgement_shown,guide_lin
137
138
verifier = Verifier (screen ,score ,stage_speed ,judgement_shown ,song_bpm )
138
139
139
140
140
- bar_color = ( 90 , 90 , 90 )
141
+
141
142
bar_pos = (width // 2 , info_length // 4 )
142
143
song_progress = 0
143
144
@@ -235,9 +236,9 @@ def run_FGHJ(screen,clock,song_name,stage_speed,offset,judgement_shown,guide_lin
235
236
# 4. song progress를 표시한다(진행상황)
236
237
current_time = pygame .time .get_ticks () # in milliseconds
237
238
song_progress = calc_song_progress_percent (song_length , song_start_time , current_time )
238
- draw_progress_bar (screen , song_progress , bar_color , bar_pos [0 ], bar_pos [1 ])
239
+ draw_progress_bar (screen , song_progress , bar_pos [0 ], bar_pos [1 ])
239
240
240
- write_text (screen , width // 2 , (info_length // 2 )// 2 , 'Song: %s' % (song_name ), small_text , background_color [ 0 ] , highlight_text_color )
241
+ write_text (screen , width // 2 , (info_length // 2 )// 2 , 'Song: %s' % (song_name ), small_text , bar_color , highlight_text_color )
241
242
write_text (screen , width // 2 , (info_length // 2 ) // 2 + (info_length // 2 ), 'Score: %.2f' % score [0 ], small_text , background_color [0 ],
242
243
highlight_text_color )
243
244
@@ -256,12 +257,13 @@ def run_FGHJ(screen,clock,song_name,stage_speed,offset,judgement_shown,guide_lin
256
257
break
257
258
258
259
259
- def draw_progress_bar (screen , song_progress , color ,x ,y ):
260
+ def draw_progress_bar (screen , song_progress , x ,y ):
261
+ global bar_color
260
262
bar_width = width
261
263
bar_height = info_length // 2
262
264
263
265
#draw_bar_frame(screen, x, y, bar_width, bar_height, color) # don't need frames here
264
- draw_bar (screen ,x ,y ,bar_width ,bar_height , song_progress , color )
266
+ draw_bar (screen ,x ,y ,bar_width ,bar_height , song_progress , bar_color )
265
267
266
268
267
269
def draw_frame (screen ):
0 commit comments