ochess/src/binres/binres.cpp

40 lines
1.1 KiB
C++
Raw Normal View History

2022-02-23 18:11:55 +01:00
#include "binres.hpp"
2023-05-10 10:49:31 +02:00
// Embedded PGNs:
#include "swap_png.hpp"
#include "zoomin_png.hpp"
#include "zoomout_png.hpp"
#include "cburnett_png.hpp"
#include "chesscom_8bits_png.hpp"
#include "hide_png.hpp"
#include "mat_png.hpp"
#include "ochess_png.hpp"
2022-02-23 18:11:55 +01:00
wxBitmap LoadPNG(std::string icon, wxSize size) {
wxImage img = LoadPNG(icon).ConvertToImage();
return (wxBitmap(
img.Scale(size.GetWidth(), size.GetHeight(), wxIMAGE_QUALITY_HIGH)));
}
wxBitmap LoadPNG(std::string icon) {
if (icon == "swap") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(swap));
2022-02-23 18:11:55 +01:00
} else if (icon == "zoomin") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(zoomin));
2022-02-23 18:11:55 +01:00
} else if (icon == "zoomout") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(zoomout));
2022-02-23 18:11:55 +01:00
} else if (icon == "cburnett") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(cburnett));
2022-02-23 18:11:55 +01:00
} else if (icon == "chesscom_8bits") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(chesscom_8bits));
2022-02-23 18:11:55 +01:00
} else if (icon == "hide") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(hide));
2023-01-02 10:56:27 +01:00
} else if (icon == "mat") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(mat));
2023-02-02 08:56:46 +01:00
} else if (icon == "ochess") {
2023-05-09 21:59:35 +02:00
return (wxBITMAP_PNG_FROM_DATA(ochess));
2022-02-23 18:11:55 +01:00
}
return (wxNullBitmap);
2023-01-16 14:55:48 +01:00
}