How can i create an option menu with comboboxes?

Hi Im creating a game and so far I’ve seen games that use combo boxes to set graphics and i was wondering how to do that as i can’t find any help :slight_smile:

Best regards,
Nijo

i suggest you creating a new map, a “menu map” create a new HUD, and set this HUD as the default HUD for the “menu map”, you can add a “combobox” from the “input” section by just dragging it to the map, you can configure the combo box in this menu in the left side of the screen, you have to bind it to a blueprint and change the graphics based on the option the player chooses, to change the graphics inside blueprint use “get game user settings” and from these settings you can change shadows/Antialiasing/textures etc.

I’ve done that ages ago I have the whole graphics for the menu done i was just wondering how to bind them :slight_smile:
Anyway thanks for trying to help me!

i’m not sure if “i’ve done that ages ago” means you’ve found the answer for your questions or you already have the menu but still don’t have the “code part”, i will answer anyway just in case someone else have the same trouble.

to create this “OnSelectionChanged” just select the combo box and scroll down, in the “details panel”, under “Events” you will find “on selection changed” you just have to click in the “+”

Thanks i was looking for the coding bit :slight_smile:

Could you explain it more to me on how it works because I’m a bit confused :slight_smile:

sure, the first node is the event that you can create clicking on the “+” button i said before, it returns a text (or string not sure) that is basically the text in the option you selected, so lets suppose theres a option called “high” if you select “high” this node will return “high”, convert to num is a function i created to help me because when you try to change the settings (in nodes like "set anti aliasing quality) he asks you an “int” as input, an int from 0 to 3, where 0 represents low quality, 1=medium, 2=high and 3=epic quality, so the function “convert to num” basically returns 0 if input is “low” 1 if input is “medium” … the “get game user settings” just return the instance of the settings of the game, this is basically where all settings of the game are, then from the “return value” you can acess the instance and set post processing/anti aliasing/shadows or whatever quality, these nodes receives an input from 0 to 3 as i said, the “apply settings” do as it says, apply the settings and also save, you will need a different combobox for every setting (1 for shadows, 1 for anti aliasing …) and for every combobox you will need to create an “onselectionchanged” event, as you can see there’s a lot of events on my blueprint, one for every combobox that changes the respective quality.

Hmm, Could you tell me how to create that function “convert to num” ?

my computer is not here, so i can’t just send you a printscreen, but i’ll try to explain, first i need a input (text/string) and an output (int) in my specific case, the options are “Low” “Medium” “High” and “Epic”, i just created a local int variable and used branchs to compare, if the input = “Low” set this local variable to 0, if =“Medium” set to 1, if =“High” set to 2 and if =“Epic” set to 3 and then return this variable in the return node, i’m pretty sure there’s a better way of doing this, maybe using enums, but that was what i could think at the moment.

Could you send me a screenshot of it just so i can make sure that I’ve done it correctly ?
Thanks!

as i said “my computer is not here, so i can’t just send you a printscreen(screenshot)”

Sorry i forgot to add “when you will be able to” post it :slight_smile:

here, remember that it only works because in my specific case my options in the combobox are “Low” "Medium “High” and “Epic” if your options are different (like “Ultra” instead of “Epic”) you will have to make “adaptations” to this code. good luck.

1 Like

Omg never saw this nodes before, i made all of this with saveBp and execute command, ■■■■ if i knew …

I can’t thank you enough my friend I most likely would never figure it out !

If you want to see how i did it there you go :slight_smile:

1 Like