Add clouds and logo to launcher. (#81)
* Add clouds and logo to launcher. Co-Authored-By: LJSTAR <31629427+ljstarbird@users.noreply.github.com> * Update RecompFrontend to fix lunasvg. * Fix timing issue for launcher code. --------- Co-authored-by: LJSTAR <31629427+ljstarbird@users.noreply.github.com>
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 461 154" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-104,-128)">
|
||||
<path id="Cloud1" d="M541.776,256.714C556.651,258.998 565,261.564 565,264.275C565,273.809 461.716,281.55 334.5,281.55C207.284,281.55 104,273.809 104,264.275C104,260.866 117.201,257.687 139.978,255.009C136.85,250.725 135,245.429 135,239.7C135,225.461 146.426,213.9 160.5,213.9C166.004,213.9 171.103,215.668 175.272,218.673C177.641,197.762 195.214,181.5 216.512,181.5C231.842,181.5 245.242,189.926 252.431,202.446C257.117,190.196 268.878,181.5 282.631,181.5C290.836,181.5 298.332,184.596 304.04,189.694C304.013,188.966 304,188.235 304,187.5C304,154.661 330.661,128 363.5,128C380.444,128 395.742,135.098 406.583,146.479C410.731,137.908 419.439,132 429.5,132C441.276,132 451.198,140.093 454.124,151.077C457.505,150.371 461.007,150 464.593,150C492.936,150 515.972,173.174 516.185,201.801C516.786,201.767 517.391,201.75 518,201.75C535.865,201.75 550.369,216.425 550.369,234.5C550.369,243.07 547.109,250.875 541.776,256.714Z" style="fill:white;"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 461 167" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-659,-115)">
|
||||
<g id="Cloud2" transform="matrix(1,0,0,1,555,0)">
|
||||
<path d="M542.735,256.863C557.009,259.11 565,261.623 565,264.275C565,273.809 461.716,281.55 334.5,281.55C207.284,281.55 104,273.809 104,264.275C104,261.041 115.882,258.014 136.55,255.424C133.075,251.144 130.988,245.666 130.988,239.7C130.988,226.013 141.972,214.9 155.5,214.9C160.086,214.9 164.379,216.177 168.051,218.398C168.017,217.769 168,217.137 168,216.5C168,197.459 183.279,182 202.099,182C209.626,182 216.587,184.473 222.23,188.659C226.718,160.251 251.339,138.5 281,138.5C288.882,138.5 296.409,140.036 303.296,142.825C317.767,126.151 339.111,115.6 362.9,115.6C391.852,115.6 417.183,131.228 430.91,154.501C435.157,152.885 439.757,152 444.56,152C465.981,152 483.372,169.596 483.372,191.269C483.372,192.715 483.295,194.143 483.144,195.548C487.017,193.597 491.383,192.5 496,192.5C511.956,192.5 524.91,205.606 524.91,221.75C524.91,223.717 524.718,225.638 524.351,227.496C526.498,226.534 528.873,226 531.371,226C540.958,226 548.741,233.875 548.741,243.575C548.741,248.88 546.413,253.64 542.735,256.863Z" style="fill:white;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 295 167" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-1190,-115)">
|
||||
<g id="Cloud3" transform="matrix(1,0,0,1,991.5,2.84217e-14)">
|
||||
<path d="M211.793,257.103C203.71,250.792 198.5,240.894 198.5,229.775C198.5,210.734 213.779,195.275 232.599,195.275L232.611,195.275C234.309,170.098 255.297,150.174 280.901,150.174C287.974,150.174 294.694,151.694 300.753,154.426C311.82,131.462 335.322,115.6 362.5,115.6C391.518,115.6 416.345,133.682 426.32,159.183C430.023,156.91 434.367,155.6 439.012,155.6C452.54,155.6 463.523,166.713 463.523,180.4C463.523,182.645 463.228,184.821 462.674,186.89C479.579,191.132 492.124,206.599 492.124,225.006C492.124,237.763 486.099,249.107 476.773,256.282C487.456,258.673 493.5,261.392 493.5,264.275C493.5,273.809 427.407,281.55 346,281.55C264.593,281.55 198.5,273.809 198.5,264.275C198.5,261.717 203.258,259.288 211.793,257.103Z" style="fill:white;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 301 293" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-446,-345)">
|
||||
<path id="Cloud4" d="M507.232,547.816C501.885,550.184 495.97,551.5 489.75,551.5C465.88,551.5 446.5,532.12 446.5,508.25C446.5,484.38 465.88,465 489.75,465C496.442,465 502.78,466.523 508.438,469.241C508.211,467.861 508.092,466.444 508.092,465C508.092,456.045 512.646,448.144 519.562,443.49C516.331,439.168 514.417,433.806 514.417,428C514.417,413.701 526.026,402.092 540.325,402.092C544.387,402.092 548.232,403.029 551.656,404.698C558.101,398.629 566.782,394.908 576.325,394.908C578.586,394.908 580.798,395.117 582.943,395.516C582.325,392.678 582,389.731 582,386.709C582,363.919 600.502,345.417 623.291,345.417C645.367,345.417 663.42,362.779 664.529,384.581C666.116,384.142 667.782,383.908 669.5,383.908C680.262,383.908 689,393.094 689,404.408L688.998,404.729C692.46,401.423 697.058,399.408 702.099,399.408C708.585,399.408 714.336,402.744 717.882,407.873C719.085,407.628 720.328,407.5 721.599,407.5C732.361,407.5 741.099,416.686 741.099,428C741.099,432.836 739.502,437.284 736.833,440.791C739.534,445.046 741.099,450.092 741.099,455.5C741.099,470.678 728.777,483 713.599,483C707.252,483 701.405,480.845 696.749,477.228C695.363,487.436 688.367,495.872 678.972,499.323C678.991,499.879 679,500.439 679,501C679,507.623 677.683,513.941 675.297,519.706C676.122,521.635 676.733,523.677 677.1,525.803C685.992,530.361 692.083,539.62 692.083,550.291C692.083,550.59 692.078,550.888 692.069,551.184C695.81,551.993 699.161,553.931 701.787,556.643C706.24,553.716 711.501,552.024 717.135,552.024C733.148,552.024 746.147,565.691 746.147,582.524C746.147,589.606 743.847,596.127 739.989,601.306C741.31,604.095 742.049,607.212 742.049,610.5C742.049,622.38 732.404,632.024 720.524,632.024C715.35,632.024 710.599,630.194 706.885,627.147C701.859,633.741 693.923,638 685,638C669.822,638 657.5,625.678 657.5,610.5C657.5,607.508 657.979,604.626 658.864,601.929C649.258,601.088 641.62,592.914 641.036,582.753C640.047,582.915 639.033,583 638,583C631.267,583 625.326,579.405 621.822,573.942C618.019,576.272 613.811,578.004 609.33,579.006C606.616,586.84 599.485,592.451 591.111,592.5C591.691,594.787 592,597.182 592,599.648C592,615.654 579.006,628.648 563,628.648C555.88,628.648 549.356,626.077 544.307,621.813C541.916,622.913 539.275,623.524 536.5,623.524C525.738,623.524 517,614.339 517,603.024C517,597.125 519.376,591.804 523.175,588.063C519.493,585.907 517,581.774 517,577.033C517,574.591 517.661,572.31 518.806,570.377C511.821,567.258 506.917,559.976 506.917,551.5C506.917,550.242 507.025,549.011 507.232,547.816Z" style="fill:white;"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -2,6 +2,6 @@
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 2180 2160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(0.837799,0,0,0.823158,362.599,628.361)">
|
||||
<path d="M2169.26,-763.354L2169.26,1860.69L-432.8,1860.69L-432.8,-763.354L2169.26,-763.354ZM576.269,847.984L660.512,1167.98L950.699,1088.84C912.269,1067.12 882.2,1030.18 869.936,983.6C845.93,892.416 899.177,798.549 988.767,774.117C1078.36,749.684 1170.58,803.878 1194.59,895.062C1206.85,941.647 1198.96,988.933 1176.35,1027.3L1466.53,948.162L1382.27,628.092C1360.47,662.883 1326.33,689.805 1284.12,701.316C1194.53,725.75 1102.3,671.558 1078.3,580.372C1054.29,489.188 1107.54,395.321 1197.13,370.888C1239.34,359.377 1282.13,365.317 1318.1,384.358L1250.56,127.805L960.463,206.919C983.019,168.569 990.892,121.33 978.639,74.789C954.634,-16.395 862.407,-70.589 772.817,-46.157C683.227,-21.724 629.98,72.143 653.985,163.327C666.238,209.868 696.263,246.771 734.637,268.505L444.539,347.619L512.06,604.091C476.111,585.098 433.361,579.18 391.193,590.679C301.6,615.113 248.356,708.979 272.362,800.163C296.368,891.349 388.591,945.541 478.184,921.108C520.352,909.608 554.468,882.73 576.269,847.984Z" style="fill:#1A5698"/>
|
||||
<path d="M2169.26,-763.354L2169.26,1860.69L-432.8,1860.69L-432.8,-763.354L2169.26,-763.354ZM576.269,847.984L660.512,1167.98L950.699,1088.84C912.269,1067.12 882.2,1030.18 869.936,983.6C845.93,892.416 899.177,798.549 988.767,774.117C1078.36,749.684 1170.58,803.878 1194.59,895.062C1206.85,941.647 1198.96,988.933 1176.35,1027.3L1466.53,948.162L1382.27,628.092C1360.47,662.883 1326.33,689.805 1284.12,701.316C1194.53,725.75 1102.3,671.558 1078.3,580.372C1054.29,489.188 1107.54,395.321 1197.13,370.888C1239.34,359.377 1282.13,365.317 1318.1,384.358L1250.56,127.805L960.463,206.919C983.019,168.569 990.892,121.33 978.639,74.789C954.634,-16.395 862.407,-70.589 772.817,-46.157C683.227,-21.724 629.98,72.143 653.985,163.327C666.238,209.868 696.263,246.771 734.637,268.505L444.539,347.619L512.06,604.091C476.111,585.098 433.361,579.18 391.193,590.679C301.6,615.113 248.356,708.979 272.362,800.163C296.368,891.349 388.591,945.541 478.184,921.108C520.352,909.608 554.468,882.73 576.269,847.984Z" style="fill:#0F53B2"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
@@ -4,7 +4,7 @@
|
||||
#include "recompui/recompui.h"
|
||||
|
||||
namespace banjo {
|
||||
void launcher_animation_setup(recompui::LauncherMenu *menu, recompui::Element *title);
|
||||
void launcher_animation_setup(recompui::LauncherMenu *menu);
|
||||
void launcher_animation_update(recompui::LauncherMenu *menu);
|
||||
|
||||
constexpr float launcher_options_right_position_start = 96.0f;
|
||||
|
||||
@@ -41,10 +41,11 @@ struct LauncherContext {
|
||||
AnimatedSvg jiggy_color_svg;
|
||||
AnimatedSvg jiggy_shine_svg;
|
||||
AnimatedSvg jiggy_hole_svg;
|
||||
AnimatedSvg logo_svg;
|
||||
std::array<AnimatedSvg, 4> cloud_svgs;
|
||||
recompui::Element *wrapper;
|
||||
recompui::Element *title;
|
||||
std::chrono::steady_clock::time_point last_update_time;
|
||||
std::chrono::steady_clock::time_point start_time;
|
||||
float seconds = 0.0f;
|
||||
bool started = false;
|
||||
} launcher_context;
|
||||
|
||||
@@ -128,19 +129,19 @@ void update_animated_svg(AnimatedSvg &animated_svg, float delta_time, float bg_w
|
||||
animated_svg.svg->set_rotation(rotation_degrees);
|
||||
}
|
||||
|
||||
const float jiggy_scale_anim_start = 0.4f;
|
||||
const float jiggy_scale_anim_start = 0.0f;
|
||||
const float jiggy_scale_anim_length = 0.75f;
|
||||
const float jiggy_scale_anim_end = jiggy_scale_anim_start + jiggy_scale_anim_length;
|
||||
const float jiggy_move_over_start = jiggy_scale_anim_end + 0.5f;
|
||||
const float jiggy_move_over_length = 0.75f;
|
||||
const float jiggy_move_over_end = jiggy_move_over_start + jiggy_move_over_length;
|
||||
const float jiggy_shine_start = jiggy_move_over_end - 0.5f;
|
||||
const float jiggy_shine_start = jiggy_move_over_end + 0.6f;
|
||||
const float jiggy_shine_length = 0.8f;
|
||||
|
||||
void banjo::launcher_animation_setup(recompui::LauncherMenu *menu, recompui::Element *title) {
|
||||
void banjo::launcher_animation_setup(recompui::LauncherMenu *menu) {
|
||||
auto context = recompui::get_current_context();
|
||||
recompui::Element *background_container = menu->get_background_container();
|
||||
background_container->set_background_color({ 0x1A, 0x56, 0x98, 0xFF });
|
||||
background_container->set_background_color({ 0x0F, 0x53, 0xB2, 0xFF });
|
||||
|
||||
launcher_context.wrapper = context.create_element<recompui::Element>(background_container, 0);
|
||||
launcher_context.wrapper->set_position(recompui::Position::Absolute);
|
||||
@@ -155,6 +156,13 @@ void banjo::launcher_animation_setup(recompui::LauncherMenu *menu, recompui::Ele
|
||||
launcher_context.banjo_svg = create_animated_svg(context, launcher_context.wrapper, "Banjo.svg", 649.0f, 622.0f);
|
||||
launcher_context.kazooie_svg = create_animated_svg(context, launcher_context.wrapper, "Kazooie.svg", 626.0f, 774.0f);
|
||||
|
||||
launcher_context.cloud_svgs[0] = create_animated_svg(context, background_container, "Cloud1.svg", 461.0f, 154.0f);
|
||||
launcher_context.cloud_svgs[1] = create_animated_svg(context, background_container, "Cloud2.svg", 461.0f, 167.0f);
|
||||
launcher_context.cloud_svgs[2] = create_animated_svg(context, background_container, "Cloud3.svg", 295.0f, 167.0f);
|
||||
launcher_context.cloud_svgs[3] = create_animated_svg(context, background_container, "Cloud1.svg", 461.0f, 154.0f);
|
||||
|
||||
launcher_context.logo_svg = create_animated_svg(context, background_container, "Logo.svg", 6189.0f * 0.125f, 2626.0f * 0.125f);
|
||||
|
||||
// Animate the jiggy hole.
|
||||
launcher_context.jiggy_hole_svg.position_keyframes = {
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
@@ -246,14 +254,75 @@ void banjo::launcher_animation_setup(recompui::LauncherMenu *menu, recompui::Ele
|
||||
kf.deg = -kf.deg;
|
||||
}
|
||||
|
||||
launcher_context.start_time = std::chrono::steady_clock::now();
|
||||
// Animate the logo.
|
||||
launcher_context.logo_svg.position_keyframes = {
|
||||
{ 0.0f, 0.0f, -900.0f },
|
||||
{ 1.0f, 0.0f, -900.0f },
|
||||
{ 2.0f, 0.0f, -350.0f },
|
||||
};
|
||||
|
||||
launcher_context.title = title;
|
||||
launcher_context.logo_svg.position_animation.interpolation_method = InterpolationMethod::Smootherstep;
|
||||
|
||||
// Animate the clouds.
|
||||
const float cloud_scale_duration = 0.3f;
|
||||
launcher_context.cloud_svgs[0].position_keyframes = {
|
||||
{ 0.0f, 600.0f, -445.0f },
|
||||
{ 3.0f, 600.0f, -455.0f },
|
||||
{ 6.0f, 600.0f, -445.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[0].scale_keyframes = {
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 2.0f, 0.0f, 0.0f },
|
||||
{ 2.0f + cloud_scale_duration, 1.0f, 1.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[1].position_keyframes = {
|
||||
{ 0.0f, -720.0f, 355.0f },
|
||||
{ 5.0f, -720.0f, 365.0f },
|
||||
{ 10.0f, -720.0f, 355.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[1].scale_keyframes = {
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 2.2f, 0.0f, 0.0f },
|
||||
{ 2.2f + cloud_scale_duration, 1.0f, 1.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[2].position_keyframes = {
|
||||
{ 0.0f, -600.0f, -295.0f },
|
||||
{ 2.0f, -600.0f, -305.0f },
|
||||
{ 4.0f, -600.0f, -295.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[2].scale_keyframes = {
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 2.4f, 0.0f, 0.0f },
|
||||
{ 2.4f + cloud_scale_duration, 1.0f, 1.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[3].position_keyframes = {
|
||||
{ 0.0f, 670.0f, 395.0f },
|
||||
{ 4.0f, 670.0f, 405.0f },
|
||||
{ 8.0f, 670.0f, 395.0f },
|
||||
};
|
||||
|
||||
launcher_context.cloud_svgs[3].scale_keyframes = {
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 2.6f, 0.0f, 0.0f },
|
||||
{ 2.6f + cloud_scale_duration, 1.0f, 1.0f },
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < launcher_context.cloud_svgs.size(); i++) {
|
||||
launcher_context.cloud_svgs[i].position_animation.loop_keyframe_index = 0;
|
||||
launcher_context.cloud_svgs[i].position_animation.interpolation_method = InterpolationMethod::Smootherstep;
|
||||
}
|
||||
}
|
||||
|
||||
void banjo::launcher_animation_update(recompui::LauncherMenu *menu) {
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||
float delta_time = launcher_context.started ? std::chrono::duration_cast<std::chrono::milliseconds>(now - launcher_context.last_update_time).count() / 1000.0f : 0.0f;
|
||||
launcher_context.seconds += delta_time;
|
||||
launcher_context.last_update_time = now;
|
||||
launcher_context.started = true;
|
||||
|
||||
@@ -266,14 +335,14 @@ void banjo::launcher_animation_update(recompui::LauncherMenu *menu) {
|
||||
update_animated_svg(launcher_context.jiggy_color_svg, delta_time, bg_width, bg_height);
|
||||
update_animated_svg(launcher_context.jiggy_shine_svg, delta_time, bg_width, bg_height);
|
||||
update_animated_svg(launcher_context.jiggy_hole_svg, delta_time, bg_width, bg_height);
|
||||
update_animated_svg(launcher_context.logo_svg, delta_time, bg_width, bg_height);
|
||||
|
||||
auto elapsed = now - launcher_context.start_time;
|
||||
float elapsed_ms = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
|
||||
float from_ms = jiggy_move_over_start * 1000.0f;
|
||||
float to_ms = jiggy_move_over_end * 1000.0f;
|
||||
if (elapsed_ms > from_ms && elapsed_ms < to_ms) {
|
||||
float now_ms = elapsed_ms;
|
||||
float t = (now_ms - from_ms) / (to_ms - from_ms);
|
||||
for (size_t i = 0; i < launcher_context.cloud_svgs.size(); i++) {
|
||||
update_animated_svg(launcher_context.cloud_svgs[i], delta_time, bg_width, bg_height);
|
||||
}
|
||||
|
||||
if (launcher_context.seconds > jiggy_move_over_start && launcher_context.seconds < jiggy_move_over_end) {
|
||||
float t = (launcher_context.seconds - jiggy_move_over_start) / (jiggy_move_over_end - jiggy_move_over_start);
|
||||
float x_translation = interpolate_value(0, 1440 * -0.2f, t, InterpolationMethod::Smootherstep);
|
||||
launcher_context.wrapper->set_translate_2D(x_translation, 0, recompui::Unit::Dp);
|
||||
float y_translation = interpolate_value(0, launcher_options_top_offset, t, InterpolationMethod::Smootherstep);
|
||||
@@ -285,24 +354,23 @@ void banjo::launcher_animation_update(recompui::LauncherMenu *menu) {
|
||||
for (auto option : menu->get_game_options_menu()->get_options()) {
|
||||
option->set_opacity(game_option_menu_opacity);
|
||||
}
|
||||
launcher_context.title->set_opacity(game_option_menu_opacity);
|
||||
|
||||
float game_option_menu_right = interpolate_value(
|
||||
launcher_options_right_position_start, launcher_options_right_position_end, t, InterpolationMethod::Smootherstep);
|
||||
menu->get_game_options_menu()->set_right(game_option_menu_right);
|
||||
}
|
||||
|
||||
if (elapsed_ms <= from_ms) {
|
||||
if (launcher_context.seconds <= jiggy_move_over_start) {
|
||||
for (auto option : menu->get_game_options_menu()->get_options()) {
|
||||
option->set_opacity(0);
|
||||
}
|
||||
launcher_context.title->set_opacity(0.0f);
|
||||
|
||||
menu->get_game_options_menu()->set_right(launcher_options_right_position_start);
|
||||
} else if (elapsed_ms >= to_ms) {
|
||||
} else if (launcher_context.seconds >= jiggy_move_over_end) {
|
||||
for (auto option : menu->get_game_options_menu()->get_options()) {
|
||||
option->set_opacity(1.0f);
|
||||
}
|
||||
launcher_context.title->set_opacity(1.0f);
|
||||
|
||||
menu->get_game_options_menu()->set_right(launcher_options_right_position_end);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,15 +601,7 @@ void on_launcher_init(recompui::LauncherMenu *menu) {
|
||||
|
||||
menu->remove_default_title();
|
||||
|
||||
recompui::ContextId context = recompui::get_current_context();
|
||||
recompui::Label* title_label = context.create_element<recompui::Label>(menu, "Banjo: Recompiled", recompui::theme::Typography::Header1);
|
||||
title_label->set_position(recompui::Position::Absolute);
|
||||
title_label->set_top(banjo::launcher_options_title_offset);
|
||||
title_label->set_right(50.0f, recompui::Unit::Percent);
|
||||
title_label->set_translate_2D(50.0f, 0.0f, recompui::Unit::Percent);
|
||||
title_label->set_color(recompui::theme::color::White);
|
||||
|
||||
banjo::launcher_animation_setup(menu, title_label);
|
||||
banjo::launcher_animation_setup(menu);
|
||||
}
|
||||
|
||||
#define REGISTER_FUNC(name) recomp::overlays::register_base_export(#name, name)
|
||||
|
||||