Use a more standard order of yes/no/cancel/whatever buttons in dialogs
authorPerttu Ahola <celeron55@gmail.com>
Thu, 15 Mar 2012 11:18:21 +0000 (13:18 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 15 Mar 2012 11:18:21 +0000 (13:18 +0200)
src/guiConfirmMenu.cpp
src/guiCreateWorld.cpp

index 2ca4e1791642d2e6f6c6f7b2adfb56e6ba7270d9..00e26ac4232cabde7ff3cccb3f8c5bb3e6f08a50 100644 (file)
@@ -106,15 +106,15 @@ void GUIConfirmMenu::regenerateGui(v2u32 screensize)
        int bw = 100;
        {
                core::rect<s32> rect(0, 0, bw, 30);
-               rect = rect + v2s32(size.X/2-bw/2-bw/2-5, size.Y/2-30/2+25);
-               Environment->addButton(rect, this, GUI_ID_NO,
-                       wgettext("No"));
+               rect = rect + v2s32(size.X/2-bw/2-(bw/2+5), size.Y/2-30/2+25);
+               Environment->addButton(rect, this, GUI_ID_YES,
+                       wgettext("Yes"));
        }
        {
                core::rect<s32> rect(0, 0, bw, 30);
-               rect = rect + v2s32(size.X/2-bw/2+bw/2+5, size.Y/2-30/2+25);
-               Environment->addButton(rect, this, GUI_ID_YES,
-                       wgettext("Yes"));
+               rect = rect + v2s32(size.X/2-bw/2+(bw/2+5), size.Y/2-30/2+25);
+               Environment->addButton(rect, this, GUI_ID_NO,
+                       wgettext("No"));
        }
        changeCtype("C");
 }
index 159e736c36e5d929a109ff3c93661b64b2dedb66..5c70b7c50b1444abf29410b215da619f19f74020 100644 (file)
@@ -155,14 +155,14 @@ void GUICreateWorld::regenerateGui(v2u32 screensize)
        {
                core::rect<s32> rect(0, 0, 120, 30);
                rect = rect + v2s32(170, 140) + topleft;
-               Environment->addButton(rect, this, GUI_ID_CANCEL,
-                       wgettext("Cancel"));
+               Environment->addButton(rect, this, GUI_ID_CREATE,
+                       wgettext("Create"));
        }
        {
                core::rect<s32> rect(0, 0, 120, 30);
                rect = rect + v2s32(300, 140) + topleft;
-               Environment->addButton(rect, this, GUI_ID_CREATE,
-                       wgettext("Create"));
+               Environment->addButton(rect, this, GUI_ID_CANCEL,
+                       wgettext("Cancel"));
        }
        changeCtype("C");
 }