mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
GUI: U32: Use u32 for EditRecordDialog and RecorderDialog
- Mark _authors as U32String - Adjust accordingly in EditRecordDialog - Some janitorial whitespaces fixes
This commit is contained in:
parent
7a19c7ffee
commit
cbff58200f
@ -27,11 +27,11 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
const Common::String EditRecordDialog::getAuthor() {
|
||||
const Common::U32String EditRecordDialog::getAuthor() {
|
||||
return _authorEdit->getEditString();
|
||||
}
|
||||
|
||||
void EditRecordDialog::setAuthor(const Common::String &author) {
|
||||
void EditRecordDialog::setAuthor(const Common::U32String &author) {
|
||||
_authorEdit->setEditString(author);
|
||||
}
|
||||
|
||||
@ -54,13 +54,13 @@ void EditRecordDialog::setName(const Common::String &name) {
|
||||
EditRecordDialog::~EditRecordDialog() {
|
||||
}
|
||||
|
||||
EditRecordDialog::EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes) : Dialog("EditRecordDialog") {
|
||||
new StaticTextWidget(this,"EditRecordDialog.AuthorLabel",_("Author:"));
|
||||
new StaticTextWidget(this,"EditRecordDialog.NameLabel",_("Name:"));
|
||||
new StaticTextWidget(this,"EditRecordDialog.NotesLabel",_("Notes:"));
|
||||
_authorEdit = new EditTextWidget(this, "EditRecordDialog.AuthorEdit","");
|
||||
_notesEdit = new EditTextWidget(this, "EditRecordDialog.NotesEdit","");
|
||||
_nameEdit = new EditTextWidget(this, "EditRecordDialog.NameEdit","");
|
||||
EditRecordDialog::EditRecordDialog(const Common::U32String author, const Common::String name, const Common::String notes) : Dialog("EditRecordDialog") {
|
||||
new StaticTextWidget(this, "EditRecordDialog.AuthorLabel" , _("Author:"));
|
||||
new StaticTextWidget(this, "EditRecordDialog.NameLabel", _("Name:"));
|
||||
new StaticTextWidget(this, "EditRecordDialog.NotesLabel", _("Notes:"));
|
||||
_authorEdit = new EditTextWidget(this, "EditRecordDialog.AuthorEdit", Common::U32String(""));
|
||||
_notesEdit = new EditTextWidget(this, "EditRecordDialog.NotesEdit", Common::U32String(""));
|
||||
_nameEdit = new EditTextWidget(this, "EditRecordDialog.NameEdit", Common::U32String(""));
|
||||
_authorEdit->setEditString(author);
|
||||
_notesEdit->setEditString(notes);
|
||||
_nameEdit->setEditString(name);
|
||||
|
@ -37,14 +37,14 @@ private:
|
||||
EditTextWidget *_authorEdit;
|
||||
EditRecordDialog() : Dialog("EditRecordDialog") {};
|
||||
public:
|
||||
EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes);
|
||||
EditRecordDialog(const Common::U32String author, const Common::String name, const Common::String notes);
|
||||
~EditRecordDialog() override;
|
||||
|
||||
const Common::String getAuthor();
|
||||
const Common::U32String getAuthor();
|
||||
const Common::String getNotes();
|
||||
const Common::String getName();
|
||||
|
||||
void setAuthor(const Common::String &author);
|
||||
void setAuthor(const Common::U32String &author);
|
||||
void setNotes(const Common::String &desc);
|
||||
void setName(const Common::String &name);
|
||||
|
||||
|
@ -78,9 +78,9 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(nullptr), _cu
|
||||
_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
|
||||
_container = new GUI::ContainerWidget(this, "RecorderDialog.Thumbnail");
|
||||
if (g_gui.xmlEval()->getVar("Globals.RecorderDialog.ExtInfo.Visible") == 1) {
|
||||
new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", Common::U32String(""), kPrevScreenshotCmd);
|
||||
new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", Common::U32String(""), kNextScreenshotCmd);
|
||||
_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", "0/0");
|
||||
new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", Common::U32String("<"), Common::U32String(""), kPrevScreenshotCmd);
|
||||
new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", Common::U32String(">"), Common::U32String(""), kNextScreenshotCmd);
|
||||
_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", Common::U32String("0/0"));
|
||||
_authorText = new StaticTextWidget(this, "RecorderDialog.Author", _("Author: "));
|
||||
_notesText = new StaticTextWidget(this, "RecorderDialog.Notes", _("Notes: "));
|
||||
}
|
||||
@ -168,7 +168,7 @@ void RecorderDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||
TimeDate t;
|
||||
QualifiedGameDescriptor desc = EngineMan.findTarget(_target);
|
||||
g_system->getTimeAndDate(t);
|
||||
EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, Common::U32String(""));
|
||||
EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, "");
|
||||
if (editDlg.runModal() != kOKCmd) {
|
||||
return;
|
||||
}
|
||||
@ -197,7 +197,7 @@ void RecorderDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||
|
||||
void RecorderDialog::updateList() {
|
||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||
Common::String pattern(_target+".r??");
|
||||
Common::String pattern(_target + ".r??");
|
||||
Common::StringArray files = saveFileMan->listSavefiles(pattern);
|
||||
Common::PlaybackFile file;
|
||||
Common::StringArray namesList;
|
||||
@ -237,8 +237,8 @@ void RecorderDialog::updateSelection(bool redraw) {
|
||||
_currentScreenshot = 0;
|
||||
updateScreenShotsText();
|
||||
if (_list->getSelected() >= 0) {
|
||||
_authorText->setLabel(_("Author: ") + _fileHeaders[_list->getSelected()].author);
|
||||
_notesText->setLabel(_("Notes: ") + _fileHeaders[_list->getSelected()].notes);
|
||||
_authorText->setLabel(_("Author: ") + Common::U32String(_fileHeaders[_list->getSelected()].author));
|
||||
_notesText->setLabel(_("Notes: ") + Common::U32String(_fileHeaders[_list->getSelected()].notes));
|
||||
|
||||
_firstScreenshotUpdate = true;
|
||||
updateScreenshot();
|
||||
|
@ -60,9 +60,9 @@ private:
|
||||
void updateSelection(bool redraw);
|
||||
void updateScreenshot();
|
||||
public:
|
||||
Common::String _author;
|
||||
Common::String _name;
|
||||
Common::String _notes;
|
||||
Common::U32String _author;
|
||||
Common::String _name;
|
||||
Common::String _notes;
|
||||
enum DialogResult {
|
||||
kRecordDialogClose,
|
||||
kRecordDialogRecord,
|
||||
|
Loading…
x
Reference in New Issue
Block a user