mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Add "smooth" property to graphics module
This is just a simple bind and addition of a “smooth” property in the graphics module, to fix fatal issue #2
This commit is contained in:
parent
544fd78753
commit
0a1d9c570f
4 changed files with 12 additions and 0 deletions
Binary file not shown.
|
|
@ -198,6 +198,7 @@ RB_METHOD(graphicsPlayMovie)
|
|||
DEF_GRA_PROP_I(FrameRate)
|
||||
DEF_GRA_PROP_I(FrameCount)
|
||||
DEF_GRA_PROP_I(Brightness)
|
||||
DEF_GRA_PROP_B(Smooth)
|
||||
|
||||
DEF_GRA_PROP_B(Fullscreen)
|
||||
DEF_GRA_PROP_B(ShowCursor)
|
||||
|
|
@ -240,6 +241,8 @@ void graphicsBindingInit()
|
|||
_rb_define_module_function(module, "play_movie", graphicsPlayMovie);
|
||||
}
|
||||
|
||||
INIT_GRA_PROP_BIND( Smooth, "smooth" );
|
||||
|
||||
INIT_GRA_PROP_BIND( Fullscreen, "fullscreen" );
|
||||
INIT_GRA_PROP_BIND( ShowCursor, "show_cursor" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -472,6 +472,7 @@ struct GraphicsPrivate
|
|||
int frameRate;
|
||||
int frameCount;
|
||||
int brightness;
|
||||
bool smooth;
|
||||
|
||||
FPSLimiter fpsLimiter;
|
||||
|
||||
|
|
@ -935,6 +936,13 @@ void Graphics::fadein(int duration)
|
|||
}
|
||||
}
|
||||
|
||||
DEF_ATTR_RD_SIMPLE(Graphics, Smooth, bool, p->smooth)
|
||||
|
||||
void Graphics::setSmooth(bool value)
|
||||
{
|
||||
p->smooth = value;
|
||||
}
|
||||
|
||||
Bitmap *Graphics::snapToBitmap()
|
||||
{
|
||||
Bitmap *bitmap = new Bitmap(width(), height());
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ public:
|
|||
DECL_ATTR( FrameRate, int )
|
||||
DECL_ATTR( FrameCount, int )
|
||||
DECL_ATTR( Brightness, int )
|
||||
DECL_ATTR( Smooth, bool )
|
||||
|
||||
void wait(int duration);
|
||||
void fadeout(int duration);
|
||||
|
|
|
|||
Loading…
Reference in a new issue