Fixing Android stuff
This commit is contained in:
1 parent
fc93eb6680
commit
2e749ed26e
20 files changed
+716
-32
No files matched your search
+31
-4
@@ -163,10 +163,11 @@ namespace FRG {
|
||||
|
||||
#ifdef __ANDROID__
|
||||
hudStep1Root = loadLocalizedUi("resources/w/ui/hud_step1android.json", zipFile);
|
||||
hudStep2Root = loadLocalizedUi("resources/w/ui/hud_step2android.json", zipFile);
|
||||
#else
|
||||
hudStep1Root = loadLocalizedUi("resources/w/ui/hud_step1.json", zipFile);
|
||||
#endif
|
||||
hudStep2Root = loadLocalizedUi("resources/w/ui/hud_step2.json", zipFile);
|
||||
#endif
|
||||
#ifdef __ANDROID__
|
||||
hudStep3Root = loadLocalizedUi("resources/w/ui/hud_step3android.json", zipFile);
|
||||
#else
|
||||
@@ -230,12 +231,12 @@ namespace FRG {
|
||||
mainMenuRoot = loadLocalizedUi("resources/w/ui/screen_main_menu_android.json", zipFile);
|
||||
aboutScreenRoot = loadLocalizedUi("resources/w/ui/screen_about_android.json", zipFile);
|
||||
#else
|
||||
|
||||
mainMenuRoot = loadLocalizedUi("resources/w/ui/screen_main_menu.json", zipFile);
|
||||
aboutScreenRoot = loadLocalizedUi("resources/w/ui/screen_about.json", zipFile);
|
||||
#endif
|
||||
|
||||
creditsScreenRoot = loadLocalizedUi("resources/w/ui/screen_credits.json", zipFile);
|
||||
portraitCreditsScreenRoot = loadLocalizedUi("resources/w/ui/screen_credits_portrait.json", zipFile);
|
||||
portraitCreditsScreenRoot = loadLocalizedUi("resources/w/ui/portrait_screen_credits.json", zipFile);
|
||||
settingsScreenRoot = loadLocalizedUi("resources/w/ui/screen_settings.json", zipFile);
|
||||
settingsGraphicsScreenRoot = loadLocalizedUi("resources/w/ui/screen_settings_graphics.json", zipFile);
|
||||
languageScreenRoot = loadLocalizedUi("resources/w/ui/screen_language.json", zipFile);
|
||||
@@ -493,6 +494,14 @@ namespace FRG {
|
||||
SDL_OpenURL("https://store.steampowered.com/app/4801010/");
|
||||
});
|
||||
|
||||
|
||||
#ifdef __ANDROID__
|
||||
uiManager.setTextButtonCallback("websiteButton", [this](const std::string&) {
|
||||
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
|
||||
SDL_OpenURL("https://shadowoverbishkek.com/");
|
||||
});
|
||||
#endif
|
||||
|
||||
uiManager.setTextButtonCallback("telegramButton", [this](const std::string&) {
|
||||
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
|
||||
SDL_OpenURL("https://telegram.me/fishrungames");
|
||||
@@ -514,6 +523,23 @@ namespace FRG {
|
||||
{
|
||||
uiManager.pushMenuFromSavedRoot(creditsScreenRoot);
|
||||
}
|
||||
|
||||
static std::string gameTitle;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
if (g_currentLanguage == Language::English)
|
||||
{
|
||||
gameTitle = "Shadow over Bishkek";
|
||||
}
|
||||
else if (g_currentLanguage == Language::Russian)
|
||||
{
|
||||
gameTitle = u8"Тень над Бишкеком";
|
||||
}
|
||||
|
||||
uiManager.setText("creditsTitleText", gameTitle);
|
||||
#endif
|
||||
|
||||
|
||||
uiManager.setButtonCallback("creditsBackButton", [this](const std::string&) {
|
||||
isPlayerInCreditsMenu = false;
|
||||
uiManager.popMenu();
|
||||
@@ -521,10 +547,11 @@ namespace FRG {
|
||||
audioPlayer_.playSoundAsync("audio/751089__smallconfusion__mechanical-plastic-click-11.ogg");
|
||||
});
|
||||
|
||||
|
||||
uiManager.updateAllLayouts();
|
||||
uiManager.stopAnimationOnNode("creditsLinearLayout", "slowScroll");
|
||||
uiManager.resetAnimationOnNode("creditsLinearLayout");
|
||||
uiManager.startAnimationOnNode("creditsLinearLayout", "slowScroll");
|
||||
|
||||
}
|
||||
|
||||
void MenuManager::showSettingsScreen() {
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ namespace FRG {
|
||||
static constexpr float CHAT_FBO_OFFSET_DOWN_L = 70.0f;
|
||||
|
||||
static constexpr float CHAT_FBO_WIDTH_P = 670.0f;
|
||||
static constexpr float CHAT_FBO_OFFSET_UP_P = 356.0f;
|
||||
static constexpr float CHAT_FBO_OFFSET_UP_P = 364.0f;
|
||||
static constexpr float CHAT_FBO_OFFSET_DOWN_P = 70.0f;
|
||||
|
||||
std::unique_ptr<FrameBuffer> chatFrameBuffer_;
|
||||
|
||||
Reference in new issue
Block a user