mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-18 03:42:02 +00:00
24 lines
702 B
C++
24 lines
702 B
C++
![]() |
#include "binres.hpp"
|
||
|
|
||
|
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") {
|
||
|
return (wxBITMAP_PNG(swap));
|
||
|
} else if (icon == "zoomin") {
|
||
|
return (wxBITMAP_PNG(zoomin));
|
||
|
} else if (icon == "zoomout") {
|
||
|
return (wxBITMAP_PNG(zoomout));
|
||
|
} else if (icon == "cburnett") {
|
||
|
return (wxBITMAP_PNG(cburnett));
|
||
|
} else if (icon == "chesscom_8bits") {
|
||
|
return (wxBITMAP_PNG(chesscom_8bits));
|
||
|
} else if (icon == "hide") {
|
||
|
return (wxBITMAP_PNG(hide));
|
||
|
}
|
||
|
return (wxNullBitmap);
|
||
|
}
|