vbousquet / flexdmd

A DMD renderer for Visual Pinball original tables.
Apache License 2.0
61 stars 13 forks source link

Color Rendering in PinballY Script #19

Closed apophis79 closed 3 years ago

apophis79 commented 3 years ago

Hello, I'm interested in rendering the PinballY DMD object in a different color (white) ... not the standard orange. I tried including the following lines of code in my main.js file, but when I did the DMD did not render at all.:

    if (dmd == null) {
        dmd = createAutomationObject("FlexDMD.FlexDMD");
        dmd.GameName = "";
                dmd.Color = RGB(255,255,255);   //<--- new code
                dmd.RenderMode = 0;             //<--- new code
                dmd.Width = 128;
        dmd.Height = 32;
        dmd.Show = true;
        dmd.Run = true;
        udmd = dmd.NewUltraDMD();
    }

What am I doing wrong? Thank you, Dan

vbousquet commented 3 years ago

The line dmd.Color = RGB(255,255,255); is unlikely to work since afaik there is no RGB method in javascript that would create an rgb object. I do not know how to create a color in javascript, so I do not have anysolution to propose.