public static IMTextField TextField(this VisualTreeBuilder cache, Rect position, int id, GUIContent content, bool multiline, int maxLength, GUIStyle style, string secureText, char maskChar) { IMTextField result; if (TouchScreenKeyboard.isSupported) { IMTouchScreenTextField iMTouchScreenTextField; cache.NextElement <IMTouchScreenTextField>(out iMTouchScreenTextField); if (id != 0) { iMTouchScreenTextField.AssignControlID(id); } else { iMTouchScreenTextField.GenerateControlID(); } iMTouchScreenTextField.position = position; iMTouchScreenTextField.text = content.text; iMTouchScreenTextField.style = style; iMTouchScreenTextField.maxLength = maxLength; iMTouchScreenTextField.multiline = multiline; iMTouchScreenTextField.secureText = secureText; iMTouchScreenTextField.maskChar = maskChar; result = iMTouchScreenTextField; } else { IMKeyboardTextField iMKeyboardTextField; cache.NextElement <IMKeyboardTextField>(out iMKeyboardTextField); if (id != 0) { iMKeyboardTextField.AssignControlID(id); } else { iMKeyboardTextField.GenerateControlID(); } iMKeyboardTextField.position = position; iMKeyboardTextField.text = content.text; iMKeyboardTextField.style = style; iMKeyboardTextField.maxLength = maxLength; iMKeyboardTextField.multiline = multiline; result = iMKeyboardTextField; } return(result); }
public static IMScroller Scroller(this VisualTreeBuilder cache, Rect position, float value, float size, float leftValue, float rightValue, GUIStyle slider, GUIStyle thumb, GUIStyle leftButton, GUIStyle rightButton, bool horiz) { IMScroller iMScroller; cache.NextElement <IMScroller>(out iMScroller); iMScroller.GenerateControlID(); iMScroller.SetProperties(position, value, size, leftValue, rightValue, slider, thumb, leftButton, rightButton, horiz); return(iMScroller); }
public static IMLabel Label(this VisualTreeBuilder cache, Rect position, GUIContent content, GUIStyle style) { IMLabel iMLabel; cache.NextElement <IMLabel>(out iMLabel); iMLabel.position = position; iMLabel.text = content.text; iMLabel.style = style; return(iMLabel); }
public static IMBox Box(this VisualTreeBuilder cache, Rect position, GUIContent content, GUIStyle style) { IMBox iMBox; cache.NextElement <IMBox>(out iMBox); iMBox.GenerateControlID(); iMBox.position = position; iMBox.text = content.text; iMBox.style = style; return(iMBox); }
public static IMButton Button(this VisualTreeBuilder cache, Rect position, GUIContent content, GUIStyle style) { IMButton iMButton; cache.NextElement <IMButton>(out iMButton); iMButton.GenerateControlID(); iMButton.position = position; iMButton.text = content.text; iMButton.style = style; return(iMButton); }
public static IMImage DrawTexture(this VisualTreeBuilder cache, Rect position, Texture image, ScaleMode scaleMode, bool alphaBlend, float imageAspect) { IMImage iMImage; cache.NextElement <IMImage>(out iMImage); iMImage.position = position; iMImage.image = image; iMImage.scaleMode = scaleMode; iMImage.alphaBlend = alphaBlend; iMImage.imageAspect = imageAspect; return(iMImage); }
public static IMButtonGrid ButtonGrid(this VisualTreeBuilder cache, Rect position, int selected, GUIContent[] contents, int xCount, GUIStyle style, GUIStyle firstStyle, GUIStyle midStyle, GUIStyle lastStyle) { IMButtonGrid iMButtonGrid; cache.NextElement <IMButtonGrid>(out iMButtonGrid); iMButtonGrid.GenerateControlID(); iMButtonGrid.position = position; iMButtonGrid.contents = contents; iMButtonGrid.style = style; iMButtonGrid.xCount = xCount; iMButtonGrid.selected = selected; iMButtonGrid.firstStyle = firstStyle; iMButtonGrid.midStyle = midStyle; iMButtonGrid.lastStyle = lastStyle; return(iMButtonGrid); }
public static IMSlider Slider(this VisualTreeBuilder cache, Rect position, float value, float size, float start, float end, GUIStyle sliderStyle, GUIStyle thumbStyle, bool horiz, int id) { IMSlider iMSlider; cache.NextElement <IMSlider>(out iMSlider); if (id != 0) { iMSlider.AssignControlID(id); } else { iMSlider.GenerateControlID(); } iMSlider.SetProperties(position, value, size, start, end, sliderStyle, thumbStyle, horiz); return(iMSlider); }
public static IMToggle Toggle(this VisualTreeBuilder cache, Rect position, int id, bool value, GUIContent content, GUIStyle style) { IMToggle iMToggle; cache.NextElement <IMToggle>(out iMToggle); if (id != 0) { iMToggle.AssignControlID(id); } else { iMToggle.GenerateControlID(); } iMToggle.position = position; iMToggle.text = content.text; iMToggle.style = style; iMToggle.value = value; return(iMToggle); }