diff --git a/[editor]/editor_gui/client/buttonclicked.lua b/[editor]/editor_gui/client/buttonclicked.lua index 5a6d6e81c..c02c832a5 100644 --- a/[editor]/editor_gui/client/buttonclicked.lua +++ b/[editor]/editor_gui/client/buttonclicked.lua @@ -59,7 +59,7 @@ end function topMenuClicked.new () editor_main.dropElement () guiSetInputEnabled(true) - local yes,no = guiShowMessageBox ( "Are you sure you want to create a new map?\nAny unsaved data will be lost.", "info", "New", true, "Yes", "No" ) + local yes,no = guiShowMessageBox ( "New", "Are you sure you want to create a new map?\nAny unsaved data will be lost.", "question", "yesno" ) addEventHandler ( "onClientGUIClick",yes,function() editor_main.newResource() guiSetInputEnabled(false) diff --git a/[editor]/editor_gui/client/load.lua b/[editor]/editor_gui/client/load.lua index 5898a29fd..9bb5415fe 100644 --- a/[editor]/editor_gui/client/load.lua +++ b/[editor]/editor_gui/client/load.lua @@ -34,7 +34,7 @@ function openMap() local row = guiGridListGetSelectedItem ( loadDialog.mapsList ) if row == -1 then return end mapName = guiGridListGetItemText ( loadDialog.mapsList, row, 1 ) - open = guiShowMessageBox ( "Are you sure you want to load map \""..mapName.."\"?\nAny unsaved changes will be lost.", "info", "Are you sure?", true, "Open", "Cancel" ) + open = guiShowMessageBox("Are you sure?", "Are you sure you want to load map \""..mapName.."\"?\nAny unsaved changes will be lost.", "question", "yesno") addEventHandler ( "onClientGUIClick", open, openButton, false ) end diff --git a/[editor]/editor_gui/client/locations.lua b/[editor]/editor_gui/client/locations.lua index 4061b407d..6c35b0c04 100644 --- a/[editor]/editor_gui/client/locations.lua +++ b/[editor]/editor_gui/client/locations.lua @@ -102,11 +102,11 @@ function addBookmark () local z = locations.z:getValue() local world = locations.world:getValue() if name == "" then - guiShowMessageBox ( 'No location name was specified!', "error", "Bad value", true ) + guiShowMessageBox("Bad value", "No location name was specified!", "error", "ok") return end if bookmarksTable[name] then - guiShowMessageBox ( 'A location of name "'..name..'" already exists!', "error", "Conflict", true ) + guiShowMessageBox("Conflict", 'A location of name "'..name..'" already exists!', "error", "ok") return end bookmarksTable[name] = {} @@ -192,15 +192,15 @@ end function setLocation ( x,y,z,world ) if not x then - local button = guiShowMessageBox ( "Invalid \"x position\" specified", "error", "Bad Value", true ) + local button = guiShowMessageBox("Bad Value", "Invalid \"x position\" specified", "error", "ok") return end if not y then - local button = guiShowMessageBox ( "Invalid \"y position\" specified", "error", "Bad Value", true ) + local button = guiShowMessageBox("Bad Value", "Invalid \"y position\" specified", "error", "ok") return end if not z then - local button = guiShowMessageBox ( "Invalid \"z position\" specified", "error", "Bad Value", true ) + local button = guiShowMessageBox("Bad Value", "Invalid \"z position\" specified", "error", "ok") return end if not world then diff --git a/[editor]/editor_gui/client/mapsettings_gui.lua b/[editor]/editor_gui/client/mapsettings_gui.lua index 8d520e1a9..6fd979a5d 100644 --- a/[editor]/editor_gui/client/mapsettings_gui.lua +++ b/[editor]/editor_gui/client/mapsettings_gui.lua @@ -170,29 +170,29 @@ end function confirmMapSettings () local versionText = mapsettings.metaVersion:getValue() if not versionText or not (( string.match (versionText, "^%d+$") ) or ( string.match (versionText, "^%d+%.%d+$") ) or ( string.match (versionText, "^%d+%.%d+%.%d+$") )) then - guiShowMessageBox ( "Invalid META \"Version\" specified", "error", "Bad Value", true ) + guiShowMessageBox("Bad Value", "Invalid META \"Version\" specified", "error", "ok") return end if not mapsettings.timeHour:getValue() or not mapsettings.timeMinute:getValue() or mapsettings.timeHour:getValue() > 23 or mapsettings.timeMinute:getValue() > 59 then - guiShowMessageBox ( "Invalid Time specified", "error", "Bad Value", true ) + guiShowMessageBox("Bad value", "Invalid Time specified", "error", "ok" ) return end -- if mapsettings.metaAuthor:getValue() == "" then - -- guiShowMessageBox ( "Invalid META \"Author\" specified", "error", "Bad Value", true ) + -- guiShowMessageBox("Bad Value", "Invalid META \"Author\" specified", "error", true) -- return -- end if not tonumber(mapsettings.maxplayers:getValue()) then - guiShowMessageBox ( 'Invalid "Maximum Players" specified', "error", "Bad Value", true ) + guiShowMessageBox("Bad Value", 'Invalid "Maximum Players" specified', "error", "ok") return end if not tonumber(mapsettings.minplayers:getValue()) then - guiShowMessageBox ( 'Invalid "Minimum Players" specified', "error", "Bad Value", true ) + guiShowMessageBox("Bad Value", 'Invalid "Minimum Players" specified', "error", "ok") return end if mapsettings.minplayers:getValue() >= mapsettings.maxplayers:getValue() then - guiShowMessageBox ( 'Invalid "Minimum Players" specified', "error", "Bad Value", true ) + guiShowMessageBox("Bad Value", 'Invalid "Minimum Players" specified', "error", "ok") return end if not tonumber(mapsettings.gamespeed:getValue()) then diff --git a/[editor]/editor_gui/client/me_gui.lua b/[editor]/editor_gui/client/me_gui.lua index e7477c8f3..5dbbf1f78 100644 --- a/[editor]/editor_gui/client/me_gui.lua +++ b/[editor]/editor_gui/client/me_gui.lua @@ -370,9 +370,8 @@ function playSoundFrontEnd ( sound ) return returnValue end -function guiShowMessageBox ( message, boxType, title, forced, button1, button2, button3 ) - playSoundFrontEnd ( 5 ) - local a1,a2,a3 = msgbox.guiShowMessageBox ( message, boxType, title, forced, button1, button2, button3 ) +function guiShowMessageBox ( title, msg, type, buttons ) + local a1,a2,a3 = msgbox.createMessageBox( title, msg, type, buttons ) return a1,a2,a3 end diff --git a/[editor]/editor_gui/client/save.lua b/[editor]/editor_gui/client/save.lua index b82508a9d..3978a896c 100644 --- a/[editor]/editor_gui/client/save.lua +++ b/[editor]/editor_gui/client/save.lua @@ -54,19 +54,14 @@ function saveMap() mapName = guiGetText ( saveDialog.mapName ) if mapName == "" then return end if mapsInfo[string.lower(mapName)] then - local save,cancel = guiShowMessageBox ( "Are you sure you want to overwrite map \""..mapName.."\"?\n" .. - "This will cause original map data to be lost.", - "info", "Are you sure?", true, "Save", "Cancel" ) + local save,cancel = guiShowMessageBox ( "Are you sure?", "Are you sure you want to overwrite map \""..mapName.."\"?\n" .. "This will cause original map data to be lost.", "question", "yesno" ) addEventHandler ( "onClientGUIClick", save, saveButton, false ) addEventHandler ( "onClientGUIClick", cancel, restoreSaveDialog, false ) guiSetProperty(saveDialog.window, "Disabled", "True") elseif resourcesInfo[string.lower(mapName)] then - guiShowMessageBox ( "Unable to save to \""..mapName.."\". \n" .. - "You cannot overwrite non-map resources.", - "error", "Cannot save", true ) + guiShowMessageBox ( "Cannot save", "Unable to save to \""..mapName.."\". \n" .. "You cannot overwrite non-map resources.", "error", "ok" ) else - local save,cancel = guiShowMessageBox ( "Are you sure you want to save to \""..mapName.."\"?", - "info", "Are you sure?", true, "Save", "Cancel" ) + local save,cancel = guiShowMessageBox ( "Are you sure?", "Are you sure you want to save to \""..mapName.."\"?", "question", "yesno") addEventHandler ( "onClientGUIClick", save, saveButton, false ) addEventHandler ( "onClientGUIClick", cancel, restoreSaveDialog, false ) guiSetProperty(saveDialog.window, "Disabled", "True") diff --git a/[editor]/editor_main/client/saveloadtest_client.lua b/[editor]/editor_main/client/saveloadtest_client.lua index 028c158da..7ad94606b 100644 --- a/[editor]/editor_main/client/saveloadtest_client.lua +++ b/[editor]/editor_main/client/saveloadtest_client.lua @@ -17,22 +17,22 @@ addEventHandler ( "saveloadtest_return", root, end editor_gui.closeLoadDialog() else - editor_gui.guiShowMessageBox ( "Map resource could not be started!", "error", "Error", true ) + editor_gui.guiShowMessageBox ( "Error", "Map resource could not be started!", "error", "ok" ) end elseif ( command ) == "save" then if ( returnValue ) then editor_gui.closeSaveDialog() else - editor_gui.guiShowMessageBox ( "Map resource could not be saved! "..reason, "error", "Error", true ) + editor_gui.guiShowMessageBox ( "Error", "Map resource could not be saved! "..reason, "error", "ok" ) editor_gui.restoreSaveDialog() end elseif ( command ) == "quickSave" then reason = reason or "The target resource may be in .zip format or corrupted." - editor_gui.guiShowMessageBox ( "Map resource could not be saved! "..reason, "error", "Error", true ) + editor_gui.guiShowMessageBox ( "Error", "Map resource could not be saved! "..reason, "error", "ok" ) editor_gui.restoreSaveDialog() elseif ( command ) == "test" then reason = reason or "" - editor_gui.guiShowMessageBox ( "Test could not be started! "..reason, "error", "Error", true ) + editor_gui.guiShowMessageBox ( "Error", "Test could not be started! "..reason, "error", "ok" ) editor_gui.stopTest() elseif ( command == "close" ) then editor_gui.closeSaveDialog() diff --git a/[editor]/msgbox/images/error.png b/[editor]/msgbox/images/error.png deleted file mode 100644 index 7d188fd13..000000000 Binary files a/[editor]/msgbox/images/error.png and /dev/null differ diff --git a/[editor]/msgbox/images/info.png b/[editor]/msgbox/images/info.png deleted file mode 100644 index 3e1256adb..000000000 Binary files a/[editor]/msgbox/images/info.png and /dev/null differ diff --git a/[editor]/msgbox/images/question.png b/[editor]/msgbox/images/question.png deleted file mode 100644 index a3f863e61..000000000 Binary files a/[editor]/msgbox/images/question.png and /dev/null differ diff --git a/[editor]/msgbox/images/warning.png b/[editor]/msgbox/images/warning.png deleted file mode 100644 index d04fdcf93..000000000 Binary files a/[editor]/msgbox/images/warning.png and /dev/null differ diff --git a/[editor]/msgbox/meta.xml b/[editor]/msgbox/meta.xml deleted file mode 100644 index a8a364d7e..000000000 --- a/[editor]/msgbox/meta.xml +++ /dev/null @@ -1,9 +0,0 @@ - -