1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-11 22:54:00 +00:00

Hopefully fix the old "song control hint white box" problem, now also for win7.

Has been working fine for XP, though.
This commit is contained in:
fgenesis 2012-09-15 15:37:23 +02:00
parent f97fe12462
commit 42f4c2d1e6

View file

@ -7728,9 +7728,9 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
Vector p = controlHint_mouseLeft->position + Vector(-100,0); Vector p = controlHint_mouseLeft->position + Vector(-100,0);
os.seekp(0); char sbuf[32];
os << "song/songslot-" << dsq->continuity.getSongSlotByType(songType) << '\0'; // ensure correct string termination across compilers sprintf(sbuf, "song/songslot-%d", dsq->continuity.getSongSlotByType(songType));
Quad *q = new Quad(os.str(), p); Quad *q = new Quad(sbuf, p);
q->followCamera = 1; q->followCamera = 1;
q->scale = Vector(0.7, 0.7); q->scale = Vector(0.7, 0.7);
q->alpha = 0; q->alpha = 0;
@ -7743,9 +7743,8 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
{ {
int note = song->notes[i]; int note = song->notes[i];
os.seekp(0); sprintf(sbuf, "song/notebutton-%d", note);
os << "song/notebutton-" << note << '\0'; Quad *q = new Quad(sbuf, p);
Quad *q = new Quad(os.str(), p);
q->color = dsq->getNoteColor(note)*0.5f + Vector(1, 1, 1)*0.5f; q->color = dsq->getNoteColor(note)*0.5f + Vector(1, 1, 1)*0.5f;
q->followCamera = 1; q->followCamera = 1;
q->scale = Vector(1.0, 1.0); q->scale = Vector(1.0, 1.0);