// Copyright (c) 2008-2022 the Urho3D project // License: MIT #include "../Precompiled.h" #include "../Core/Context.h" #include "../Input/InputEvents.h" #include "../UI/Button.h" #include "../UI/UI.h" #include "../UI/UIEvents.h" #include "../DebugNew.h" namespace Urho3D { extern const char* UI_CATEGORY; Button::Button(Context* context) : BorderImage(context), pressedOffset_(IntVector2::ZERO), pressedChildOffset_(IntVector2::ZERO), repeatDelay_(1.0f), repeatRate_(0.0f), repeatTimer_(0.0f), pressed_(false) { SetEnabled(true); focusMode_ = FM_FOCUSABLE; } Button::~Button() = default; void Button::RegisterObject(Context* context) { context->RegisterFactory