Commit 4b370145 authored by bitplane's avatar bitplane

changed all video driver creation failure log messages to use ELL_ERROR (like the windows device).

all devices now log an error message if the video driver is unknown.
fixed serialization of new variables in IGUIEditBox.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@750 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 70230e1b
Changes in version 1.4 (... 2007) Changes in version 1.4 (... 2007)
- createDevice now reports errors if the driverType is unknown, previously it
created a window but populated it with a null driver without any warning.
- Fixed a bug in CBillboardTextSceneNode::setText where the old text was not cleared. - Fixed a bug in CBillboardTextSceneNode::setText where the old text was not cleared.
- IGUIElement now calls getter and setter functions when serializing, - IGUIElement now calls getter and setter functions when serializing,
in case people override them. in case people override them.
- Added setDrawBorder and setTextAlignment to IGUIEditBox and IGUIStaticText. - Added setDrawBorder and setTextAlignment to IGUIStaticText.
- IGUIEditBox now supports multiple lines, use setWordWrap and/or setMultiLine. - IGUIEditBox new methods:
When MultiLine is true, the edit box inserts a newline instead of sending setWordWrap/isWordWrapEnabled, to split words on to the next line.
setMultiLine and isMultiLineEnabled, inserts a newline instead of sending
EGET_EDITBOX_ENTER events. EGET_EDITBOX_ENTER events.
setTextAlignment, to align the text to left, right, top, bottom and centers
setAutoScroll, to enable and disable automatic scrolling with the cursor
- Added IGUISpinBox, by Michael Zeilfelder (CuteAlien). - Added IGUISpinBox, by Michael Zeilfelder (CuteAlien).
......
...@@ -1236,6 +1236,8 @@ void CGUIEditBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWr ...@@ -1236,6 +1236,8 @@ void CGUIEditBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWr
// out->addFont("OverrideFont",OverrideFont); // out->addFont("OverrideFont",OverrideFont);
out->addInt ("MaxChars", Max); out->addInt ("MaxChars", Max);
out->addBool ("WordWrap", WordWrap); out->addBool ("WordWrap", WordWrap);
out->addBool ("MultiLine", MultiLine);
out->addBool ("AutoScroll", AutoScroll);
out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames);
out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames);
...@@ -1250,6 +1252,9 @@ void CGUIEditBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadW ...@@ -1250,6 +1252,9 @@ void CGUIEditBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadW
setOverrideColor(in->getAttributeAsColor("OverrideColor")); setOverrideColor(in->getAttributeAsColor("OverrideColor"));
enableOverrideColor(in->getAttributeAsBool("OverrideColorEnabled")); enableOverrideColor(in->getAttributeAsBool("OverrideColorEnabled"));
setMax(in->getAttributeAsInt("MaxChars")); setMax(in->getAttributeAsInt("MaxChars"));
setWordWrap(in->getAttributeAsBool("WordWrap"));
setMultiLine(in->getAttributeAsBool("MultiLine"));
setAutoScroll(in->getAttributeAsBool("AutoScroll"));
setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames),
(EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames));
......
...@@ -611,7 +611,7 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize, ...@@ -611,7 +611,7 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize,
#ifdef _IRR_COMPILE_WITH_SOFTWARE_ #ifdef _IRR_COMPILE_WITH_SOFTWARE_
VideoDriver = video::createSoftwareDriver(windowSize, Fullscreen, FileSystem, this); VideoDriver = video::createSoftwareDriver(windowSize, Fullscreen, FileSystem, this);
#else #else
os::Printer::log("No Software driver support compiled in.", ELL_WARNING); os::Printer::log("No Software driver support compiled in.", ELL_ERROR);
#endif #endif
break; break;
...@@ -619,7 +619,7 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize, ...@@ -619,7 +619,7 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize,
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
VideoDriver = video::createSoftwareDriver2(windowSize, Fullscreen, FileSystem, this); VideoDriver = video::createSoftwareDriver2(windowSize, Fullscreen, FileSystem, this);
#else #else
os::Printer::log("Burning's video driver was not compiled in.", ELL_WARNING); os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);
#endif #endif
break; break;
...@@ -628,25 +628,29 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize, ...@@ -628,25 +628,29 @@ void CIrrDeviceLinux::createDriver(const core::dimension2d<s32>& windowSize,
if (Context) if (Context)
VideoDriver = video::createOpenGLDriver(windowSize, Fullscreen, StencilBuffer, FileSystem, vsync, AntiAlias); VideoDriver = video::createOpenGLDriver(windowSize, Fullscreen, StencilBuffer, FileSystem, vsync, AntiAlias);
#else #else
os::Printer::log("No OpenGL support compiled in.", ELL_WARNING); os::Printer::log("No OpenGL support compiled in.", ELL_ERROR);
#endif #endif
break; break;
case video::EDT_DIRECT3D8: case video::EDT_DIRECT3D8:
case video::EDT_DIRECT3D9: case video::EDT_DIRECT3D9:
os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.", os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.",
ELL_WARNING); ELL_ERROR);
break; break;
default: case video::EDT_NULL:
VideoDriver = video::createNullDriver(FileSystem, windowSize); VideoDriver = video::createNullDriver(FileSystem, windowSize);
break; break;
default:
os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR);
break;
#else #else
case video::EDT_NULL: case video::EDT_NULL:
VideoDriver = video::createNullDriver(FileSystem, windowSize); VideoDriver = video::createNullDriver(FileSystem, windowSize);
break; break;
default: default:
os::Printer::log("No X11 support compiled in. Only Null driver available.", ELL_WARNING); os::Printer::log("No X11 support compiled in. Only Null driver available.", ELL_ERROR);
break; break;
#endif #endif
} }
......
...@@ -157,14 +157,14 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType, ...@@ -157,14 +157,14 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType,
{ {
case video::EDT_DIRECT3D8: case video::EDT_DIRECT3D8:
case video::EDT_DIRECT3D9: case video::EDT_DIRECT3D9:
os::Printer::log("This driver is not available in SDL."); os::Printer::log("This driver is not available in SDL.", ELL_ERROR);
break; break;
case video::EDT_SOFTWARE: case video::EDT_SOFTWARE:
#ifdef _IRR_COMPILE_WITH_SOFTWARE_ #ifdef _IRR_COMPILE_WITH_SOFTWARE_
VideoDriver = video::createSoftwareDriver(windowSize, Fullscreen, FileSystem, this); VideoDriver = video::createSoftwareDriver(windowSize, Fullscreen, FileSystem, this);
#else #else
os::Printer::log("No Software driver support compiled in.", ELL_WARNING); os::Printer::log("No Software driver support compiled in.", ELL_ERROR);
#endif #endif
break; break;
...@@ -172,7 +172,7 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType, ...@@ -172,7 +172,7 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType,
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
VideoDriver = video::createSoftwareDriver2(windowSize, Fullscreen, FileSystem, this); VideoDriver = video::createSoftwareDriver2(windowSize, Fullscreen, FileSystem, this);
#else #else
os::Printer::log("Burning's video driver was not compiled in.", ELL_WARNING); os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);
#endif #endif
break; break;
...@@ -180,13 +180,17 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType, ...@@ -180,13 +180,17 @@ void CIrrDeviceSDL::createDriver(video::E_DRIVER_TYPE driverType,
#ifdef _IRR_COMPILE_WITH_OPENGL_ #ifdef _IRR_COMPILE_WITH_OPENGL_
VideoDriver = video::createOpenGLDriver(windowSize, Fullscreen, Stencilbuffer, FileSystem, Vsync, AntiAlias); VideoDriver = video::createOpenGLDriver(windowSize, Fullscreen, Stencilbuffer, FileSystem, Vsync, AntiAlias);
#else #else
os::Printer::log("No OpenGL support compiled in.", ELL_WARNING); os::Printer::log("No OpenGL support compiled in.", ELL_ERROR);
#endif #endif
break; break;
default: case video::EDT_NULL:
VideoDriver = video::createNullDriver(FileSystem, windowSize); VideoDriver = video::createNullDriver(FileSystem, windowSize);
break; break;
default:
os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR);
break;
} }
} }
......
...@@ -516,10 +516,14 @@ void CIrrDeviceWin32::createDriver(video::E_DRIVER_TYPE driverType, ...@@ -516,10 +516,14 @@ void CIrrDeviceWin32::createDriver(video::E_DRIVER_TYPE driverType,
#endif #endif
break; break;
default: case video::EDT_NULL:
// create null driver // create null driver
VideoDriver = video::createNullDriver(FileSystem, windowSize); VideoDriver = video::createNullDriver(FileSystem, windowSize);
break; break;
default:
os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR);
break;
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment