![]() |
|
Create a dropdown menu that references .ini file - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion) +--- Thread: Create a dropdown menu that references .ini file (/Thread-create-a-dropdown-menu-that-references-ini-file) |
Create a dropdown menu that references .ini file - LittleCoaks - 09-11-2021 So i'm trying to add in a dropdown menu (QComboBox) which would reference specific strings stored in an .ini file. I saw the system used in InterfacePane.cpp, which looks like this: Code: // Theme ComboboxSo i understand how this works, but it's not exactly what i'm looking for. This system obtains the names of files in the Themes folder directory, rather than parsing an .ini which is what i'm trying to do. The values i have stored are in a file called "LocalPlayers.ini" (in dolphin, it's stored as "F_LOCALPLAYERSCONFIG_IDX" in FileUtil.h) and the format of that file is as follows: Code: [Local_Players_List]Basically, "+" indicates the start of a new username, and the brackets [] are for user ID's (which is for something else not related to this). I just want the dropdown menu to reference usernames, which would be stored between "+" and "[" An important thing to note is that i want the dropdown to reference the .ini because i already made a system where players can add in users themselves (otherwise i could just hard-code the dropdown menu). But i'm stuck there, since i'm not sure exactly how to go about this. If someone could just point me in the right direction, that would be highly appreciated. I'm still fairly new to programming as a whole. Thank you! |