public void addOption(string text) { IntPtr surface; SDL.SDL_Color col; col.r = 255; col.g = 255; col.b = 255; col.a = 255; surface = SDL_ttf.TTF_RenderText_Solid(Engine.smallfont, text, col); options.Add(Engine.ConvertSurfaceToTexture(surface)); SDL.SDL_FreeSurface(surface); }
public MenuView(string title) { // Generate text texture IntPtr surface; SDL.SDL_Color col; col.r = 255; col.g = 255; col.b = 255; col.a = 255; surface = SDL_ttf.TTF_RenderText_Solid(Engine.largefont, title, col); this.title = Engine.ConvertSurfaceToTexture(surface); }