Beispiel #1
0
        public BGUILabelDrawRequest(BGUIGroup group, string s)
        {
            message = new GUIContent(s);
            var labelsize = GUI.skin.label.CalcSize(message);

            pos = group.RequestNextRect(labelsize.x + 1f, labelsize.y + 1f); // This is due to minor clipping and CalcSize not being 100% accurate.
        }
Beispiel #2
0
        public BGUIButtonDrawRequest(BGUIGroup context, BGUIButtonDelegate del, string s)
        {
            Message = new GUIContent(s);
            var size = GUI.skin.button.CalcSize(Message);

            pos      = context.RequestNextRect(size.x + GUI.skin.button.padding.left, size.y);
            Delegate = del;
        }
Beispiel #3
0
 public BGUISliderDrawRequest(BGUIGroup group, float width, BGUIValueDelegate <float> del, float current, float left, float right)
 {
     Delegate = del;
     Current  = current;
     Left     = left;
     Right    = right;
     Width    = width;
     pos      = group.RequestNextRect(Width, GUI.skin.horizontalSlider.fixedHeight);
 }