loading logo
This commit is contained in:
parent
e9583a7266
commit
2653c9e127
@ -49,30 +49,30 @@ impl LoadingScreen {
|
|||||||
win_height: i32,
|
win_height: i32,
|
||||||
win_width: i32,
|
win_width: i32,
|
||||||
) {
|
) {
|
||||||
// Determine how far through rendering this logo we are
|
// // Determine how far through rendering this logo we are
|
||||||
// This value is used to determine the logo alpha
|
// // This value is used to determine the logo alpha
|
||||||
let playthrough_percent =
|
// let playthrough_percent =
|
||||||
(draw_handle.get_time() - self.last_state_switch_time) / SECONDS_PER_LOGO;
|
// (draw_handle.get_time() - self.last_state_switch_time) / SECONDS_PER_LOGO;
|
||||||
|
|
||||||
// Build a color mask
|
// // Build a color mask
|
||||||
let mask = self.get_logo_mask(playthrough_percent);
|
// let mask = self.get_logo_mask(playthrough_percent);
|
||||||
|
|
||||||
// Get the logo
|
// // Get the logo
|
||||||
let logo = &game_core.resources.game_logo;
|
// let logo = &game_core.resources.game_logo;
|
||||||
|
|
||||||
// Render the logo
|
// // Render the logo
|
||||||
draw_handle.draw_texture(
|
// draw_handle.draw_texture(
|
||||||
logo,
|
// logo,
|
||||||
(win_width / 2) - (logo.width / 2),
|
// (win_width / 2) - (logo.width / 2),
|
||||||
(win_height / 2) - (logo.height / 2),
|
// (win_height / 2) - (logo.height / 2),
|
||||||
mask,
|
// mask,
|
||||||
);
|
// );
|
||||||
|
|
||||||
// Move on to next logo if needed
|
// Move on to next logo if needed
|
||||||
if playthrough_percent >= 1.0 {
|
// if playthrough_percent >= 1.0 {
|
||||||
self.state = LoadingScreenState::RaylibLogo;
|
self.state = LoadingScreenState::RaylibLogo;
|
||||||
self.last_state_switch_time = draw_handle.get_time();
|
self.last_state_switch_time = draw_handle.get_time();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn show_raylib_logo(
|
fn show_raylib_logo(
|
||||||
|
Reference in New Issue
Block a user