- char sbuf[256];
- if ((float)newscreenwidth > (float)newscreenheight * 1.61 || (float)newscreenwidth < (float)newscreenheight * 1.59)
- sprintf (sbuf, "Resolution: %d*%d", (int)newscreenwidth, (int)newscreenheight);
- else
- sprintf (sbuf, "Resolution: %d*%d (widescreen)", (int)newscreenwidth, (int)newscreenheight);
- Menu::setText(0, sbuf);
- Menu::setText(14, fullscreen ? "Fullscreen: On" : "Fullscreen: Off");
- if (newdetail == 0) Menu::setText(1, "Detail: Low");
- if (newdetail == 1) Menu::setText(1, "Detail: Medium");
- if (newdetail == 2) Menu::setText(1, "Detail: High");
- if (bloodtoggle == 0) Menu::setText(2, "Blood: Off");
- if (bloodtoggle == 1) Menu::setText(2, "Blood: On, low detail");
- if (bloodtoggle == 2) Menu::setText(2, "Blood: On, high detail (slower)");
- if (difficulty == 0) Menu::setText(3, "Difficulty: Easier");
- if (difficulty == 1) Menu::setText(3, "Difficulty: Difficult");
- if (difficulty == 2) Menu::setText(3, "Difficulty: Insane");
- Menu::setText(4, ismotionblur ? "Blur Effects: Enabled (less compatible)" : "Blur Effects: Disabled (more compatible)");
- Menu::setText(5, decals ? "Decals: Enabled (slower)" : "Decals: Disabled");
- Menu::setText(6, musictoggle ? "Music: Enabled" : "Music: Disabled");
- Menu::setText(9, invertmouse ? "Invert mouse: Yes" : "Invert mouse: No");
- sprintf (sbuf, "Mouse Speed: %d", (int)(usermousesensitivity * 5));
- Menu::setText(10, sbuf);
- sprintf (sbuf, "Volume: %d%%", (int)(volume * 100));
- Menu::setText(11, sbuf);
- Menu::setText(13, showdamagebar ? "Damage Bar: On" : "Damage Bar: Off");
- if (newdetail == detail && newscreenheight == (int)screenheight && newscreenwidth == (int)screenwidth)
- sprintf (sbuf, "Back");
- else
- sprintf (sbuf, "Back (some changes take effect next time Lugaru is opened)");
- Menu::setText(8, sbuf);
+ std::string sbuf = std::string("Resolution: ") + to_string(newscreenwidth) + "*" + to_string(newscreenheight);
+ if (((float)newscreenwidth <= (float)newscreenheight * 1.61) && ((float)newscreenwidth >= (float)newscreenheight * 1.59)) {
+ sbuf += " (widescreen)";
+ }
+ setText(0, sbuf);
+ setText(14, fullscreen ? "Fullscreen: On" : "Fullscreen: Off");
+ if (newdetail == 0) setText(1, "Detail: Low");
+ if (newdetail == 1) setText(1, "Detail: Medium");
+ if (newdetail == 2) setText(1, "Detail: High");
+ if (bloodtoggle == 0) setText(2, "Blood: Off");
+ if (bloodtoggle == 1) setText(2, "Blood: On, low detail");
+ if (bloodtoggle == 2) setText(2, "Blood: On, high detail (slower)");
+ if (difficulty == 0) setText(3, "Difficulty: Easier");
+ if (difficulty == 1) setText(3, "Difficulty: Difficult");
+ if (difficulty == 2) setText(3, "Difficulty: Insane");
+ setText(4, ismotionblur ? "Blur Effects: Enabled (less compatible)" : "Blur Effects: Disabled (more compatible)");
+ setText(5, decals ? "Decals: Enabled (slower)" : "Decals: Disabled");
+ setText(6, musictoggle ? "Music: Enabled" : "Music: Disabled");
+ setText(9, invertmouse ? "Invert mouse: Yes" : "Invert mouse: No");
+ setText(10, std::string("Mouse Speed: ") + to_string(int(usermousesensitivity * 5)));
+ setText(11, std::string("Volume: ") + to_string(int(volume * 100)) + "%");
+ setText(13, showdamagebar ? "Damage Bar: On" : "Damage Bar: Off");
+ if ((newdetail == detail) && (newscreenheight == (int)screenheight) && (newscreenwidth == (int)screenwidth)) {
+ setText(8, "Back");
+ } else {
+ setText(8, "Back (some changes take effect next time Lugaru is opened)");
+ }