public NumericSetTexture(int minNumber, int maxNumber, int allowNumber, int?nowNumber, Vector2 position, bool isModeS) { MinNumber = minNumber; MaxNumber = maxNumber; AllowNumber = allowNumber; NowNumber = nowNumber; Position = position; Unit = 10; IsModeS = isModeS; if (IsModeS) { groundTextureWidth = 147; groundTextureHeight = 32; fillTextureWidth = 145; fillTextureHeight = 28; leftTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSetS", "Minus", null) { Enable = Enable }; rightTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSetS", "Plus", null) { Enable = Enable }; } else { groundTextureWidth = 226; groundTextureHeight = 48; fillTextureWidth = 216; fillTextureHeight = 38; leftTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSet", "Minus", null) { Enable = Enable }; rightTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSet", "Plus", null) { Enable = Enable }; } SetPositions(position); }
public NumericSetTextureF(float minNumber, float maxNumber, float allowNumber, float?nowNumber, Vector2 position, bool isModeS) { MinNumber = minNumber; MaxNumber = maxNumber; AllowNumber = allowNumber; NowNumber = nowNumber; Position = position; Unit = 10f; IsModeS = isModeS; if (IsModeS) { groundTextureWidth = 147 + Widthchange; groundTextureHeight = 32 + Heightchange; fillTextureWidth = 143 + Widthchange; fillTextureHeight = 32 + Heightchange; leftTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSetS", "Minus", null) { Enable = Enable }; rightTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSetS", "Plus", null) { Enable = Enable }; } else { groundTextureWidth = 226 + Widthchange; groundTextureHeight = 48 + Heightchange; fillTextureWidth = 216 + Widthchange; fillTextureHeight = 38 + Heightchange; leftTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSet", "Minus", null) { Enable = Enable }; rightTexture = new ButtonTexture(@"Content\Textures\Resources\Start\NumberSet", "Plus", null) { Enable = Enable }; } SetPositions(position); }
public TextBox(TextBoxStyle style, string text) { TextBoxStyle = style; btTexture = new ButtonTexture(@"Content\Textures\Resources\Start\TextBox-" + TextBoxStyle.ToString(), "TextBox-" + TextBoxStyle.ToString(), null) { FireEventWhenUnEnable = true }; Cursor = TextBoxStyle.ToString(); MouseOver = false; Visible = true; Enable = true; Text = text; ViewText = Text.WordsSubString(8); //if (Setting.Current.Language == "传统" && !String.IsNullOrEmpty(ViewText)) //{ // ViewText = ViewText.TranslationWords(false, true); //} }