Skip to content

Commit

Permalink
feat: Add adaptor hint for configuration assistance
Browse files Browse the repository at this point in the history
  • Loading branch information
r888800009 committed Aug 30, 2024
1 parent b7ec75f commit 46ddc56
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/nijiexpose/windows/spaceedit.d
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@ private:
}
}

/**
this function show hints to help users to configure the adaptor correctly
*/
void adaptorHint(ref Adaptor source) {
/**
for port binding information, we should refer to `facetrack-d/source/ft/adaptors/*.d`
*/

string portHint = "";
if (auto vts = cast(IFMAdaptor) source)
portHint = "iFacialMocap Adpator would listen on udp port 49983";
if (portHint.length > 0)
uiImLabel(portHint ~ "\n" ~ _("Make sure the port is not blocked by firewall."));
}

void adaptorSelect(size_t i, ref Adaptor source, const(char)* adaptorName) {
if (uiImBeginComboBox("ADAPTOR_COMBO", adaptorName)) {
if (uiImSelectable("VTubeStudio")) {
Expand Down Expand Up @@ -272,6 +287,8 @@ public:
}
}

adaptorHint(source);

if (uiImButton(__("Save Changes"))) {
try {
source.setOptions(options[source]);
Expand Down

0 comments on commit 46ddc56

Please sign in to comment.