本文整理汇总了C#中FlatRedBall.Gui.Window类的典型用法代码示例。如果您正苦于以下问题:C# Window类的具体用法?C# Window怎么用?C# Window使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Window类属于FlatRedBall.Gui命名空间,在下文中一共展示了Window类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScaleAllPolygons
void ScaleAllPolygons(Window callingWindow)
{
Window polyScaleWindow = GuiManager.AddWindow();
polyScaleWindow.Name = "Scale All Polygons";
polyScaleWindow.ScaleX = 10f;
polyScaleWindow.ScaleY = 4f;
polyScaleWindow.HasMoveBar = true;
polyScaleWindow.HasCloseButton = true;
UpDown scaleBox = new UpDown(mCursor);
polyScaleWindow.AddWindow(scaleBox);
scaleBox.Name = "scale";
scaleBox.CurrentValue = 1f;
scaleBox.ScaleX = 9f;
scaleBox.X = 10f;
scaleBox.Y = Window.MoveBarHeight;
Button okButton = new Button(mCursor);
polyScaleWindow.AddWindow(okButton);
okButton.Text = "Set Scale";
okButton.ScaleX = 9f;
okButton.X = 10f;
okButton.Y = scaleBox.Y + scaleBox.ScaleY * 2f;
okButton.Click += ScalePolygonsOK;
}
示例2: SpriteYPosBoxGuiChange
public static void SpriteYPosBoxGuiChange(Window callingWindow)
{
if(EditorData.EditorLogic.CurrentSprites.Count == 0) return;
EditorData.EditorLogic.CurrentSprites[0].Y = ((UpDown)callingWindow).CurrentValue;
}
示例3: ComboBoxItemClick
void ComboBoxItemClick(Window callingWindow)
{
if (ItemSelect != null)
{
ItemSelect(this);
}
}
示例4: ShiftSceneOk
private void ShiftSceneOk(Window callingWindow)
{
if (OkClick != null)
{
OkClick(this);
}
}
示例5: SetChildrenWindowPositionsAndScales
void SetChildrenWindowPositionsAndScales(Window callingWindow)
{
mAllProperties.ScaleX = (ScaleX - 1.5f) / 2.0f;
mAllProperties.ScaleY = ScaleY - 3.9f;
mAllProperties.X = mAllProperties.ScaleX + .7f;
mAllProperties.Y = 1.7f + mAllProperties.ScaleY;
mPropertiesToSave.ScaleX = mAllProperties.ScaleX;
mPropertiesToSave.ScaleY = mAllProperties.ScaleY;
mPropertiesToSave.X = (ScaleX * 2) - mPropertiesToSave.ScaleX - .7f;
mPropertiesToSave.Y = mAllProperties.Y;
mOkButton.Y = ScaleY * 2 - 1.5f;
mCancelButton.Y = ScaleY * 2 - 1.5f;
mCancelButton.X = ScaleX * 2 - .7f - mCancelButton.ScaleX;
mOkButton.X = mCancelButton.X - mCancelButton.ScaleX - .5f - mOkButton.ScaleX;
mAllPropertiesDisplay.X = .7f;
mAllPropertiesDisplay.Y = 1;
mPropertiesToSaveDisplay.X = mPropertiesToSave.X - mPropertiesToSave.ScaleX;
mPropertiesToSaveDisplay.Y = 1;
mUseAllButton.X = mAllProperties.X;
mUseAllButton.ScaleX = mAllProperties.ScaleX;
mUseAllButton.Y = this.ScaleY * 2 - 4.8f;
}
示例6: RestoreToStateBefore
void RestoreToStateBefore(Window callingWindow)
{
if (this.mCursor.PrimaryDown && this.mCursor.WindowPushed == this)
{
this.ButtonPushedState = mStateBeforePrimaryPush;
}
}
示例7: RemovalOfWatchedWindow
private void RemovalOfWatchedWindow(Window callingWindow)
{
IObjectDisplayer asObjectDisplayer = callingWindow as IObjectDisplayer;
GuiManager.RemoveWindow(callingWindow);
if (asObjectDisplayer.ObjectDisplayingAsObject != null &&
mObjectDisplayers.ContainsKey(asObjectDisplayer.ObjectDisplayingAsObject))
{
mObjectDisplayers.Remove(asObjectDisplayer.ObjectDisplayingAsObject);
}
else
{
// We still need to see if this Window is contained in this dictionary even
// if the previous if statement fails. The reason for this is because of value
// and immutable types. For example, a String PropertyGrid might open up for the
// value "". Afterwards, the user changes the value and then double-clicks a list
// to open a new PropertyGrid. Since the string has changed, then asObjectDisplayer.ObjectDisplayingAsObject
// will no longer equal the "" string so the Window will never be removed when it should be.
object keyToRemove = null;
foreach (KeyValuePair<object, IObjectDisplayer> kvp in mObjectDisplayers)
{
if (kvp.Value == asObjectDisplayer)
{
keyToRemove = kvp.Key;
break;
}
}
if (keyToRemove != null)
{
mObjectDisplayers.Remove(keyToRemove);
}
}
if (mWindowFamilies.ContainsValue(asObjectDisplayer))
{
// Remove the object by its value
IObjectDisplayer keyToRemove = null;
foreach (KeyValuePair<IObjectDisplayer, IObjectDisplayer> kvp in mWindowFamilies)
{
if (kvp.Value == asObjectDisplayer)
{
keyToRemove = kvp.Key;
break;
}
}
if (keyToRemove != null)
{
mWindowFamilies.Remove(keyToRemove);
}
}
}
示例8: playButtonClick
void playButtonClick(Window callingWindow)
{
if (PlayClick != null)
{
PlayClick(this);
}
}
示例9: TextBoxEnter
void TextBoxEnter(Window callingWindow)
{
AddText(mTextBox.Text);
mTextBox.Text = "";
Input.InputManager.ReceivingInput = mTextBox;
}
示例10: OnEditButtonClick
void OnEditButtonClick(Window callingWindow)
{
if (EditButtonClick != null)
{
EditButtonClick(this);
}
}
示例11: OnSetButtonClick
void OnSetButtonClick(Window callingWindow)
{
if (SetButtonClick != null)
{
SetButtonClick(this);
}
}
示例12: SaveActiveScene
void SaveActiveScene(Window callingWindow)
{
FileWindow fileWindow = GuiManager.AddFileWindow();
fileWindow.SetToSave();
fileWindow.SetFileType("scnx");
fileWindow.OkClick += SaveActiveSceneOk;
}
示例13: SaveInstructionCodeClick
void SaveInstructionCodeClick(Window callingWindow)
{
FileWindow fileWindow = GuiManager.AddFileWindow();
fileWindow.SetToSave();
fileWindow.SetFileType("txt");
fileWindow.OkClick += SaveInstructionCodeOk;
}
示例14: toStartButtonClick
void toStartButtonClick(Window callingWindow)
{
if (ToStartClick != null)
{
ToStartClick(this);
}
}
示例15: AddSpriteClick
void AddSpriteClick(Window callingWindow)
{
FileWindow fileWindow = GuiManager.AddFileWindow();
fileWindow.SetToLoad();
fileWindow.SetFileType("graphic and animation");
fileWindow.OkClick += AddSpriteOk;
}