This commit is contained in:
mushgunAX 2023-01-25 23:54:04 +08:00
parent bde191aeca
commit ac10b95b01
1 changed files with 49 additions and 5 deletions

View File

@ -58,7 +58,7 @@ namespace SHADE
{ {
ImGui::BeginTooltip(); ImGui::BeginTooltip();
ImGui::Text(".SHConfig will be appeneded to file name"); ImGui::Text(".SHConfig will be appeneded to file name");
ImGui::Text("If no name is provided, saves to \"Assets/Bindings.SHConfig\""); ImGui::Text("If no name is provided, saves to or loads from \"Assets/Bindings.SHConfig\"");
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
@ -258,6 +258,12 @@ namespace SHADE
//Positive key codes //Positive key codes
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Positive Key Codes:"); ImGui::Text("Positive Key Codes:");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("When this keyboard or mouse button is held, causes the value to go positive, or negative when inverted");
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
//Button to ask for inputs //Button to ask for inputs
@ -274,7 +280,12 @@ namespace SHADE
if (positiveKeyListeningFor == entryNumber) if (positiveKeyListeningFor == entryNumber)
{ {
//Listening for inputs //Listening for inputs
ImGui::Button(labelConcat("Press##positiveKeyCode", entryNumber).c_str()); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.4f, 0.4f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1.0f, 0.5f, 0.5f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.6f, 0.3f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
ImGui::Button(labelConcat("PRESS##positiveKeyCode", entryNumber).c_str());
ImGui::PopStyleColor(4);
SHInputManager::SH_KEYCODE k; SHInputManager::SH_KEYCODE k;
if (SHInputManager::AnyKey(&k)) if (SHInputManager::AnyKey(&k))
@ -317,6 +328,12 @@ namespace SHADE
//Negative key codes //Negative key codes
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Negative Key Codes:"); ImGui::Text("Negative Key Codes:");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("When this keyboard or mouse button is held, causes the value to go negative, or positive when inverted");
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
//Button to ask for inputs //Button to ask for inputs
@ -333,7 +350,12 @@ namespace SHADE
if (negativeKeyListeningFor == entryNumber) if (negativeKeyListeningFor == entryNumber)
{ {
//Listening for inputs //Listening for inputs
ImGui::Button(labelConcat("Press##negativeKeyCode", entryNumber).c_str()); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.4f, 0.4f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1.0f, 0.5f, 0.5f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.6f, 0.3f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
ImGui::Button(labelConcat("PRESS##negativeKeyCode", entryNumber).c_str());
ImGui::PopStyleColor(4);
SHInputManager::SH_KEYCODE k; SHInputManager::SH_KEYCODE k;
if (SHInputManager::AnyKey(&k)) if (SHInputManager::AnyKey(&k))
@ -375,6 +397,12 @@ namespace SHADE
//Positive controller codes //Positive controller codes
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Positive Controller Codes:"); ImGui::Text("Positive Controller Codes:");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("When this controller button is held, causes the value to go positive, or negative when inverted");
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
//Button to ask for inputs //Button to ask for inputs
@ -391,7 +419,12 @@ namespace SHADE
if (positiveControllerListeningFor == entryNumber) if (positiveControllerListeningFor == entryNumber)
{ {
//Listening for inputs //Listening for inputs
ImGui::Button(labelConcat("Press##positiveControllerCode", entryNumber).c_str()); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.4f, 0.4f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1.0f, 0.5f, 0.5f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.6f, 0.3f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
ImGui::Button(labelConcat("PRESS##positiveControllerCode", entryNumber).c_str());
ImGui::PopStyleColor(4);
SHInputManager::SH_CONTROLLERCODE c; SHInputManager::SH_CONTROLLERCODE c;
if (SHInputManager::AnyControllerInput(&c)) if (SHInputManager::AnyControllerInput(&c))
@ -433,6 +466,12 @@ namespace SHADE
//Negative controller codes //Negative controller codes
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Negative Controller Codes:"); ImGui::Text("Negative Controller Codes:");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("When this controller button is pressed, causes the value to go negative, or positive when inverted");
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
//Button to ask for inputs //Button to ask for inputs
@ -449,7 +488,12 @@ namespace SHADE
if (negativeControllerListeningFor == entryNumber) if (negativeControllerListeningFor == entryNumber)
{ {
//Listening for inputs //Listening for inputs
ImGui::Button(labelConcat("Press##negativeControllerCode", entryNumber).c_str()); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.4f, 0.4f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1.0f, 0.5f, 0.5f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.6f, 0.3f, 0.3f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
ImGui::Button(labelConcat("PRESS##negativeControllerCode", entryNumber).c_str());
ImGui::PopStyleColor(4);
SHInputManager::SH_CONTROLLERCODE c; SHInputManager::SH_CONTROLLERCODE c;
if (SHInputManager::AnyControllerInput(&c)) if (SHInputManager::AnyControllerInput(&c))