+ window Style.Default

+ windows error message for dll loading errors
* made identifiers in event match SFML's style


git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1347 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
trass3r 2010-01-11 19:28:34 +00:00
parent 6c44a1d33a
commit 77d248f79e
9 changed files with 127 additions and 130 deletions

View file

@ -41,7 +41,7 @@ import dsfml.graphics.idrawable,
* Package base class of all drawable.
* Provide implementation of IDrawable and functions aliases.
*/
package class Drawableimpl(alias symbol) : DSFMLObject, IDrawable
package class DrawableImpl(alias symbol) : DSFMLObject, IDrawable
{
protected:
this()

View file

@ -66,7 +66,7 @@ public:
* windowStyle = Window style (Resize | Close by default)
* settings = Context settings (default is default ContextSettings values)
*/
this(VideoMode mode, string title, uint windowStyle = Style.RESIZE | Style.CLOSE, ContextSettings settings = ContextSettings())
this(VideoMode mode, string title, uint windowStyle = Style.Default, ContextSettings settings = ContextSettings())
{
super(sfRenderWindow_Create(mode, toStringz(title), windowStyle, &settings));
m_input = new Input(sfRenderWindow_GetInput(m_ptr));
@ -102,7 +102,7 @@ public:
* settings = Context settings (default is default ContextSettings values)
*
*/
void create(VideoMode mode, string title, uint windowStyle = Style.RESIZE | Style.CLOSE, ContextSettings settings = ContextSettings())
void create(VideoMode mode, string title, uint windowStyle = Style.Default, ContextSettings settings = ContextSettings())
{
if (m_ptr !is null)
dispose();

View file

@ -37,7 +37,7 @@ import dsfml.graphics.drawableimpl;
* helper functions to draw simple shapes like
* lines, rectangles, circles, etc.
*/
class Shape : Drawableimpl!("sfShape")
class Shape : DrawableImpl!("sfShape")
{
private:
this (void* ptr)

View file

@ -40,7 +40,7 @@ import dsfml.system.vector2;
* See_Also:
* IDrawable
*/
class Sprite : Drawableimpl!("sfSprite")
class Sprite : DrawableImpl!("sfSprite")
{
private:
Image m_image; //< Image used to draw the sprite
@ -72,7 +72,7 @@ public:
{
super();
m_image = img;
sfSprite_SetImage(m_ptr, img.getNativePointer);
sfSprite_SetImage(m_ptr, img.getNativePointer, true);
setX(left);
setY(top);
setScaleX(scaleX);
@ -86,11 +86,12 @@ public:
*
* Params:
* img = New image
* adjustToNewSize = adjust sprite subrect to new image size
*/
void setImage(Image img)
void setImage(Image img, bool adjustToNewSize = false)
{
assert(img !is null, "Trying to set a null image.");
sfSprite_SetImage(m_ptr, img.getNativePointer);
sfSprite_SetImage(m_ptr, img.getNativePointer, adjustToNewSize);
m_image = img;
}
@ -102,8 +103,7 @@ public:
*/
void setSubRect(IntRect rect)
{
IntRect r = rect;
sfSprite_SetSubRect(m_ptr, &r);
sfSprite_SetSubRect(m_ptr, &rect);
m_subRect = rect;
}
@ -212,7 +212,7 @@ private:
extern (C)
{
typedef void function(void*, void*) pf_sfSprite_SetImage;
typedef void function(void*, void*, bool) pf_sfSprite_SetImage;
typedef void function(void*, IntRect*) pf_sfSprite_SetSubRect;
typedef void function(void*, float, float) pf_sfSprite_Resize;
typedef void function(void*, int) pf_sfSprite_FlipX;

View file

@ -64,7 +64,7 @@ enum TextStyle
* See_Also:
* IDrawable
*/
class Text : Drawableimpl!("sfText")
class Text : DrawableImpl!("sfText")
{
private:
Font m_font;