UI keyboard miss-aligned

I am trying to get a project out the door this week and the alignment of the onscreen keyboard in the UI on the 4.3" 480x272 LCD is making it impossible to release this to client.

I know we can edit the libraries but I have a tight deadline as it is without having to delve into the issue. Has anyone else seen this issue and has there been a fix for it?

I’ve just raised the issue on GITHUB.

Ha ha. Took me less time than I thought to track it down just now. Updated GITHUB but this is the fix below.

In the following function at the start, the scale is applied and then the offset but needs to be reversed.

private void OnTouchUp(object sender, TouchEventArgs e) {

//            var x = (int)(e.Touches[0].X * this.scaleX - this.offsetX);
//            var y = (int)(e.Touches[0].Y * this.scaleY - this.offsetY);
            var x = (int)((e.Touches[0].X - this.offsetX) * this.scaleX);
            var y = (int)((e.Touches[0].Y - this.offsetY) * this.scaleY);
4 Likes