We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class JoyButtonSlot should be divided into several smaller classes with common ancestor.
JoyButtonSlot
It would help to avoid mess in code.
New classes should describe actions and execution of them. It would help avoiding things like:
void sendevent(JoyButtonSlot *slot, bool pressed) { JoyButtonSlot::JoySlotInputAction device = slot->getSlotMode(); if (device == JoyButtonSlot::JoyKeyboard) { EventHandlerFactory::getInstance()->handler()->sendKeyboardEvent(slot, pressed); } else if (device == JoyButtonSlot::JoyMouseButton) { EventHandlerFactory::getInstance()->handler()->sendMouseButtonEvent(slot, pressed); } else if ((device == JoyButtonSlot::JoyTextEntry) && pressed && !slot->getTextData().isEmpty()) { EventHandlerFactory::getInstance()->handler()->sendTextEntryEvent(slot->getTextData()); } else if ((device == JoyButtonSlot::JoyExecute) && pressed && !slot->getTextData().isEmpty()) { ///....
Or
if ((tempcode == static_cast<int>(JoyButtonSlot::MouseWheelUp)) || (tempcode == static_cast<int>(JoyButtonSlot::MouseWheelDown))) { slot->getMouseInterval()->restart(); wheelVerticalTime.restart(); currentWheelVerticalEvent = slot; getActiveSlotsLocal().append(slot); wheelEventVertical(); currentWheelVerticalEvent = nullptr; } else if ((tempcode == static_cast<int>(JoyButtonSlot::MouseWheelLeft)) || (tempcode == static_cast<int>(JoyButtonSlot::MouseWheelRight))) { slot->getMouseInterval()->restart(); wheelHorizontalTime.restart();
The text was updated successfully, but these errors were encountered:
@jprokopczuk Gdybyś kiedyś się nudził to ten task byłby dobry do ogarnięcia. Przypomniałbyś sobie trochę obiektówki
Sorry, something went wrong.
No branches or pull requests
Class
JoyButtonSlot
should be divided into several smaller classes with common ancestor.It would help to avoid mess in code.
New classes should describe actions and execution of them.
It would help avoiding things like:
Or
Upvote & Fund
The text was updated successfully, but these errors were encountered: