diff options
| author | Ray <[email protected]> | 2017-05-17 01:06:05 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-17 01:06:05 +0200 |
| commit | b6b01f5420935c770e15ca60dd40147d0e5487aa (patch) | |
| tree | ef37651bcfae038ef059e2813413857aec6f7b11 /examples/text/text_ttf_loading.c | |
| parent | f8a4498a242e685e528bd1ac6d84378947daff7d (diff) | |
| parent | 1e2d3d93fe7808f27a4d1ac1d43133f785694019 (diff) | |
| download | raylib-b6b01f5420935c770e15ca60dd40147d0e5487aa.tar.gz raylib-b6b01f5420935c770e15ca60dd40147d0e5487aa.zip | |
Merge pull request #287 from raysan5/develop
Integrate develop branch
Diffstat (limited to 'examples/text/text_ttf_loading.c')
| -rw-r--r-- | examples/text/text_ttf_loading.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/text/text_ttf_loading.c b/examples/text/text_ttf_loading.c index 02b7f95f..c9c2fb27 100644 --- a/examples/text/text_ttf_loading.c +++ b/examples/text/text_ttf_loading.c @@ -38,8 +38,11 @@ int main() SetTextureFilter(font.texture, FILTER_POINT); int currentFontFilter = 0; // FILTER_POINT + // NOTE: Drag and drop support only available for desktop platforms: Windows, Linux, OSX +#if defined(PLATFORM_DESKTOP) int count = 0; char **droppedFiles; +#endif SetTargetFPS(60); //-------------------------------------------------------------------------------------- @@ -74,6 +77,7 @@ int main() if (IsKeyDown(KEY_LEFT)) fontPosition.x -= 10; else if (IsKeyDown(KEY_RIGHT)) fontPosition.x += 10; +#if defined(PLATFORM_DESKTOP) // Load a dropped TTF file dynamically (at current fontSize) if (IsFileDropped()) { @@ -86,6 +90,7 @@ int main() ClearDroppedFiles(); } } +#endif //---------------------------------------------------------------------------------- // Draw @@ -119,10 +124,11 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- +#if defined(PLATFORM_DESKTOP) + ClearDroppedFiles(); // Clear internal buffers +#endif UnloadSpriteFont(font); // SpriteFont unloading - ClearDroppedFiles(); // Clear internal buffers - CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- |
