Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Jan 6, 2024
1 parent edd69dd commit a615feb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
24 changes: 23 additions & 1 deletion TOML.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name = "My important BIOS file!"
description = "We need this BIOS file please provide it!"
category = "BIOS files"
type = "filepicker"
extensions = "bin,bios"
required = true
```

Expand All @@ -18,4 +19,25 @@ where <CoreName> is the current core name.

`name` is the pretty name of the setting that appears in the GUI.

`description` is a description that appears when you hover the widget
`description` is a description that appears when you hover the widget.

`category` is the group this widget will appear in. It can be any value and widgets with the same category will be grouped together.

`type` is the type of the widget. It can be `checkbox`, `filepicker`, `text`, `combo`, `slider`.

If the type is filepicker, the setting name will be used in `HydraCore::loadFile()` once right before any rom is loaded.
So for example if you create a filepicker with name `bios_file` and the user configures it to the path `/home/user/mybios.bin`, every time a game is loaded `HydraCore::loadFile("bios_file", "/home/user/mybios.bin")` will be called.
Then the core developer can decide whether to do something with that path or not.

`extensions` is only used by the filepicker to specify a comma separated list of allowed extensions.

`required` is whether or not this field must not be left blank. Hydra won't allow users to load games otherwise.

`default` is the default value of the setting. It can be a boolean (true/false) for checkboxes or string for filepickers/text inputs.

`text_type` is the allowed type of text ie the charset. Leave empty to allow any character, or `num` for numeric, `hex` for hexadecimal or `pass` for password (hides the text in the gui)

`combo_options` is a comma separated list of options for `combo` type

`slider_min` is the minimum `slider` range
`slider_max` is the maximum `slider` range
2 changes: 1 addition & 1 deletion core
Submodule core updated 1 files
+6 −3 include/hydra/core.hxx
3 changes: 2 additions & 1 deletion src/mainwindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ void MainWindow::draw_settings()
ImGui::SetItemTooltip("Enable fancy GUI features that may hinder performance");

auto& cores = Settings::GetCoreInfo();
ImGui::SeparatorText("Core specific settings");
if (cores.size() > 0)
ImGui::SeparatorText("Core specific settings");
for (size_t i = 0; i < cores.size(); i++)
{
if (open_core_settings != -1)
Expand Down

0 comments on commit a615feb

Please sign in to comment.