Home Reference Source

vgui/20-text-changed-event.js

/**
 * Usually emitted by TextBoxes
 */
export class TextChangedEvent extends SourceEvent {
	constructor(text) {
		super("TextChanged", {text: text});
	}

	/**
	 * Creates this type based on a source engine KeyValues entry
	 */
	static __fromSource(type, data)
	{
		const result = new TextChangedEvent();
		result.data = data;
		return result;
	}
}

SourceEvent.__eventTypes["TextChanged"] = TextChangedEvent;