| 15 | surface_t image; |
| 16 | |
| 17 | int LoadImage(char* path){ |
| 18 | if(!path){ |
| 19 | Lemon::GUI::DisplayMessageBox("Image Viewer", "Invalid Filepath"); |
| 20 | return 1; |
| 21 | } |
| 22 | |
| 23 | int ret = Lemon::Graphics::LoadImage(path, &image); |
| 24 | |
| 25 | if(ret){ |
| 26 | char msg[128]; |
| 27 | sprintf(msg, "Failed to open image, Error Code: %d", ret); |
| 28 | Lemon::GUI::DisplayMessageBox("Image Viewer", msg); |
| 29 | return ret; |
| 30 | } |
| 31 | |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | void OnWindowCmd(unsigned short cmd, Lemon::GUI::Window* win){ |
| 36 | if(cmd == IMGVIEW_OPEN){ |
no test coverage detected