DefaultContainerStyle
How do I use Default Container Style
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
36 | if( m_DefaultContainerStyle == null ) | 1 |
239 | PhotonGUI.DefaultContainerStyle.Draw( controlRect, GUIContent.none, controlID ); | 2 |
File name: PhotonGUI.cs
Copy
33 {
34 get
35 {
36 if( m_DefaultContainerStyle == null )
37 {
38 m_DefaultContainerStyle = new GUIStyle();
39 m_DefaultContainerStyle.border = new RectOffset( 2, 2, 1, 2 );
40 m_DefaultContainerStyle.margin = new RectOffset( 5, 5, 5, 5 );
41 m_DefaultContainerStyle.padding = new RectOffset( 1, 1, 2, 2 );
42 m_DefaultContainerStyle.normal.background = ReorderableListResources.texContainerBackground;
43 }
44
45 return m_DefaultContainerStyle;
46 }
47 }
File name: PhotonGUI.cs
Copy
229 static Rect DoContainerBody( float height )
230 {
231 Rect controlRect = EditorGUILayout.GetControlRect( false, height );
232 controlRect.yMin -= 3;
233 controlRect.yMax -= 2;
234
235 int controlID = GUIUtility.GetControlID( FocusType.Passive, controlRect );
236
237 if( Event.current.type == EventType.Repaint )
238 {
239 PhotonGUI.DefaultContainerStyle.Draw( controlRect, GUIContent.none, controlID );
240 }
241
242 return controlRect;
243 }
DefaultContainerStyle 100 lượt xem
Gõ tìm kiếm nhanh...