Button name clashes with C++
This commit is contained in:
		@@ -424,7 +424,7 @@ namespace input.internal {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
namespace input {
 | 
			
		||||
    export class Button extends control.Component {
 | 
			
		||||
    export class ButtonTS extends control.Component {
 | 
			
		||||
        private downTime: number;
 | 
			
		||||
        private _isPressed: boolean;
 | 
			
		||||
        private _wasPressed: boolean;
 | 
			
		||||
 
 | 
			
		||||
@@ -43,14 +43,14 @@ namespace input {
 | 
			
		||||
    export class IrSensor extends internal.UartSensor {
 | 
			
		||||
        private channel: IrRemoteChannel
 | 
			
		||||
        private pollRunning: boolean
 | 
			
		||||
        private buttons: Button[];
 | 
			
		||||
        private buttons: ButtonTS[];
 | 
			
		||||
 | 
			
		||||
        constructor() {
 | 
			
		||||
            super()
 | 
			
		||||
            this.channel = IrRemoteChannel.Ch0
 | 
			
		||||
            this.buttons = []
 | 
			
		||||
            for (let i = 0; i < 5; ++i) {
 | 
			
		||||
                this.buttons.push(new Button())
 | 
			
		||||
                this.buttons.push(new ButtonTS())
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
namespace input {
 | 
			
		||||
    export class TouchSensor extends internal.AnalogSensor {
 | 
			
		||||
        button: Button;
 | 
			
		||||
        button: ButtonTS;
 | 
			
		||||
 | 
			
		||||
        constructor() {
 | 
			
		||||
            super()
 | 
			
		||||
            this.button = new Button()
 | 
			
		||||
            this.button = new ButtonTS()
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        _query() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user