mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Localize error messages in mainmenu (#11495)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
parent
6910c8d920
commit
693f98373b
8 changed files with 97 additions and 46 deletions
|
@ -37,6 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "constants.h"
|
||||
#include "fontengine.h"
|
||||
#include "script/scripting_client.h"
|
||||
#include "gettext.h"
|
||||
|
||||
#define CAMERA_OFFSET_STEP 200
|
||||
#define WIELDMESH_OFFSET_X 55.0f
|
||||
|
@ -133,28 +134,6 @@ void Camera::notifyFovChange()
|
|||
}
|
||||
}
|
||||
|
||||
bool Camera::successfullyCreated(std::string &error_message)
|
||||
{
|
||||
if (!m_playernode) {
|
||||
error_message = "Failed to create the player scene node";
|
||||
} else if (!m_headnode) {
|
||||
error_message = "Failed to create the head scene node";
|
||||
} else if (!m_cameranode) {
|
||||
error_message = "Failed to create the camera scene node";
|
||||
} else if (!m_wieldmgr) {
|
||||
error_message = "Failed to create the wielded item scene manager";
|
||||
} else if (!m_wieldnode) {
|
||||
error_message = "Failed to create the wielded item scene node";
|
||||
} else {
|
||||
error_message.clear();
|
||||
}
|
||||
|
||||
if (m_client->modsLoaded())
|
||||
m_client->getScript()->on_camera_ready(this);
|
||||
|
||||
return error_message.empty();
|
||||
}
|
||||
|
||||
// Returns the fractional part of x
|
||||
inline f32 my_modf(f32 x)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue