Class AchievementsStudioSplitPane
Where the Studio's list stops and its detail pane starts, and the draggable bar that moves the boundary.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Studio
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public sealed class AchievementsStudioSplitPane
Remarks
A collaborator with serialized state of its own — the ratio the author dragged the divider to, which has to survive a domain reload the way the rest of their window layout does. The drag itself does not: a mouse button held when the editor recompiles was not still held afterwards.
The ratio is stored rather than the width, so resizing the window keeps the proportion the author chose instead of squeezing one pane to nothing; it is clamped on the way in and again on the way out, because a window narrower than two minimum panes must still show something of both.
Constructors
AchievementsStudioSplitPane()
Declaration
public AchievementsStudioSplitPane()
Fields
MinimumPaneWidth
The narrowest either pane is allowed to become.
Declaration
public const float MinimumPaneWidth = 220
Field Value
| Type | Description |
|---|---|
| float |
SplitterWidth
How wide the draggable bar is.
Declaration
public const float SplitterWidth = 4
Field Value
| Type | Description |
|---|---|
| float |
Methods
DrawSplitter(float)
Draws the bar between the panes and moves the boundary while it is dragged.
Declaration
public bool DrawSplitter(float windowWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| float | windowWidth | The window's current width, which the drag position is read against. |
Returns
| Type | Description |
|---|---|
| bool | True when the boundary moved, so the caller can repaint. |
ListWidthIn(float)
How wide the list pane should be drawn in a window of this width.
Declaration
public float ListWidthIn(float windowWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| float | windowWidth | The window's current width. |
Returns
| Type | Description |
|---|---|
| float | The list pane's width, never leaving the detail pane less than nothing. |