16
WME sources discussion / Re: entity image sizeX and sizeY
« on: August 24, 2012, 07:09:22 PM »
Problem with .Height is that its work only with region. On image it returns a 0. Or maybe i just use it wrong
IRC channel - server: waelisch.de channel: #wme (read more)
Ah, I see what Mnemonic meant by catching the change to the editor. Didn't realize that was possible. Very helpful, thanks
For anyone needing this filter, append an equal sign to the operators to capture the letters Aa and Zz: <=, >=
Hello Venom, were you able to filter character input? If so, how? I don't want the player to submit only a blank "space" without letters.
var NewEditorText =new String(Editor.Text);
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122)) // A-Z or a-z
{
Editor.Text = NewEditorText;
}
else
{
if (key!=8) //backspace
{
var lenght = NewEditorText.Length;
var ClearText = NewEditorText.Substr(0,lenght-1); //remove last digit
Editor.Text = ClearText;
}
}
Whats so hard about adding a script to each sprite? It is made automatically, and it just use the
on "LeftClick"
{
this.Visible = false;
}
По идее, поможет Game.ActiveObject(), который "Returns the object which is currently under the mouse cursor (or null if there's none)" -
on "Keypress"
{
if (Keyboard.IsControl)
{
Game.Msg("bla bla");
}
}
- workingon "Keypress"
{
if (Keyboard.IsAlt)
{
Game.Msg("bla bla");
}
}
-not working.