Skip to main content

UIConfig

Namespace:FairyGUI
Source:Assets/Scripts/UI/UIConfig.cs (line 10)

public class UIConfig : MonoBehaviour

Global configs. These options should be set before any UI construction.

Fields​

Items​

public List<ConfigValue> Items;

Source:UI/UIConfig.cs (line 237)

PreloadPackages​

public List<string> PreloadPackages;

Source:UI/UIConfig.cs (line 238)

allowSoftnessOnTopOrLeftSide​

public static bool allowSoftnessOnTopOrLeftSide;

Allow softness on top or left side for scrollpane.

Source:UI/UIConfig.cs (line 141)

bringWindowToFrontOnClick​

public static bool bringWindowToFrontOnClick;

When click the window, brings to front automatically.

Source:UI/UIConfig.cs (line 146)

buttonSound​

public static NAudioClip buttonSound;

Default button click sound.

Source:UI/UIConfig.cs (line 41)

buttonSoundVolumeScale​

public static float buttonSoundVolumeScale;

Default button click sound volume.

Source:UI/UIConfig.cs (line 46)

clickDragSensitivity​

public static int clickDragSensitivity;

Pixel offsets of mouse pointer to trigger dragging.

Source:UI/UIConfig.cs (line 136)

defaultComboBoxVisibleItemCount​

public static int defaultComboBoxVisibleItemCount;

The number of visible items in ComboBox.

Source:UI/UIConfig.cs (line 121)

defaultFont​

public static string defaultFont;

Dynamic Font Support. 4.x: Put the xxx.ttf into /Resources or /Resources/Fonts, and set defaultFont="xxx". 5.x: set defaultFont to system font name(or names joint with comma). e.g. defaultFont="Microsoft YaHei, SimHei"

Source:UI/UIConfig.cs (line 18)

defaultScrollBarDisplay​

public static ScrollBarDisplayType defaultScrollBarDisplay;

Scrollbar display mode. Recommended 'Auto' for mobile and 'Visible' for web.

Source:UI/UIConfig.cs (line 76)

defaultScrollBounceEffect​

public static bool defaultScrollBounceEffect;

The "rebound" effect in the scolling container.

Source:UI/UIConfig.cs (line 86)

defaultScrollDecelerationRate​

public static float defaultScrollDecelerationRate;

Deceleration ratio of scrollpane when its in touch dragging. 当手指拖动并释放滚动区域后,内容会滑动一定距离后停下,这个速率就是减速的速率。 越接近1,减速越慢,意味着滑动的时间和距离更长。 这个是全局设置,也可以通过ScrollPane.decelerationRate进行个性设置。

Source:UI/UIConfig.cs (line 71)

defaultScrollPagingThreshold​

public static float defaultScrollPagingThreshold;

When the scrolling container is set to "page mode", it determines the scrolling distance threshold to which page to turn.

Source:UI/UIConfig.cs (line 96)

defaultScrollSnappingThreshold​

public static float defaultScrollSnappingThreshold;

When the scrolling container is set to "snap to the item", the rolling distance threshold of which item is close to is determined.

Source:UI/UIConfig.cs (line 91)

defaultScrollStep​

public static float defaultScrollStep;

Scrolling step in pixels 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2

Source:UI/UIConfig.cs (line 63)

defaultScrollTouchEffect​

public static bool defaultScrollTouchEffect;

Allow dragging anywhere in container to scroll.

Source:UI/UIConfig.cs (line 81)

depthSupportForPaintingMode​

public static bool depthSupportForPaintingMode;

if RenderTexture using in painting mode has depth support.

Source:UI/UIConfig.cs (line 166)

enhancedTextOutlineEffect​

public static bool enhancedTextOutlineEffect;

Indicates whether to draw extra 4 or 8 times to achieve stroke effect for textfield. If it is true, that is the 8 times, otherwise it is the 4 times.

Source:UI/UIConfig.cs (line 172)

frameTimeForAsyncUIConstruction​

public static float frameTimeForAsyncUIConstruction;

Source:UI/UIConfig.cs (line 161)

globalModalWaiting​

public static string globalModalWaiting;

Resource using in GRoot.ShowModalWait for locking the screen.

Source:UI/UIConfig.cs (line 31)

horizontalScrollBar​

public static string horizontalScrollBar;

Resource url of horizontal scrollbar

Source:UI/UIConfig.cs (line 51)

inputCaretSize​

public static float inputCaretSize;

Source:UI/UIConfig.cs (line 151)

inputHighlightColor​

public static Color inputHighlightColor;

Source:UI/UIConfig.cs (line 156)

loaderErrorSign​

public static string loaderErrorSign;

In case of failure of loading content for GLoader, use this sign to indicate an error.

Source:UI/UIConfig.cs (line 111)

makePixelPerfect​

public static bool makePixelPerfect;

Suggest to enable it on low dpi (e.g. 96dpi) screens.

Source:UI/UIConfig.cs (line 180)

modalLayerColor​

public static Color modalLayerColor;

When a modal window is in front, the background becomes dark.

Source:UI/UIConfig.cs (line 36)

popupMenu​

public static string popupMenu;

Resources url of PopupMenu.

Source:UI/UIConfig.cs (line 101)

popupMenu_seperator​

public static string popupMenu_seperator;

Resource url of menu seperator.

Source:UI/UIConfig.cs (line 106)

renderingTextBrighterOnDesktop​

public static bool renderingTextBrighterOnDesktop;

Source:UI/UIConfig.cs (line 21)

richTextRowVerticalAlign​

public static VertAlignType richTextRowVerticalAlign;

Source:UI/UIConfig.cs (line 175)

soundLoader​

public static SoundLoader soundLoader;

Source:UI/UIConfig.cs (line 460)

tooltipsWin​

public static string tooltipsWin;

Resource url of tooltips.

Source:UI/UIConfig.cs (line 116)

touchDragSensitivity​

public static int touchDragSensitivity;

Pixel offsets of finger to trigger dragging

Source:UI/UIConfig.cs (line 131)

touchScrollSensitivity​

public static int touchScrollSensitivity;

Pixel offsets of finger to trigger scrolling

Source:UI/UIConfig.cs (line 126)

verticalScrollBar​

public static string verticalScrollBar;

Resource url of vertical scrollbar

Source:UI/UIConfig.cs (line 56)

windowModalWaiting​

public static string windowModalWaiting;

Resource using in Window.ShowModalWait for locking the window.

Source:UI/UIConfig.cs (line 26)

Methods​

ApplyModifiedProperties()​

public void ApplyModifiedProperties();

Source:UI/UIConfig.cs (line 450)

ClearResourceRefs()​

public static void ClearResourceRefs();

Source:UI/UIConfig.cs (line 435)

Load()​

public void Load();

Source:UI/UIConfig.cs (line 253)

SetDefaultValue(ConfigKey, ConfigValue)​

public static void SetDefaultValue(ConfigKey key, ConfigValue value);
ParameterTypeDescription
keyConfigKey
valueConfigValue

Source:UI/UIConfig.cs (line 372)