smiley22 / XPPlugins

A collection of various small plugins for X-Plane 11 that mostly improve usability
MIT License
33 stars 10 forks source link

Suggestion: BetterMouseYoke #4

Open winkerbie opened 4 years ago

winkerbie commented 4 years ago

Hey, great plugin,

Just wondering if you could add a cross on the centre screen representing where the yoke is 'centred'. It's difficult to tell otherwise if you are still deflecting the ailerons/elevators unless you come out of yoke mode.

Code below

if (rudder_control) {
            /* Draw little bars to indicate maximum rudder deflection. */
            for (int i = 1; i < 3; i++) {
                XPLMDrawString(green, cursor_pos[0] - rudder_defl_dist,
                    cursor_pos[1] + 4 - 7 * i, "|", NULL, xplmFont_Basic);
                XPLMDrawString(green, cursor_pos[0] + rudder_defl_dist,
                    cursor_pos[1] + 4 - 7 * i, "|", NULL, xplmFont_Basic);
            }        
        }
        else {
            XPLMDrawString(green, screen_width/2,
                screen_height/2, "+", NULL, xplmFont_Basic);
        }

Thanks

ccrvlh commented 3 years ago

@winkerbie Had the same issue as you. Did you try the code above? Also, I found that while playing in windowed mode, the center is misconfigured, and the limits aren't working correctly. Wondering if there was a way to make the "extremes" match the game window extreme, and make sure the center of the screen is the yoke in the central position. Any ideas on how to implement? My knowledge in C is next to null, I could give it a try, but any pointeer would be great. Thanks!

5cGOfficial commented 1 year ago

How do I change the code in bettermouseyoke? Can someone please tell me? Do I use datarefeditor? I tried using it, but for some reason I cant find any code related to bettermouseyoke.