Initial commit of source code
This commit is contained in:
26
src/resources/resources.h
Normal file
26
src/resources/resources.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/animate.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/mstream.h>
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------
|
||||
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
||||
inline wxBitmap _wxGetBitmapFromMemory(const unsigned char *data, int length)
|
||||
{
|
||||
wxMemoryInputStream is(data, length);
|
||||
return { wxImage(is, wxBITMAP_TYPE_ANY, -1), -1 };
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
#define wxGetAnimationFromMemory(name) _wxGetAnimationFromMemory(name, sizeof(name))
|
||||
inline wxAnimation _wxGetAnimationFromMemory(const unsigned char *data, int length)
|
||||
{
|
||||
wxAnimation animate;
|
||||
wxMemoryInputStream is(data, length);
|
||||
animate.Load(is);
|
||||
return animate;
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
Reference in New Issue
Block a user