@@ -9,10 +9,14 @@ public class Window : IDisposable {
99 private bool _isOpen = true ;
1010 private GCHandle _isOpenHandle ;
1111 private readonly string _title ;
12+ private readonly int _initialWidth ;
13+ private readonly int _initialHeight ;
1214
13- public Window ( string title , bool canClose = true ) {
15+ public Window ( string title , bool canClose = true , int initialWidth = 0 , int initialHeight = 0 ) {
1416 _isOpenHandle = GCHandle . Alloc ( _isOpen , GCHandleType . Pinned ) ;
1517 _title = title ;
18+ _initialWidth = initialWidth ;
19+ _initialHeight = initialHeight ;
1620 }
1721
1822 public bool IsOpen {
@@ -21,13 +25,13 @@ public bool IsOpen {
2125 }
2226
2327 public void Run ( Action renderContent ) {
24- _id = Native . window ( _id , false , _title , ref _isOpen , ( ) => {
28+ _id = Native . window ( _id , false , _title , _initialWidth , _initialHeight , ref _isOpen , ( ) => {
2529 renderContent ( ) ;
2630 } ) ;
2731 }
2832
2933 public void Dispose ( ) {
30- Native . window ( _id , true , "" , ref _isOpen , ( ) => { } ) ;
34+ Native . window ( _id , true , "" , 0 , 0 , ref _isOpen , ( ) => { } ) ;
3135 if ( _isOpenHandle . IsAllocated ) {
3236 _isOpenHandle . Free ( ) ;
3337 }
0 commit comments