diff options
author | WasabiRaptor <ketchupraptor@gmail.com> | 2024-11-13 17:16:19 -0500 |
---|---|---|
committer | WasabiRaptor <ketchupraptor@gmail.com> | 2024-11-13 17:16:19 -0500 |
commit | 46f4b5b07e762bff563ec20d2a1c7ac6e2699b84 (patch) | |
tree | 8c5898b2efdb6d530a92ee479a7334aca0cf259c | |
parent | 3b40e89b3297a97a833711dbb77734b0412ac1d9 (diff) |
add dedicated create character button to the CharSelectionPane
so people don't have to scroll to the bottom of their character list to create new characters
-rw-r--r-- | assets/opensb/interface/windowconfig/charselection.config.patch | 9 | ||||
-rw-r--r-- | source/frontend/StarCharSelection.cpp | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/assets/opensb/interface/windowconfig/charselection.config.patch b/assets/opensb/interface/windowconfig/charselection.config.patch new file mode 100644 index 0000000..731a075 --- /dev/null +++ b/assets/opensb/interface/windowconfig/charselection.config.patch @@ -0,0 +1,9 @@ +[{"op":"merge", "path":"", "value": { + "createCharButton" : { + "type" : "button", + "base" : "/interface/title/createcharacter.png", + "hover" : "/interface/title/createcharacterover.png", + "position" : [23, 241], + "pressedOffset" : [0, 0] + } +}}] diff --git a/source/frontend/StarCharSelection.cpp b/source/frontend/StarCharSelection.cpp index 50b527d..4c56d59 100644 --- a/source/frontend/StarCharSelection.cpp +++ b/source/frontend/StarCharSelection.cpp @@ -27,6 +27,7 @@ CharSelectionPane::CharSelectionPane(PlayerStoragePtr playerStorage, guiReader.registerCallback("charSelector2", [=](Widget*) { selectCharacter(1); }); guiReader.registerCallback("charSelector3", [=](Widget*) { selectCharacter(2); }); guiReader.registerCallback("charSelector4", [=](Widget*) { selectCharacter(3); }); + guiReader.registerCallback("createCharButton", [=](Widget*) { m_createCallback(); }); guiReader.construct(root.assets()->json("/interface/windowconfig/charselection.config"), this); } |