public WidgetPanel(WidgetStyleSheet style) : base(style) { m_children = new WindowObjectArray <Widget>(); Size = style.Size; }
public WinFormsController(int width, int height, float scale, float fontScale, bool isSmallScreen, string imagePath) { Instance = this; m_screenWidth = width; m_screenHeight = height; m_screenScale = scale; m_fontScale = fontScale; m_isSmallScreen = isSmallScreen; m_imagePath = imagePath; m_windows = new WindowObjectArray <Window>(); Widgets.WidgetManager.Init(fontScale); foreach (string file in Directory.GetFiles(m_imagePath, "*.png")) { RegisterSprite(Path.GetFileNameWithoutExtension(file), file, null); } }
public Widget(WidgetStyleSheet style) : base(null) { m_background = new WindowObjectArray <WindowObject>(); m_backgroundStyle = style.BackgroundStyle; m_backgroundTexture = style.BackgroundTexture; m_backgroundScale = style.BackgroundScale; m_backgroundPivot = style.BackgroundPivot; m_backgroundInited = false; m_backgroundDepth = style.BackgroundDepth; m_backgroundPadding = style.BackgroundPadding; m_colorTint = style.Color; m_alpha = style.Opacity; m_clipContents = style.Clip; m_clipMargin = style.ClipMargin; m_style = style; }
/// <summary> /// Initializes a new instance of the <see cref="T:NewWidgets.Widgets.WidgetBackground"/> class. /// </summary> /// <param name="style">Style.</param> public WidgetBackground(WidgetStyleSheet style = default(WidgetStyleSheet)) : base(style.IsEmpty ? DefaultStyle : style) { m_background = new WindowObjectArray <WindowObject>(); }
/// <summary> /// Initializes a new instance of the <see cref="T:NewWidgets.Widgets.WidgetPanel"/> class. /// </summary> /// <param name="style">Style.</param> public WidgetPanel(WidgetStyleSheet style = default(WidgetStyleSheet)) : base(style.IsEmpty ? DefaultStyle : style) { m_children = new WindowObjectArray <Widget>(); }