Advertisement
DJ_Sharp

Otter.Text ctor bug

Nov 11th, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. namespace FontBug
  2. {
  3.     class Program
  4.     {
  5.  
  6.         static void Main(string[] args)
  7.         {
  8.             var app = new Program();
  9.             app.run();
  10.         }
  11.  
  12.         Otter.Game engine;
  13.         Otter.Scene scene;
  14.         Otter.Text text;
  15.         Otter.Font font;
  16.  
  17.         void run()
  18.         {
  19.             engine = new Otter.Game("Otter.Text constructor bug", 640, 480, 30, false);
  20.             scene = new Otter.Scene();
  21.             scene.OnUpdateFirst = updateInitial;
  22.             engine.Start(scene);
  23.         }
  24.  
  25.         void updateInitial()
  26.         {
  27.             font = new Otter.Font("Roboto.ttf"); // Load any font here
  28.             text = new Otter.Text("heh", font, 10); // Crashes here
  29.             scene.AddGraphicGUI(text);
  30.         }
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement