mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-17 11:59:28 +00:00
Move hardcoded UI strings to stringbank.txt. Patch by Henrik Holst.
This commit is contained in:
parent
cd18ef2a43
commit
b5518c28cd
11 changed files with 239 additions and 31 deletions
|
@ -65,7 +65,7 @@ AquariaSaveSlot::AquariaSaveSlot(int slot) : AquariaGuiQuad()
|
|||
if (description.length() > 0)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "Slot ";
|
||||
os << dsq->continuity.stringBank.get(2002) << " ";
|
||||
if (dsq->isDeveloperKeys())
|
||||
os << slot;
|
||||
else
|
||||
|
@ -79,7 +79,7 @@ AquariaSaveSlot::AquariaSaveSlot(int slot) : AquariaGuiQuad()
|
|||
else
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "Slot " << (slot+1) << " - Empty";
|
||||
os << dsq->continuity.stringBank.get(2002) << " " << (slot+1) << " - " << dsq->continuity.stringBank.get(2003);
|
||||
text1->setText(os.str());
|
||||
glowText->setText(os.str());
|
||||
empty = true;
|
||||
|
@ -220,7 +220,7 @@ void AquariaSaveSlot::onUpdate(float dt)
|
|||
else if ((!core->mouse.buttons.left && !core->mouse.buttons.right) && mbDown)
|
||||
{
|
||||
mbDown = false;
|
||||
if (text1->getText().find("Empty")!=std::string::npos && dsq->saveSlotMode == SSM_LOAD)
|
||||
if (text1->getText().find(dsq->continuity.stringBank.get(2003))!=std::string::npos && dsq->saveSlotMode == SSM_LOAD)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -554,7 +554,7 @@ void DSQ::debugMenu()
|
|||
{
|
||||
core->frameOutputMode = false;
|
||||
dsq->game->togglePause(true);
|
||||
std::string s = dsq->getUserInputString("1: Refresh\n2: Heal\n3: Reset Cont.\n5: Set Invincible\n6: Set Flag\n8: All Songs\n9: All Ups\nS: learn song #\nF: Find Entity\nC: Set Costume\n0: Learn MArea Songs\nR: Record Demo\nP: Playback Demo\nT: Rewind Demo\nU: Ouput Demo Frames\nB: Unload Resources\nA: Reload Resources\nM: AutoMap\nJ: JumpState\nQ: QuitNestedMain", "");
|
||||
std::string s = dsq->getUserInputString(dsq->continuity.stringBank.get(2012), "");
|
||||
stringToUpper(s);
|
||||
|
||||
/*
|
||||
|
@ -748,7 +748,7 @@ void DSQ::debugMenu()
|
|||
{
|
||||
std::ostringstream os;
|
||||
os << dsq->game->avatar->health;
|
||||
std::istringstream is(dsq->getUserInputString("health", os.str()));
|
||||
std::istringstream is(dsq->getUserInputString(dsq->continuity.stringBank.get(2013), os.str()));
|
||||
float h = 0;
|
||||
is >> h;
|
||||
dsq->game->avatar->health = h;
|
||||
|
@ -1186,6 +1186,8 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
|
||||
loadBit(LOAD_FONTS);
|
||||
|
||||
dsq->continuity.stringBank.load();
|
||||
|
||||
setTexturePointers();
|
||||
|
||||
cursor = new Quad;
|
||||
|
@ -1317,14 +1319,14 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
addRenderObject(cutscene_bg, LR_SUBTITLES);
|
||||
|
||||
cutscene_text = new BitmapText(&dsq->font);
|
||||
cutscene_text->setText("~Paused~");
|
||||
cutscene_text->setText(dsq->continuity.stringBank.get(2004));
|
||||
cutscene_text->position = Vector(400,300-16);
|
||||
cutscene_text->alpha.x = 0;
|
||||
cutscene_text->followCamera = 1;
|
||||
addRenderObject(cutscene_text, LR_SUBTITLES);
|
||||
|
||||
cutscene_text2 = new BitmapText(&dsq->smallFont);
|
||||
cutscene_text2->setText("Press 'S' to Skip");
|
||||
cutscene_text2->setText(dsq->continuity.stringBank.get(2005));
|
||||
cutscene_text2->position = Vector(400,300+10);
|
||||
cutscene_text2->alpha.x = 0;
|
||||
cutscene_text2->followCamera = 1;
|
||||
|
@ -1774,7 +1776,7 @@ void DSQ::setFilter(int ds)
|
|||
|
||||
void DSQ::setStory()
|
||||
{
|
||||
std::string flagString = getUserInputString("Enter Flag to Set", "0");
|
||||
std::string flagString = getUserInputString(dsq->continuity.stringBank.get(2014), "0");
|
||||
int flag = 0;
|
||||
std::istringstream is(flagString);
|
||||
is >> flag;
|
||||
|
@ -1782,7 +1784,7 @@ void DSQ::setStory()
|
|||
core->main(0.2);
|
||||
std::ostringstream os;
|
||||
os << dsq->continuity.getFlag(flag);
|
||||
flagString = getUserInputString("Enter Value to Set Flag To", os.str());
|
||||
flagString = getUserInputString(dsq->continuity.stringBank.get(2015), os.str());
|
||||
int value = 0;
|
||||
std::istringstream is2(flagString);
|
||||
is2 >> value;
|
||||
|
@ -2917,7 +2919,7 @@ void DSQ::clearModSelector()
|
|||
void DSQ::updateSaveSlotPageCount()
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "Page " << user.data.savePage+1 << "/" << maxPages+1;
|
||||
os << dsq->continuity.stringBank.get(2006) << " " << user.data.savePage+1 << "/" << maxPages+1;
|
||||
saveSlotPageCount->setText(os.str());
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ void Demo::update(float dt)
|
|||
if (getQuitKey())
|
||||
{
|
||||
toggleRecord(false);
|
||||
dsq->centerMessage("Stopped Recording");
|
||||
dsq->centerMessage(dsq->continuity.stringBank.get(2010));
|
||||
}
|
||||
}
|
||||
else if (mode == DEMOMODE_PLAYBACK)
|
||||
|
@ -180,7 +180,7 @@ void Demo::update(float dt)
|
|||
|
||||
if (getQuitKey() || (!frames.empty() && frame >= frames.size())) {
|
||||
togglePlayback(false);
|
||||
dsq->centerMessage("Stopped Playback");
|
||||
dsq->centerMessage(dsq->continuity.stringBank.get(2011));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2514,7 +2514,7 @@ void Game::loadEntityTypeList()
|
|||
std::string line;
|
||||
if(!in)
|
||||
{
|
||||
core->messageBox("error", "Entity data not found! Aborting...");
|
||||
core->messageBox(dsq->continuity.stringBank.get(2008), dsq->continuity.stringBank.get(2016));
|
||||
exit(1);
|
||||
}
|
||||
while (std::getline(in, line))
|
||||
|
@ -3882,7 +3882,7 @@ void Game::createInGameMenu()
|
|||
recipeMenu.header = new BitmapText(&dsq->font);
|
||||
recipeMenu.header->color = 0;
|
||||
recipeMenu.header->followCamera = 1;
|
||||
recipeMenu.header->setText("Recipes");
|
||||
recipeMenu.header->setText(dsq->continuity.stringBank.get(2007));
|
||||
recipeMenu.header->alpha = 0;
|
||||
recipeMenu.header->position = Vector(scrollx, 5); //10
|
||||
addRenderObject(recipeMenu.header, LR_RECIPES);
|
||||
|
@ -3891,7 +3891,7 @@ void Game::createInGameMenu()
|
|||
recipeMenu.page->color = 0;
|
||||
recipeMenu.page->followCamera = 1;
|
||||
recipeMenu.page->position = Vector(scrollx, 400);
|
||||
recipeMenu.page->setText("Page");
|
||||
recipeMenu.page->setText(dsq->continuity.stringBank.get(2006));
|
||||
recipeMenu.page->alpha = 0;
|
||||
addRenderObject(recipeMenu.page, LR_RECIPES);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void GameplayVariables::load()
|
|||
InStream inFile("data/variables.txt");
|
||||
if(!inFile)
|
||||
{
|
||||
core->messageBox("error", "Variables data not found! Aborting...");
|
||||
core->messageBox(dsq->continuity.stringBank.get(2008), dsq->continuity.stringBank.get(2017));
|
||||
exit(1);
|
||||
}
|
||||
std::string s;
|
||||
|
|
|
@ -224,7 +224,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
|||
scr->globeIcon->alpha.stop();
|
||||
scr->globeIcon->alpha.interpolateTo(1, 0.5f, 0, false, true);
|
||||
scr->globeIcon->quad->color.interpolateTo(Vector(0.5f, 0.5f, 0.5f), 0.3f);
|
||||
scr->dlText.setText("Unable to retrieve online mod list.\nCheck your connection and try again."); // TODO: put into stringbank
|
||||
scr->dlText.setText(dsq->continuity.stringBank.get(2021));
|
||||
scr->dlText.alpha = 0;
|
||||
scr->dlText.alpha.ensureData();
|
||||
scr->dlText.alpha.data->path.addPathNode(0, 0);
|
||||
|
@ -257,7 +257,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
|||
{
|
||||
scr->dlText.alpha.stopPath();
|
||||
scr->dlText.alpha.interpolateTo(1, 0.5f);
|
||||
scr->dlText.setText("Server error!\nBad XML, please contact server admin.\nURL: " + rq->url); // TODO: -> stringbank
|
||||
scr->dlText.setText(dsq->continuity.stringBank.get(2022) + " " + rq->url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ void ModDL::NotifyMod(ModRequest *rq, NetEvent ev, size_t recvd, size_t total)
|
|||
if(!ico)
|
||||
{
|
||||
if(ev == NE_FINISH)
|
||||
dsq->centerMessage("Finished downloading mod " + rq->modname, 420); // TODO: -> stringbank
|
||||
dsq->centerMessage(dsq->continuity.stringBank.get(2023) + " " + rq->modname, 420);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ void ModIcon::loadEntry(const ModEntry& entry)
|
|||
|
||||
dsq->mod.loadModXML(&d, entry.path);
|
||||
|
||||
std::string ds = "No Description";
|
||||
std::string ds = dsq->continuity.stringBank.get(2009);
|
||||
|
||||
TiXmlElement *top = d.FirstChildElement("AquariaMod");
|
||||
if (top)
|
||||
|
@ -737,13 +737,13 @@ void ModIconOnline::onClick()
|
|||
if(hasPkgOnDisk())
|
||||
{
|
||||
if(hasUpdate)
|
||||
proceed = dsq->confirm("Download update?"); // TODO: -> stringbank
|
||||
proceed = dsq->confirm(dsq->continuity.stringBank.get(2024));
|
||||
else
|
||||
proceed = dsq->confirm("Mod already exists. Re-download?");
|
||||
proceed = dsq->confirm(dsq->continuity.stringBank.get(2025));
|
||||
}
|
||||
else
|
||||
{
|
||||
dsq->confirm("This mod was installed manually,\nnot messing with it.", "", true);
|
||||
dsq->confirm(dsq->continuity.stringBank.get(2026), "", true);
|
||||
proceed = false;
|
||||
}
|
||||
|
||||
|
@ -825,7 +825,7 @@ void MenuIconBar::init()
|
|||
|
||||
|
||||
ico = new MenuIcon(0);
|
||||
ico->label = "\nBrowse installed mods"; // TODO: -> stringbank
|
||||
ico->label = dsq->continuity.stringBank.get(2027);
|
||||
ico->useQuad("modselect/hdd");
|
||||
y += ico->quad->height;
|
||||
ico->position = Vector(0, y);
|
||||
|
@ -834,7 +834,7 @@ void MenuIconBar::init()
|
|||
|
||||
MenuIcon *prev = ico;
|
||||
ico = new MenuIcon(1);
|
||||
ico->label = "\nBrowse & enable/disable installed patches";
|
||||
ico->label = dsq->continuity.stringBank.get(2028);
|
||||
ico->useQuad("modselect/patch");
|
||||
y += ico->quad->height;
|
||||
ico->position = Vector(0, y);
|
||||
|
@ -844,7 +844,7 @@ void MenuIconBar::init()
|
|||
|
||||
prev = ico;
|
||||
ico = new MenuIcon(2);
|
||||
ico->label = "\nBrowse mods online";
|
||||
ico->label = dsq->continuity.stringBank.get(2029);
|
||||
ico->useQuad("modselect/globe");
|
||||
y += ico->quad->height;
|
||||
ico->position = Vector(0, y);
|
||||
|
@ -855,7 +855,7 @@ void MenuIconBar::init()
|
|||
|
||||
prev = ico;
|
||||
ico = new MenuIcon(3);
|
||||
ico->label = "\nReturn to title";
|
||||
ico->label = dsq->continuity.stringBank.get(2030);
|
||||
ico->useQuad("gui/wok-drop");
|
||||
ico->repeatTextureToFill(false);
|
||||
y += ico->quad->height;
|
||||
|
|
|
@ -132,7 +132,7 @@ void ParticleEditor::load()
|
|||
{
|
||||
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
||||
emitter->stop();
|
||||
std::string pname = dsq->getUserInputString("Particle Name:");
|
||||
std::string pname = dsq->getUserInputString(dsq->continuity.stringBank.get(2018));
|
||||
lastLoadedParticle = pname;
|
||||
emitter->load(pname);
|
||||
emitter->start();
|
||||
|
|
|
@ -435,7 +435,7 @@ void RecipeMenu::createPage(int p)
|
|||
dsq->game->addRenderObject(description, scroll->layer);
|
||||
|
||||
std::ostringstream os2;
|
||||
os2 << "Page " << currentPage+1 << "/" << getNumPages()+1;
|
||||
os2 << dsq->continuity.stringBank.get(2006) << " " << currentPage+1 << "/" << getNumPages()+1;
|
||||
page->setText(os2.str());
|
||||
|
||||
debugLog("done: " + os2.str());
|
||||
|
|
|
@ -285,11 +285,11 @@ void WorldMap::save()
|
|||
WorldMapTile *t = &worldMapTiles[i];
|
||||
out << t->index << " " << t->stringIndex << " " << t->name << " " << t->layer << " " << t->scale << " " << t->gridPos.x << " " << t->gridPos.y << " " << t->prerevealed << " " << t->scale2 << std::endl;
|
||||
}
|
||||
dsq->screenMessage("Saved worldmap data to " + fn);
|
||||
dsq->screenMessage(dsq->continuity.stringBank.get(2019) + " " + fn);
|
||||
}
|
||||
else
|
||||
{
|
||||
dsq->screenMessage("Unable to save worldmap to " + fn);
|
||||
dsq->screenMessage(dsq->continuity.stringBank.get(2020) + " " + fn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue