GUI: U32: Fix compilation errors across entire project

After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
This commit is contained in:
aryanrawlani28 2020-06-17 01:27:23 +05:30 committed by Eugene Sandulenko
parent fd763b61e5
commit bed05ea134
88 changed files with 271 additions and 247 deletions

View file

@ -100,6 +100,12 @@ MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String
new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog
}
MessageDialog::MessageDialog(const char *message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment)
: Dialog(30, 20, 260, 124) {
MessageDialog::MessageDialog(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment);
}
void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
// FIXME: It's a really bad thing that we use two arbitrary constants
if (cmd == kOkCmd) {