static async Task Main(string[] args) { _ = new ArgumentException(); // f****n sdk bugs reeeeeeee CultureInfo.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-gb"); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException; buffer = new FrameBuffer(Console.WindowWidth, Console.WindowHeight); FrameBufferGraphics graphics = new FrameBufferGraphics(buffer); UIExtension ext = new UIExtension(buffer); buffer.AddDrawExtension(ext); SetupUI(buffer, ext); buffer.Run(); await Run(buffer); await Task.Yield(); ext.BeginEventLoop(); }
public UIExtension(FrameBuffer buffer) { _buffer = buffer; _uiBuffer = new FrameBuffer(_buffer.Width, _buffer.Height); _buffer.GetFramebufferCopy(_uiBuffer.RawFrameBuffer); buffer.FrameDrawn += Buffer_FrameDrawn; _uiGraphics = new FrameBufferGraphics(_uiBuffer); BasePanel = new Panel(); }
static void Main(string[] args) { FrameBuffer buffer = new FrameBuffer(Console.WindowWidth, Console.WindowHeight) { FrameLimit = 60 }; FrameBufferGraphics graphics = new FrameBufferGraphics(buffer); buffer.Run(); UIExtension ext = new UIExtension(buffer); ImageBox imageBox = new ImageBox() { Image = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"), Width = 32, Height = 32 }; ext.Controls.Add(imageBox); ImageBox imageBox2 = new ImageBox() { Image = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"), Width = 32, Height = 32, X = 32 }; ext.Controls.Add(imageBox2); ImageBox imageBox3 = new ImageBox() { Image = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"), Width = 32, Height = 32, X = 64 }; ext.Controls.Add(imageBox3); ImageBox imageBox4 = new ImageBox() { Image = Image.Load <Rgb24>(@"C:\Users\wamwo\Downloads\congaparrot.gif"), Width = 32, Height = 32, X = 96 }; ext.Controls.Add(imageBox4); buffer.AddDrawExtension(ext); }
public DebugExtension(FrameBuffer buffer, FrameBufferGraphics graphics) { _buffer = buffer; _graphics = graphics; }