Skip to content

Commit

Permalink
Merge pull request #429 from PenteractStudios/feature/update-engine-v…
Browse files Browse the repository at this point in the history
…ersion

Tesseract v1.0.1
  • Loading branch information
Jordi-Gil authored Nov 5, 2021
2 parents c2b1ba1 + 3ec5ec5 commit 0ba8241
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ComponentSelectable : public Component
const float4 GetSelectedColor() const; // Returns colorSelected
TransitionType GetTransitionType() const;
void TryToClickOn(bool internalCall) const; //internalCall means if the buttons is supposed to show it's been pressed (false) or if its supposed to actually do whatever it does when pressed (true)
bool IsClicked() const;
TESSERACT_ENGINE_API bool IsClicked() const;

public:
UID onAxisUp = 0;
Expand Down
15 changes: 7 additions & 8 deletions Penteract/Engine/Source/Modules/ModuleUserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,23 @@ void ModuleUserInterface::ManageInputsOnSelected(ComponentSelectable* currentlyS

if (!slider) {
if (pressingOnSelected) {
if (currentlySelected->IsClicked()) {
if (!currentlySelected->IsClicked()) {
if (!wasPressConfirmed) {
currentlySelected->TryToClickOn(false);
//SETCLICKEDINTERNAL
currentlySelected->TryToClickOn(true);
wasPressConfirmed = true;
//CONFIRM PRESS
}
} else {
currentlySelected->TryToClickOn(true);
//SETCLICKEDINTERNAL
}
} else {
if (wasPressConfirmed) {
currentlySelected->TryToClickOn(false);
//CONFIRM PRESS
}
wasPressConfirmed = false;
}

//Sliders are handled separately, all other UI components can be managed through this code
} else {
//TODO MANAGE BEING HANDLED BOOl

if (pressingOnSelected) {
if (!wasPressConfirmed) {
wasPressConfirmed = true;
Expand Down
Binary file modified Penteract/Engine/Tesseract.exe
Binary file not shown.
Binary file modified Penteract/Tesseract.exe
Binary file not shown.
Binary file modified Penteract/Tesseract.lib
Binary file not shown.

0 comments on commit 0ba8241

Please sign in to comment.