当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.SetPositionTL方法代码示例

本文整理汇总了C#中TextBox.SetPositionTL方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.SetPositionTL方法的具体用法?C# TextBox.SetPositionTL怎么用?C# TextBox.SetPositionTL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextBox的用法示例。


在下文中一共展示了TextBox.SetPositionTL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PropertyWindow

		public PropertyWindow(GuiManager guiMan, InputManager inpMan, GameData gameData,
			GuiData guiData) : base(GuiManager.cursor)
		{
			#region engine data and GUI object references
			PropertyWindowMessages.guiData = guiData;
			PropertyWindowMessages.gameData = gameData;
			PropertyWindowMessages.guiMan = guiMan;
			PropertyWindowMessages.sprMan = gameData.sprMan;
			PropertyWindowMessages.propWindow = this;

			#endregion 

			#region Initialize this and the WAVListBox
			sclX = 20;
			sclY = 20;
			SetPositionTL(20, 22.8f);
			mMoveBar = true;
			AddXButton();
			mName = "Properties";

			propertiesEditingListBox = this.AddWAVListBox(GuiManager.cursor);
			propertiesEditingListBox.sclX = 7;
			propertiesEditingListBox.sclY = 18.5f;
			propertiesEditingListBox.SetPositionTL(sclX-12.5f, sclY + -.1f);
			propertiesEditingListBox.scrollBarVisible = false;
				
			propertiesEditingListBox.onClick += new FrbGuiMessage(PropertyWindowMessages.propertiesEditingClick);
			GuiManager.AddWindow(this);
			#endregion			

			#region textureGUI

			textureGUI = new WindowArray();
            
            texturePath = AddTextDisplay();
			texturePath.text = "Click button to set texture";
            texturePath.SetPositionTL(propertiesEditingListBox.sclX * 2 + 1, 1.5f);
			textureGUI.Add(texturePath);



			textureOrAnimation = AddComboBox();
			textureOrAnimation.sclX = 7;
			textureOrAnimation.AddItem("Single Texture");
			textureOrAnimation.AddItem("Animation Chain");
			textureOrAnimation.text = "Single Texture";
            textureOrAnimation.SetPositionTL(propertiesEditingListBox.sclX * 2 + 8, 3.5f);
			textureOrAnimation.onItemClick += new FrbGuiMessage(PropertyWindowMessages.updateTextureOrAnimationButton);
			textureGUI.Add(textureOrAnimation);

			#region single texture GUI


			textureButton = AddButton();
			textureButton.sclX = textureButton.sclY = 9;
            textureButton.SetPositionTL(propertiesEditingListBox.sclX * 2 + 10, 14.0f);
			textureButton.onClick += new FrbGuiMessage(PropertyWindowMessages.textureButtonClick);
			textureGUI.Add(textureButton);
			#endregion


			textureGUI.visible = false;

			propertiesEditingListBox.AddWindowArray("Texture", textureGUI);

			#endregion

			#region particlePropertiesGUI
			particlePropertiesGUI = new WindowArray();

			float runningY = 4;

			emitterNameDisplay = this.AddTextDisplay();
			emitterNameDisplay.text = "Name:";
			emitterNameDisplay.SetPositionTL(15, runningY);
			particlePropertiesGUI.Add(emitterNameDisplay);

			emitterName = AddTextBox();
			emitterName.sclX = 5;
			emitterName.SetPositionTL(26, runningY);
			emitterName.onLosingFocus += new FrbGuiMessage(PropertyWindowMessages.emitterNameTextBoxLoseFocus);
			particlePropertiesGUI.Add(emitterName);

			runningY += 3;

			#region x y z position

			xPos = AddTextDisplay();
			xPos.text = "X Pos:";
			xPos.SetPositionTL(15, runningY);
			particlePropertiesGUI.Add(xPos);

			xPosTextBox = AddTextBox();
			xPosTextBox.sclX = 3;
			xPosTextBox.SetPositionTL(24, runningY);
			xPosTextBox.format = TextBox.FormatTypes.DECIMAL;
			xPosTextBox.onLosingFocus += new FrbGuiMessage(PropertyWindowMessages.xPosTextBoxLoseFocus);
			particlePropertiesGUI.Add(xPosTextBox);

			runningY += 2.5f;
//.........这里部分代码省略.........
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:101,代码来源:PropertyWindow.cs


注:本文中的TextBox.SetPositionTL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。