The Editor object allows you to access the properties of the single line editor controls contained in the game windows. Editor objects can be queried using the Window.GetControl method.
SetFont | Sets a normal font. |
SetImage | Sets a background image (sprite). |
GetImage | Returns the filename of the background sprite (or null if no sprite is set) |
GetImageObject | Returns a reference to the background sprite (or null if no sprite is set) |
Focus | Focuses the control. |
MoveAfter | Moves the control in z-order after a given control. |
MoveBefore | Moves the control in z-order before a given control. |
MoveToTop | Moves the control to the top of the z-order. |
MoveToBottom | Moves the control to the bottom of the z-order. |
SkipTo | Moves an object to a specified location. |
Actions | |
SetSelectedFont | Sets a font for displaying the selected text within the editor control. |
Cursor functions | |
SetCursor | Sets the standard cursor. |
GetCursor | Returns the filename of the cursor sprite (or null if no cursor is set) |
GetCursorObject | Returns a reference to the cursor sprite (or null if no cursor is set) |
RemoveCursor | Removes the standard cursor. |
HasCursor | Queries whether the standard cursor is set. |
Script functions | |
AttachScript | Executes a script file and attaches it to the object. |
DetachScript | Terminates a specified script file and detaches it from an object. |
IsScriptRunning | Queries whether a specified script file is running and attached to an object. |
CanHandleMethod | Queries whether the object supports a method of a specified name. |
Sound functions | |
PlaySound | Plays a sound. If the filename is omitted, the currently assigned sound is played (if any). |
PlaySoundEvent | Plays a sound and triggers an event when the sound is over. If the filename is omitted, the currently assigned sound is played (if any). |
StopSound | Stops the currently playing sound (if any). |
PauseSound | Pauses the currently playing sound. |
ResumeSound | Resumes a paused sound playback. |
IsSoundPlaying | Queries whether a sound playback is in progress. |
SetSoundPosition | Sets the sound's current playing position. |
GetSoundPosition | Queries the sound's current playing position |
SetSoundVolume | Sets a volume of the currently playing sound. |
GetSoundVolume | Gets a volume of the currently playing sound. |
LoadSound | Initializes a sound from file and makes it ready to be played. |
Sound effects functions | |
SoundFXNone | Removes any sound effect currently assigned to this object. |
SoundFXEcho | Assigns an echo effect to the sounds played by this object. |
SoundFXReverb | Assigns a reverb effect to the sounds played by this object. |
Event functions | |
ApplyEvent | Applies a named event to the object. |
CanHandleEvent | Queries whether the object has an event handler for a specified event. |
Parent (read only) | Returns a reference to a parent window of this control (or null) |
ParentNotify | Specifies whether this control should notify its parent about events |
Width | A width of the control |
Height | A height of the control |
Visible | Specifies whether the control is visible |
Disabled | Specifies whether the control is disabled |
Text | A text the control displays |
NextSibling (read only) | Returns a reference to the next control in z-order |
PrevSibling (read only) | Returns a reference to the previous control in z-order |
Type (read only) | Returns always "editor" |
SelStart | Specifies an index of a first selected character in the editor. |
SelEnd | Specifies an index of a last selected character in the editor. |
CursorBlinkRate | Specifies a blinking rate of the editor's cursor (in milliseconds) |
CursorChar | Specifies a character to be used as a blinking cursor. |
FrameWidth | Specifies an offset of the text from the editor's position (in pixels) |
MaxLength | Specifies a maximum allowed lenght of the text contained in the editor (in characters) |
Name | The internal name of the object. |
Caption | The caption of the object. |
AccCaption | A special caption of the object used for accessibility purposes. |
X | The X position of the object. |
Y | The Y position of the object. |
Height (read only) | Returns the current height of the object. In case of actors and entities the scaling is taken into account. |
Filename (read only) | Returns the filename. |
Ready (read only) | Returns whether the object isn't currently performing any action. |
Interactive | Specifies whether the object recieves user input. |
SoundPanning | Specifies whether the sounds played by this object are automatically panned depending on object's position on screen. |
NonIntMouseEvents | Specifies if the object can receive the MouseEntry and MouseLeave events even if the game is in non-interactive mode. |
Movable | Specifies whether the object can be moved by its sprites (in case the sprite frames have a "move" property set). |
Scalable | Specifies whether the object is affected by scene's scaling levels. |
Rotatable | Specifies whether the object is affected by scene's rotation levels. |
Colorable | Specifies whether the object is affected by scene's color regions. |
AlphaColor | Specifies an RGBA color of this object (overrides scene coloring); set to 0 to reset default behavior. |
BlendMode | Specifies how the object's image is blended with the background colors; 0...normal mode, 1...additive blending, 2...subtractive blending |
Scale | Specifies a scale of this object (overrides scene scaling); set to null to reset default behavior. |
ScaleX | Specifies horizontal scale of this object; set to null to reset default behavior. |
ScaleY | Specifies vertical scale of this object; set to null to reset default behavior. |
RelativeScale | Specifies a scale amount to be added to the default scene scale. |
Rotate | Specifies rotation of this object (in degrees); overrides scene rotation; set to null to reset default behavior; not available in compatibility mode |
RelativeRotate | Specifies a rotation amount to be added to the default scene rotation. |
Sets a normal font.
If the method succeeds, the return value is true.
Sets a background image (sprite).
If the method succeeds, the return value is true.
Returns the filename of the background sprite (or null if no sprite is set)
Returns a reference to the background sprite (or null if no sprite is set)
Focuses the control.
Moves the control in z-order after a given control.
If the method succeeds, the return value is true.
Moves the control in z-order before a given control.
If the method succeeds, the return value is true.
Moves the control to the top of the z-order.
If the method succeeds, the return value is true.
Moves the control to the bottom of the z-order.
If the method succeeds, the return value is true.
Moves an object to a specified location.
Sets a font for displaying the selected text within the editor control.
If the method succeeds, the return value is true.
Sets the standard cursor.
Returns true if the cursor has been set succesfuly.
Returns the filename of the cursor sprite (or null if no cursor is set)
Returns a reference to the cursor sprite (or null if no cursor is set)
Removes the standard cursor.
Queries whether the standard cursor is set.
Returns true if the object has a custom mouse pointer assigned.
Executes a script file and attaches it to the object.
Returns true if the script has been executed succesfuly.
Each WME object can have multiple scripts attached.
Terminates a specified script file and detaches it from an object.
Returns true if the script has been detached succesfully.
Script threads are currently executed event handlers and methods.
Queries whether a specified script file is running and attached to an object.
Returns true if a specified script file is attached to an object.
Queries whether the object supports a method of a specified name.
Returns true if the object is able to handle the specified method.
Plays a sound. If the filename is omitted, the currently assigned sound is played (if any).
If the method succeeds, the return value is true.
Plays a sound and triggers an event when the sound is over. If the filename is omitted, the currently assigned sound is played (if any).
If the method succeeds, the return value is true.
Stops the currently playing sound (if any).
If the method succeeds, the return value is true.
Pauses the currently playing sound.
If the method succeeds, the return value is true.
Resumes a paused sound playback.
If the method succeeds, the return value is true.
Queries whether a sound playback is in progress.
If the sound is playing, the return value is true.
Sets the sound's current playing position.
If the method succeeds, the return value is true.
Queries the sound's current playing position
Returns the current playing position (in milliseconds).
Sets a volume of the currently playing sound.
If the method succeeds, the return value is true.
Gets a volume of the currently playing sound.
Returns the volume of the currently playing sound (in percent).
Initializes a sound from file and makes it ready to be played.
If the method succeeds, the return value is true.
Use this method to pre-cache a sound file. Initializing the sound takes some time and sometimes it's desirable to move all sound initialization to e.g. scene start so that the subsequent PlaySound calls don't slow the game down. That's what LoadSound is for. To play the pre-cached sound simply call PlaySound without specifying a filename, for example SomeObject.PlaySound(false);
Removes any sound effect currently assigned to this object.
Assigns an echo effect to the sounds played by this object.
Example: actor.SoundFXEcho(50, 50);
Assigns a reverb effect to the sounds played by this object.
Example: actor.SoundFXReverb(0, 0, 2000);
Applies a named event to the object.
Returns true it the event has been applied succesfuly.
Queries whether the object has an event handler for a specified event.
Returns true if the object is able to handle the specified event.