Beispiel #1
0
 private static GUIStyle BackgroundStyle(string styleName, QTexture qTexture)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.normal2D },
         border = new RectOffset(8, 8, 8, 8)
     });
 }
Beispiel #2
0
 private static GUIStyle TitleStyle(string styleName, QTexture qTexture, RectOffset border, Color normalTextColor, RectOffset padding, int fontSize, TextAnchor alignment)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.normal2D, textColor = normalTextColor },
         onNormal = { background = qTexture.normal2D, textColor = normalTextColor },
         border = border,
         padding = padding,
         fontSize = fontSize,
         alignment = alignment,
     });
 }
Beispiel #3
0
 private static GUIStyle SelectedButtonStyle(string styleName, QTexture qTexture)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.active2D },
         onNormal = { background = qTexture.active2D },
         hover = { background = qTexture.hover2D },
         onHover = { background = qTexture.hover2D },
         active = { background = qTexture.normal2D },
         onActive = { background = qTexture.normal2D }
     });
 }
Beispiel #4
0
 private static GUIStyle ButtonStyle(string styleName, QTexture qTexture, RectOffset border)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.normal2D },
         onNormal = { background = qTexture.normal2D },
         hover = { background = qTexture.hover2D },
         onHover = { background = qTexture.hover2D },
         active = { background = qTexture.active2D },
         onActive = { background = qTexture.active2D },
         border = border
     });
 }
Beispiel #5
0
 private static GUIStyle QuickButtonStyle(string styleName, QTexture qTexture)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.normal2D },
         onNormal = { background = qTexture.normal2D },
         hover = { background = qTexture.hover2D },
         onHover = { background = qTexture.hover2D },
         active = { background = qTexture.active2D },
         onActive = { background = qTexture.active2D },
         margin = new RectOffset(0, 0, 2, 0)
     });
 }
Beispiel #6
0
        private static GUIStyle InfoMessageTitleStyle(string styleName, QTexture qTexture, Color normalTextColor)
        {
            return(new GUIStyle()
            {
                name = styleName + "Title",
                normal = { background = qTexture.normal2D, textColor = normalTextColor },
                border = new RectOffset(24, 8, 8, 8),
                alignment = TextAnchor.MiddleLeft,
                fontSize = GetTextFontSize(Style.Text.InfoMessageTitle),
                padding = GetFontPadding(Style.Text.InfoMessageTitle),
//                font = GetTextFont(Style.Text.InfoMessageTitle),
                richText = true,
                wordWrap = true,
                clipping = TextClipping.Clip,
                stretchHeight = false
            });
        }
Beispiel #7
0
 private static GUIStyle SelectedButtonStyle(string styleName, QTexture qTexture, RectOffset border, Color normalTextColor, Color hoverTextColor, Color activeTextColor, RectOffset padding, int fontSize, TextAnchor alignment)
 {
     return(new GUIStyle()
     {
         name = styleName,
         normal = { background = qTexture.active2D, textColor = activeTextColor },
         onNormal = { background = qTexture.active2D, textColor = activeTextColor },
         hover = { background = qTexture.hover2D, textColor = hoverTextColor },
         onHover = { background = qTexture.hover2D, textColor = hoverTextColor },
         active = { background = qTexture.normal2D, textColor = normalTextColor },
         onActive = { background = qTexture.normal2D, textColor = normalTextColor },
         border = border,
         padding = padding,
         fontSize = fontSize,
         alignment = alignment,
     });
 }
Beispiel #8
0
        private static GUIStyle InfoMessageMessageStyle(string styleName, QTexture qTexture, Color normalTextColor)
        {
            return(new GUIStyle()
            {
                name = styleName + "Message",
                normal = { background = qTexture.normal2D, textColor = normalTextColor },
                border = new RectOffset(24, 8, 10, 8),
                contentOffset = new Vector2(0, 10),
                overflow = new RectOffset(0, 0, 0, 12),
                alignment = TextAnchor.UpperLeft,
                fontSize = GetTextFontSize(Style.Text.InfoMessageMessage),
                padding = GetFontPadding(Style.Text.InfoMessageMessage),
//                font = GetTextFont(Style.Text.InfoMessageMessage),
                richText = true,
                wordWrap = true,
                clipping = TextClipping.Clip,
                stretchHeight = false
            });
        }