social media buttons, playtester thanks, updated QR code graphic
This commit is contained in:
parent
0767f1f926
commit
9696d3a835
20
config.json
20
config.json
|
@ -46,12 +46,20 @@
|
|||
"scoreboard background": [0.0, 0.0, 0.0, 0.0],
|
||||
"scoreboard translation": [-0.38, 0.845],
|
||||
"scoreboard scale": [1.4, 0.15],
|
||||
"scoreboard translation": [-0.45, 0.865],
|
||||
"scoreboard translation": [-0.4, 0.835],
|
||||
"scoreboard scale": [1.35, 0.14],
|
||||
"scoreboard wrap": 3000,
|
||||
"qr display": false,
|
||||
"qr background display": true,
|
||||
"qr background texture": "resource/qr_background.png",
|
||||
"qr texture": "resource/qr.png",
|
||||
"qr translation": [1.49, -0.7],
|
||||
"qr scale": [0.205, 0.225],
|
||||
"qr translation": [1.25, -0.465],
|
||||
"qr scale": [0.525, 0.525],
|
||||
"social texture": "resource/Social_media_buttons.png",
|
||||
"social arcade translation": [-1.35, -0.82],
|
||||
"social qr translation": [-1.32, -0.55],
|
||||
"social web translation": [1.42, -0.82],
|
||||
"social scale": [0.35, 0.11],
|
||||
"end screen timeout": 40.0,
|
||||
"enemy sprite scale": 0.024691358,
|
||||
"quest best text": "★ ",
|
||||
|
@ -395,6 +403,10 @@
|
|||
"unlock beef": "✩ UNLOCKED BEEF CAKE ✩",
|
||||
"unlock buffalo": "✩ UNLOCKED BUFFALO BEEF CAKE ✩",
|
||||
"unlock jackpot": "✩ UNLOCKED GOLDEN CAKE ✩",
|
||||
"new best": "✩ NEW BEST TIME ✩"
|
||||
"new best": "✩ NEW BEST TIME ✩",
|
||||
"thanks": "Thank you for playtesting! @carlosissurreal @snakesandrews @paotato @big__flan @8ude @emilyrakoonce @xed @markkleeb @sortasoft @toddwords @computerlunch @synodai @sleepin @artfail @wondervillenyc @gumbo_nyc",
|
||||
"thanks translation": [0.36, -0.78],
|
||||
"thanks scale": [1.58, 0.13],
|
||||
"thanks wrap": 1080
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
resource/qr.png
BIN
resource/qr.png
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -807,9 +807,45 @@ void Cakefoot::set_up_hud()
|
|||
scoreboard.scale(configuration()("display", "scoreboard scale"));
|
||||
|
||||
/* Style the QR code */
|
||||
qr_code.texture(configuration()("display", "qr texture").get<std::string>());
|
||||
sb::Texture qr_texture {configuration()("display", "qr texture").get<std::string>()};
|
||||
qr_texture.load();
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
qr_code.texture(qr_texture);
|
||||
qr_code.translate(configuration()("display", "qr translation"));
|
||||
qr_code.scale(configuration()("display", "qr scale"));
|
||||
sb::Texture qr_bg_texture {configuration()("display", "qr background texture").get<std::string>()};
|
||||
qr_bg_texture.load();
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
qr_code_bg.texture(qr_bg_texture);
|
||||
qr_code_bg.translate(configuration()("display", "qr translation"));
|
||||
qr_code_bg.scale(configuration()("display", "qr scale"));
|
||||
|
||||
/* Style the social buttons */
|
||||
sb::Texture social_texture {configuration()("display", "social texture").get<std::string>()};
|
||||
social_texture.load();
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
social.texture(social_texture);
|
||||
std::string social_translation;
|
||||
if (configuration()("display", "qr display"))
|
||||
{
|
||||
if (configuration()("display", "arcade only"))
|
||||
{
|
||||
social_translation = "social arcade translation";
|
||||
}
|
||||
else
|
||||
{
|
||||
social_translation = "social qr translation";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
social_translation = "social web translation";
|
||||
}
|
||||
social.translate(configuration()("display", social_translation));
|
||||
social.scale(configuration()("display", "social scale"));
|
||||
|
||||
/* Style the quest best time indicator */
|
||||
label.at("quest best").foreground(configuration()("display", "quest best foreground").get<glm::vec4>());
|
||||
|
@ -824,6 +860,15 @@ void Cakefoot::set_up_hud()
|
|||
format_clock(configuration()("progress", "quest best")));
|
||||
label.at("quest best").refresh();
|
||||
}
|
||||
|
||||
/* Style the playtester thanks text */
|
||||
thanks.wrap(configuration()("ending", "thanks wrap"));
|
||||
thanks.content(configuration()("ending", "thanks"));
|
||||
thanks.foreground(configuration()("ending", "messages foreground").get<glm::vec4>());
|
||||
thanks.untransform();
|
||||
thanks.translate(configuration()("ending", "thanks translation"));
|
||||
thanks.scale(configuration()("ending", "thanks scale"));
|
||||
thanks.refresh();
|
||||
}
|
||||
|
||||
void Cakefoot::load_vbo()
|
||||
|
@ -2274,7 +2319,15 @@ void Cakefoot::update(float timestamp)
|
|||
for (std::string name : {"resume", "reset"})
|
||||
{
|
||||
button.at(name).draw(uniform["mvp"], view, projection, uniform["texture enabled"]);
|
||||
} }
|
||||
}
|
||||
|
||||
/* Draw playtester thanks */
|
||||
thanks.texture(0).bind();
|
||||
label_transformation = projection * view * thanks.transformation();
|
||||
glUniformMatrix4fv(uniform["mvp"], 1, GL_FALSE, &label_transformation[0][0]);
|
||||
thanks.enable();
|
||||
glDrawArrays(GL_TRIANGLES, 0, thanks.attributes("position")->count());
|
||||
}
|
||||
|
||||
/* Draw name entry */
|
||||
if (static_cast<std::size_t>(level_index) == configuration()("levels").size() - 1 && arcade())
|
||||
|
@ -2370,8 +2423,16 @@ void Cakefoot::update(float timestamp)
|
|||
glDrawArrays(GL_TRIANGLES, 0, label.at("quest best").attributes("position")->count());
|
||||
}
|
||||
|
||||
/* Draw QR */
|
||||
qr_code.draw(uniform.at("mvp"), view, projection, uniform.at("texture enabled"));
|
||||
/* Draw QR and social */
|
||||
if (configuration()("display", "qr display"))
|
||||
{
|
||||
if (configuration()("display", "qr background display"))
|
||||
{
|
||||
qr_code_bg.draw(uniform.at("mvp"), view, projection, uniform.at("texture enabled"));
|
||||
}
|
||||
qr_code.draw(uniform.at("mvp"), view, projection, uniform.at("texture enabled"));
|
||||
}
|
||||
social.draw(uniform.at("mvp"), view, projection, uniform.at("texture enabled"));
|
||||
}
|
||||
|
||||
/* Draw end screen messages */
|
||||
|
|
|
@ -244,7 +244,7 @@ private:
|
|||
{"arcade distance", sb::Text(fonts.at("large"))},
|
||||
{"quest best", sb::Text(fonts.at("glyph"))}
|
||||
};
|
||||
sb::Sprite playing_field, checkpoint_on, checkpoint_off, coin {"resource/coin/coin-0.png", glm::vec2{12.0f / 486.0f}}, qr_code;
|
||||
sb::Sprite playing_field, checkpoint_on, checkpoint_off, coin {"resource/coin/coin-0.png", glm::vec2{12.0f / 486.0f}}, qr_code, qr_code_bg, social;
|
||||
sb::Timer on_timer, run_timer, unpaused_timer;
|
||||
glm::vec3 camera_position {0.0f, 0.0f, 2.0f}, subject_position {0.0f, 0.0f, 0.0f};
|
||||
float zoom = 0.0f;
|
||||
|
@ -258,7 +258,7 @@ private:
|
|||
ArcadeScores arcade_scores;
|
||||
ArcadeScores::Score arcade_score;
|
||||
std::string name_entry = "AAA";
|
||||
sb::Text scoreboard {fonts.at("large")};
|
||||
sb::Text scoreboard {fonts.at("large")}, thanks {fonts.at("medium")};
|
||||
std::vector<Flame> ending_coins;
|
||||
sb::Color rotating_hue {128, 0, 0, 0};
|
||||
std::vector<sb::Text> ending_messages;
|
||||
|
|
Loading…
Reference in New Issue