diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-23 18:11:55 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-23 18:11:55 +0100 |
| commit | ce941c146aea7925bded6b9d2a0d0559d3156ad3 (patch) | |
| tree | 4c52e02600e3fd127bfb28b3e974d45541ec9e4e /src/binres/binres.cpp | |
Create repository
Diffstat (limited to 'src/binres/binres.cpp')
| -rw-r--r-- | src/binres/binres.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/binres/binres.cpp b/src/binres/binres.cpp new file mode 100644 index 0000000..963a714 --- /dev/null +++ b/src/binres/binres.cpp @@ -0,0 +1,24 @@ +#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); +}
\ No newline at end of file |
