#Struggling to apply ENUM

9 messages · Page 1 of 1 (latest)

naive pine
#

in my config I've got

        {
            Windowed,
            Fullscreen,
            Borderless,
        }

        @ConfigItem(
                position = 2,
                keyName = "window",
                name = "Window Settings",
                description = "Window Settings"
        )
        default WindowState enumConfig() { return WindowState.Windowed;

        }



        @ConfigItem(
                position = 1,
                keyName = "monitor",
                name = "Main Monitor",
                description = "Main Monitor"
        )
        default int intConfig() { return 1; }```
remote wagonBOT
#

This post has been reserved for your question.

Hey @naive pine! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

naive pine
#

and in my main I've got ```Frame[] frames = Frame.getFrames();
for (Frame frame : frames)
{

        if (frame instanceof ContainableFrame)
        {
            frame.setUndecorated(true);
            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
            return;
        }
    }
}```
#

I would like 3 variations based off what the enum is set to

#

one being

                return;```

one being 

```frame.setUndecorated(true);
                frame.setExtendedState(Frame.MAXIMIZED_BOTH);
                return;```

and one being

```frame.setUndecorated(false);```
naive pine
#

lemme know if anyone can figure this out

trail flare
#

I imagine you're probably using something like JavaFX but specifying what it is you're working with is always a better idea than not

naive pine