forked from bbepis/XUnity.AutoTranslator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.cs
More file actions
929 lines (688 loc) · 34.1 KB
/
GUI.cs
File metadata and controls
929 lines (688 loc) · 34.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
namespace UnityEngine
{
public class GUI
{
#if IL2CPP
public sealed class WindowFunction : Il2CppSystem.MulticastDelegate
{
public WindowFunction( IntPtr value ) : base( value )
{
}
public static implicit operator GUI.WindowFunction( System.Action<int> obj0 ) => throw new NotImplementedException();
}
#else
public delegate void WindowFunction( int id );
#endif
public abstract class Scope : IDisposable
{
private bool m_Disposed;
protected abstract void CloseScope();
~Scope()
{
}
public void Dispose() => throw new NotImplementedException();
}
public class GroupScope : Scope
{
public GroupScope( Rect position )
{
BeginGroup( position );
}
public GroupScope( Rect position, string text )
{
BeginGroup( position, text );
}
public GroupScope( Rect position, Texture image )
{
BeginGroup( position, image );
}
public GroupScope( Rect position, GUIContent content )
{
BeginGroup( position, content );
}
public GroupScope( Rect position, GUIStyle style )
{
BeginGroup( position, style );
}
public GroupScope( Rect position, string text, GUIStyle style )
{
BeginGroup( position, text, style );
}
public GroupScope( Rect position, Texture image, GUIStyle style )
{
BeginGroup( position, image, style );
}
protected override void CloseScope()
{
EndGroup();
}
}
public class ScrollViewScope : Scope
{
public Vector2 scrollPosition
{
get;
private set;
}
public bool handleScrollWheel
{
get;
set;
}
public ScrollViewScope( Rect position, Vector2 scrollPosition, Rect viewRect )
{
handleScrollWheel = true;
this.scrollPosition = BeginScrollView( position, scrollPosition, viewRect );
}
public ScrollViewScope( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical )
{
handleScrollWheel = true;
this.scrollPosition = BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical );
}
public ScrollViewScope( Rect position, Vector2 scrollPosition, Rect viewRect, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar )
{
handleScrollWheel = true;
this.scrollPosition = BeginScrollView( position, scrollPosition, viewRect, horizontalScrollbar, verticalScrollbar );
}
public ScrollViewScope( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar )
{
handleScrollWheel = true;
this.scrollPosition = BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar );
}
internal ScrollViewScope( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background )
{
handleScrollWheel = true;
this.scrollPosition = BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, background );
}
protected override void CloseScope()
{
EndScrollView( handleScrollWheel );
}
}
public class ClipScope : Scope
{
public ClipScope( Rect position )
{
BeginClip( position );
}
protected override void CloseScope()
{
EndClip();
}
}
private static float s_ScrollStepSize;
private static int s_ScrollControlId;
private static int s_HotTextField;
private static readonly int s_BoxHash;
private static readonly int s_RepeatButtonHash;
private static readonly int s_ToggleHash;
private static readonly int s_ButtonGridHash;
private static readonly int s_SliderHash;
private static readonly int s_BeginGroupHash;
private static readonly int s_ScrollviewHash;
private static GUISkin s_Skin;
internal static Rect s_ToolTipRect;
internal static int scrollTroughSide
{
get;
set;
}
internal static DateTime nextScrollStepTime
{
get;
set;
}
public static GUISkin skin
{
get
{
return s_Skin;
}
set
{
DoSetSkin( value );
}
}
public static Matrix4x4 matrix => throw new NotImplementedException();
public static string tooltip
{
get
{
string text = Internal_GetTooltip();
if( text != null )
{
return text;
}
return "";
}
set
{
Internal_SetTooltip( value );
}
}
protected static string mouseTooltip => Internal_GetMouseTooltip();
protected static Rect tooltipRect
{
get
{
return s_ToolTipRect;
}
set
{
s_ToolTipRect = value;
}
}
public static Color color
{
get
{
INTERNAL_get_color( out Color value );
return value;
}
set
{
INTERNAL_set_color( ref value );
}
}
public static Color backgroundColor
{
get
{
INTERNAL_get_backgroundColor( out Color value );
return value;
}
set
{
INTERNAL_set_backgroundColor( ref value );
}
}
public static Color contentColor
{
get
{
INTERNAL_get_contentColor( out Color value );
return value;
}
set
{
INTERNAL_set_contentColor( ref value );
}
}
public static bool changed
{
get;
set;
}
public static bool enabled
{
get;
set;
}
public static int depth
{
get;
set;
}
internal static Material blendMaterial
{
get;
}
internal static Material blitMaterial
{
get;
}
internal static bool usePageScrollbars
{
get;
}
static GUI()
{
s_ScrollStepSize = 10f;
s_HotTextField = -1;
s_BoxHash = "Box".GetHashCode();
s_RepeatButtonHash = "repeatButton".GetHashCode();
s_ToggleHash = "Toggle".GetHashCode();
s_ButtonGridHash = "ButtonGrid".GetHashCode();
s_SliderHash = "Slider".GetHashCode();
s_BeginGroupHash = "BeginGroup".GetHashCode();
s_ScrollviewHash = "scrollView".GetHashCode();
nextScrollStepTime = DateTime.Now;
}
internal static void DoSetSkin( GUISkin newSkin )
{
s_Skin = newSkin;
newSkin.MakeCurrent();
}
internal static void CleanupRoots()
{
s_Skin = null;
}
public static void Label( Rect position, string text )
{
Label( position, GUIContent.Temp( text ), s_Skin.label );
}
public static void Label( Rect position, Texture image )
{
Label( position, GUIContent.Temp( image ), s_Skin.label );
}
public static void Label( Rect position, GUIContent content )
{
Label( position, content, s_Skin.label );
}
public static void Label( Rect position, string text, GUIStyle style )
{
Label( position, GUIContent.Temp( text ), style );
}
public static void Label( Rect position, Texture image, GUIStyle style )
{
Label( position, GUIContent.Temp( image ), style );
}
public static void Label( Rect position, GUIContent content, GUIStyle style )
{
DoLabel( position, content, style.m_Ptr );
}
public static void DrawTexture( Rect position, Texture image ) => throw new NotImplementedException();
public static void DrawTexture( Rect position, Texture image, ScaleMode scaleMode )
{
DrawTexture( position, image, scaleMode, alphaBlend: true );
}
public static void DrawTexture( Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend )
{
DrawTexture( position, image, scaleMode, alphaBlend, 0f );
}
public static void DrawTexture( Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect )
{
}
internal static bool CalculateScaledTextureRects( Rect position, ScaleMode scaleMode, float imageAspect, ref Rect outScreenRect, ref Rect outSourceRect ) => throw new NotImplementedException();
public static void DrawTextureWithTexCoords( Rect position, Texture image, Rect texCoords )
{
DrawTextureWithTexCoords( position, image, texCoords, alphaBlend: true );
}
public static void DrawTextureWithTexCoords( Rect position, Texture image, Rect texCoords, bool alphaBlend )
{
}
public static void Box( Rect position, string text )
{
Box( position, GUIContent.Temp( text ), s_Skin.box );
}
public static void Box( Rect position, Texture image )
{
Box( position, GUIContent.Temp( image ), s_Skin.box );
}
public static void Box( Rect position, GUIContent content )
{
Box( position, content, s_Skin.box );
}
public static void Box( Rect position, string text, GUIStyle style )
{
Box( position, GUIContent.Temp( text ), style );
}
public static void Box( Rect position, Texture image, GUIStyle style )
{
Box( position, GUIContent.Temp( image ), style );
}
public static void Box( Rect position, GUIContent content, GUIStyle style )
{
}
public static bool Button( Rect position, string text )
{
return Button( position, GUIContent.Temp( text ), s_Skin.button );
}
public static bool Button( Rect position, Texture image )
{
return Button( position, GUIContent.Temp( image ), s_Skin.button );
}
public static bool Button( Rect position, GUIContent content )
{
return Button( position, content, s_Skin.button );
}
public static bool Button( Rect position, string text, GUIStyle style )
{
return Button( position, GUIContent.Temp( text ), style );
}
public static bool Button( Rect position, Texture image, GUIStyle style )
{
return Button( position, GUIContent.Temp( image ), style );
}
public static bool Button( Rect position, GUIContent content, GUIStyle style )
{
return DoButton( position, content, style.m_Ptr );
}
public static bool RepeatButton( Rect position, string text )
{
return DoRepeatButton( position, GUIContent.Temp( text ), s_Skin.button, FocusType.Passive );
}
public static bool RepeatButton( Rect position, Texture image )
{
return DoRepeatButton( position, GUIContent.Temp( image ), s_Skin.button, FocusType.Passive );
}
public static bool RepeatButton( Rect position, GUIContent content )
{
return DoRepeatButton( position, content, s_Skin.button, FocusType.Passive );
}
public static bool RepeatButton( Rect position, string text, GUIStyle style )
{
return DoRepeatButton( position, GUIContent.Temp( text ), style, FocusType.Passive );
}
public static bool RepeatButton( Rect position, Texture image, GUIStyle style )
{
return DoRepeatButton( position, GUIContent.Temp( image ), style, FocusType.Passive );
}
public static bool RepeatButton( Rect position, GUIContent content, GUIStyle style )
{
return DoRepeatButton( position, content, style, FocusType.Passive );
}
private static bool DoRepeatButton( Rect position, GUIContent content, GUIStyle style, FocusType focusType ) => throw new NotImplementedException();
public static string TextField( Rect position, string text ) => throw new NotImplementedException();
public static string TextField( Rect position, string text, int maxLength ) => throw new NotImplementedException();
public static string TextField( Rect position, string text, GUIStyle style ) => throw new NotImplementedException();
public static string TextField( Rect position, string text, int maxLength, GUIStyle style ) => throw new NotImplementedException();
public static string PasswordField( Rect position, string password, char maskChar )
{
return PasswordField( position, password, maskChar, -1, skin.textField );
}
public static string PasswordField( Rect position, string password, char maskChar, int maxLength )
{
return PasswordField( position, password, maskChar, maxLength, skin.textField );
}
public static string PasswordField( Rect position, string password, char maskChar, GUIStyle style )
{
return PasswordField( position, password, maskChar, -1, style );
}
public static string PasswordField( Rect position, string password, char maskChar, int maxLength, GUIStyle style ) => throw new NotImplementedException();
internal static string PasswordFieldGetStrToShow( string password, char maskChar ) => throw new NotImplementedException();
public static string TextArea( Rect position, string text ) => throw new NotImplementedException();
public static string TextArea( Rect position, string text, int maxLength ) => throw new NotImplementedException();
public static string TextArea( Rect position, string text, GUIStyle style ) => throw new NotImplementedException();
public static string TextArea( Rect position, string text, int maxLength, GUIStyle style ) => throw new NotImplementedException();
private static string TextArea( Rect position, GUIContent content, int maxLength, GUIStyle style ) => throw new NotImplementedException();
internal static void DoTextField( Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style ) => throw new NotImplementedException();
internal static void DoTextField( Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText ) => throw new NotImplementedException();
internal static void DoTextField( Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText, char maskChar ) => throw new NotImplementedException();
private static void HandleTextFieldEventForTouchscreen( Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText, char maskChar, TextEditor editor ) => throw new NotImplementedException();
private static void HandleTextFieldEventForDesktop( Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, TextEditor editor ) => throw new NotImplementedException();
public static bool Toggle( Rect position, bool value, string text )
{
return Toggle( position, value, GUIContent.Temp( text ), s_Skin.toggle );
}
public static bool Toggle( Rect position, bool value, Texture image )
{
return Toggle( position, value, GUIContent.Temp( image ), s_Skin.toggle );
}
public static bool Toggle( Rect position, bool value, GUIContent content )
{
return Toggle( position, value, content, s_Skin.toggle );
}
public static bool Toggle( Rect position, bool value, string text, GUIStyle style )
{
return Toggle( position, value, GUIContent.Temp( text ), style );
}
public static bool Toggle( Rect position, bool value, Texture image, GUIStyle style )
{
return Toggle( position, value, GUIContent.Temp( image ), style );
}
public static bool Toggle( Rect position, bool value, GUIContent content, GUIStyle style ) => throw new NotImplementedException();
public static bool Toggle( Rect position, int id, bool value, GUIContent content, GUIStyle style ) => throw new NotImplementedException();
public static int Toolbar( Rect position, int selected, string[] texts )
{
return Toolbar( position, selected, GUIContent.Temp( texts ), s_Skin.button );
}
public static int Toolbar( Rect position, int selected, Texture[] images )
{
return Toolbar( position, selected, GUIContent.Temp( images ), s_Skin.button );
}
public static int Toolbar( Rect position, int selected, GUIContent[] content )
{
return Toolbar( position, selected, content, s_Skin.button );
}
public static int Toolbar( Rect position, int selected, string[] texts, GUIStyle style )
{
return Toolbar( position, selected, GUIContent.Temp( texts ), style );
}
public static int Toolbar( Rect position, int selected, Texture[] images, GUIStyle style )
{
return Toolbar( position, selected, GUIContent.Temp( images ), style );
}
public static int Toolbar( Rect position, int selected, GUIContent[] contents, GUIStyle style ) => throw new NotImplementedException();
public static int SelectionGrid( Rect position, int selected, string[] texts, int xCount )
{
return SelectionGrid( position, selected, GUIContent.Temp( texts ), xCount, null );
}
public static int SelectionGrid( Rect position, int selected, Texture[] images, int xCount )
{
return SelectionGrid( position, selected, GUIContent.Temp( images ), xCount, null );
}
public static int SelectionGrid( Rect position, int selected, GUIContent[] content, int xCount )
{
return SelectionGrid( position, selected, content, xCount, null );
}
public static int SelectionGrid( Rect position, int selected, string[] texts, int xCount, GUIStyle style )
{
return SelectionGrid( position, selected, GUIContent.Temp( texts ), xCount, style );
}
public static int SelectionGrid( Rect position, int selected, Texture[] images, int xCount, GUIStyle style )
{
return SelectionGrid( position, selected, GUIContent.Temp( images ), xCount, style );
}
public static int SelectionGrid( Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style )
{
if( style == null )
{
style = s_Skin.button;
}
return DoButtonGrid( position, selected, contents, xCount, style, style, style, style );
}
internal static void FindStyles( ref GUIStyle style, out GUIStyle firstStyle, out GUIStyle midStyle, out GUIStyle lastStyle, string first, string mid, string last )
{
if( style == null )
{
style = skin.button;
}
string name = style.name;
midStyle = skin.FindStyle( name + mid );
if( midStyle == null )
{
midStyle = style;
}
firstStyle = skin.FindStyle( name + first );
if( firstStyle == null )
{
firstStyle = midStyle;
}
lastStyle = skin.FindStyle( name + last );
if( lastStyle == null )
{
lastStyle = midStyle;
}
}
internal static int CalcTotalHorizSpacing( int xCount, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle ) => throw new NotImplementedException();
private static int DoButtonGrid( Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle ) => throw new NotImplementedException();
private static Rect[] CalcMouseRects( Rect position, int count, int xCount, float elemWidth, float elemHeight, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle, bool addBorders ) => throw new NotImplementedException();
private static int GetButtonGridMouseSelection( Rect[] buttonRects, Vector2 mousePos, bool findNearest ) => throw new NotImplementedException();
public static float HorizontalSlider( Rect position, float value, float leftValue, float rightValue )
{
return Slider( position, value, 0f, leftValue, rightValue, skin.horizontalSlider, skin.horizontalSliderThumb, horiz: true, 0 );
}
public static float HorizontalSlider( Rect position, float value, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb )
{
return Slider( position, value, 0f, leftValue, rightValue, slider, thumb, horiz: true, 0 );
}
public static float VerticalSlider( Rect position, float value, float topValue, float bottomValue )
{
return Slider( position, value, 0f, topValue, bottomValue, skin.verticalSlider, skin.verticalSliderThumb, horiz: false, 0 );
}
public static float VerticalSlider( Rect position, float value, float topValue, float bottomValue, GUIStyle slider, GUIStyle thumb )
{
return Slider( position, value, 0f, topValue, bottomValue, slider, thumb, horiz: false, 0 );
}
public static float Slider( Rect position, float value, float size, float start, float end, GUIStyle slider, GUIStyle thumb, bool horiz, int id ) => throw new NotImplementedException();
public static float HorizontalScrollbar( Rect position, float value, float size, float leftValue, float rightValue )
{
return Scroller( position, value, size, leftValue, rightValue, skin.horizontalScrollbar, skin.horizontalScrollbarThumb, skin.horizontalScrollbarLeftButton, skin.horizontalScrollbarRightButton, horiz: true );
}
public static float HorizontalScrollbar( Rect position, float value, float size, float leftValue, float rightValue, GUIStyle style )
{
return Scroller( position, value, size, leftValue, rightValue, style, skin.GetStyle( style.name + "thumb" ), skin.GetStyle( style.name + "leftbutton" ), skin.GetStyle( style.name + "rightbutton" ), horiz: true );
}
internal static bool ScrollerRepeatButton( int scrollerID, Rect rect, GUIStyle style ) => throw new NotImplementedException();
public static float VerticalScrollbar( Rect position, float value, float size, float topValue, float bottomValue )
{
return Scroller( position, value, size, topValue, bottomValue, skin.verticalScrollbar, skin.verticalScrollbarThumb, skin.verticalScrollbarUpButton, skin.verticalScrollbarDownButton, horiz: false );
}
public static float VerticalScrollbar( Rect position, float value, float size, float topValue, float bottomValue, GUIStyle style )
{
return Scroller( position, value, size, topValue, bottomValue, style, skin.GetStyle( style.name + "thumb" ), skin.GetStyle( style.name + "upbutton" ), skin.GetStyle( style.name + "downbutton" ), horiz: false );
}
internal static float Scroller( Rect position, float value, float size, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb, GUIStyle leftButton, GUIStyle rightButton, bool horiz ) => throw new NotImplementedException();
public static void BeginClip( Rect position, Vector2 scrollOffset, Vector2 renderOffset, bool resetOffset ) => throw new NotImplementedException();
public static void BeginGroup( Rect position )
{
BeginGroup( position, GUIContent.none, GUIStyle.none );
}
public static void BeginGroup( Rect position, string text )
{
BeginGroup( position, GUIContent.Temp( text ), GUIStyle.none );
}
public static void BeginGroup( Rect position, Texture image )
{
BeginGroup( position, GUIContent.Temp( image ), GUIStyle.none );
}
public static void BeginGroup( Rect position, GUIContent content )
{
BeginGroup( position, content, GUIStyle.none );
}
public static void BeginGroup( Rect position, GUIStyle style )
{
BeginGroup( position, GUIContent.none, style );
}
public static void BeginGroup( Rect position, string text, GUIStyle style )
{
BeginGroup( position, GUIContent.Temp( text ), style );
}
public static void BeginGroup( Rect position, Texture image, GUIStyle style )
{
BeginGroup( position, GUIContent.Temp( image ), style );
}
public static void BeginGroup( Rect position, GUIContent content, GUIStyle style ) => throw new NotImplementedException();
public static void EndGroup() => throw new NotImplementedException();
public static void BeginClip( Rect position ) => throw new NotImplementedException();
public static void EndClip() => throw new NotImplementedException();
public static Vector2 BeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect )
{
return BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal: false, alwaysShowVertical: false, skin.horizontalScrollbar, skin.verticalScrollbar, skin.scrollView );
}
public static Vector2 BeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical )
{
return BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, skin.horizontalScrollbar, skin.verticalScrollbar, skin.scrollView );
}
public static Vector2 BeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar )
{
return BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal: false, alwaysShowVertical: false, horizontalScrollbar, verticalScrollbar, skin.scrollView );
}
public static Vector2 BeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar )
{
return BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, skin.scrollView );
}
protected static Vector2 DoBeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background )
{
return BeginScrollView( position, scrollPosition, viewRect, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, background );
}
internal static Vector2 BeginScrollView( Rect position, Vector2 scrollPosition, Rect viewRect, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background ) => throw new NotImplementedException();
public static void EndScrollView()
{
EndScrollView( handleScrollWheel: true );
}
public static void EndScrollView( bool handleScrollWheel ) => throw new NotImplementedException();
internal static ScrollViewState GetTopScrollView() => throw new NotImplementedException();
public static void ScrollTo( Rect position )
{
GetTopScrollView()?.ScrollTo( position );
}
public static bool ScrollTowards( Rect position, float maxDelta )
{
return GetTopScrollView()?.ScrollTowards( position, maxDelta ) ?? false;
}
public static Rect Window( int id, Rect clientRect, WindowFunction func, string text ) => throw new NotImplementedException();
public static Rect Window( int id, Rect clientRect, WindowFunction func, Texture image ) => throw new NotImplementedException();
public static Rect Window( int id, Rect clientRect, WindowFunction func, GUIContent content ) => throw new NotImplementedException();
public static Rect Window( int id, Rect clientRect, WindowFunction func, string text, GUIStyle style ) => throw new NotImplementedException();
public static Rect Window( int id, Rect clientRect, WindowFunction func, Texture image, GUIStyle style ) => throw new NotImplementedException();
public static Rect Window( int id, Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, string text ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, Texture image ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, GUIContent content ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, string text, GUIStyle style ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, Texture image, GUIStyle style ) => throw new NotImplementedException();
public static Rect ModalWindow( int id, Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style ) => throw new NotImplementedException();
private static Rect DoWindow( int id, Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style, GUISkin skin, bool forceRectOnLayout ) => throw new NotImplementedException();
private static Rect DoModalWindow( int id, Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style, GUISkin skin ) => throw new NotImplementedException();
internal static void CallWindowDelegate( WindowFunction func, int id, int instanceID, GUISkin _skin, int forceRect, float width, float height, GUIStyle style ) => throw new NotImplementedException();
public static void DragWindow()
{
DragWindow( new Rect( 0f, 0f, 10000f, 10000f ) );
}
internal static void BeginWindows( int skinMode, int editorWindowInstanceID ) => throw new NotImplementedException();
internal static void EndWindows() => throw new NotImplementedException();
private static extern void INTERNAL_get_color( out Color value );
private static extern void INTERNAL_set_color( ref Color value );
private static extern void INTERNAL_get_backgroundColor( out Color value );
private static extern void INTERNAL_set_backgroundColor( ref Color value );
private static extern void INTERNAL_get_contentColor( out Color value );
private static extern void INTERNAL_set_contentColor( ref Color value );
private static extern string Internal_GetTooltip();
private static extern void Internal_SetTooltip( string value );
private static extern string Internal_GetMouseTooltip();
private static void DoLabel( Rect position, GUIContent content, IntPtr style )
{
INTERNAL_CALL_DoLabel( ref position, content, style );
}
private static extern void INTERNAL_CALL_DoLabel( ref Rect position, GUIContent content, IntPtr style );
private static extern void InitializeGUIClipTexture();
private static bool DoButton( Rect position, GUIContent content, IntPtr style )
{
return INTERNAL_CALL_DoButton( ref position, content, style );
}
private static extern bool INTERNAL_CALL_DoButton( ref Rect position, GUIContent content, IntPtr style );
public static extern void SetNextControlName( string name );
public static extern string GetNameOfFocusedControl();
public static extern void FocusControl( string name );
internal static bool DoToggle( Rect position, int id, bool value, GUIContent content, IntPtr style )
{
return INTERNAL_CALL_DoToggle( ref position, id, value, content, style );
}
private static extern bool INTERNAL_CALL_DoToggle( ref Rect position, int id, bool value, GUIContent content, IntPtr style );
internal static extern void InternalRepaintEditorWindow();
private static Rect Internal_DoModalWindow( int id, int instanceID, Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style, GUISkin skin )
{
INTERNAL_CALL_Internal_DoModalWindow( id, instanceID, ref clientRect, func, content, style, skin, out Rect value );
return value;
}
private static extern void INTERNAL_CALL_Internal_DoModalWindow( int id, int instanceID, ref Rect clientRect, WindowFunction func, GUIContent content, GUIStyle style, GUISkin skin, out Rect value );
private static Rect Internal_DoWindow( int id, int instanceID, Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style, GUISkin skin, bool forceRectOnLayout )
{
INTERNAL_CALL_Internal_DoWindow( id, instanceID, ref clientRect, func, title, style, skin, forceRectOnLayout, out Rect value );
return value;
}
private static extern void INTERNAL_CALL_Internal_DoWindow( int id, int instanceID, ref Rect clientRect, WindowFunction func, GUIContent title, GUIStyle style, GUISkin skin, bool forceRectOnLayout, out Rect value );
public static void DragWindow( Rect position )
{
INTERNAL_CALL_DragWindow( ref position );
}
private static extern void INTERNAL_CALL_DragWindow( ref Rect position );
public static extern void BringWindowToFront( int windowID );
public static extern void BringWindowToBack( int windowID );
public static extern void FocusWindow( int windowID );
public static extern void UnfocusWindow();
private static extern void Internal_BeginWindows();
private static extern void Internal_EndWindows();
}
}