// Context Pick UI - GPU accelerated hover effects for UI // 60Hz refresh with context-aware glow #include "context_pick_ui.hpp" #include "fiko/render/context_pick_manager.hpp" #include "fiko/sahne/sahne.hpp" #include "fiko/cekirdek/cekirdek.hpp" #include #include #include namespace fiko::ui { ContextPickUI::ContextPickUI(Cekirdek& cekirdek, Sahne& sahne) : cekirdek_(cekirdek), sahne_(sahne), aktif_(true) { // Initialize context pick manager contextManager_ = std::make_unique(cekirdek, sahne); // Set up event listeners setupEventListeners(); } ContextPickUI::~ContextPickUI() { aktif_ = false; } void ContextPickUI::setupEventListeners() { // Hover events cekirdek_.olaylar().abone( [](const render::ContextHoverDegisti& e) { // UI update callback (handled in main loop) (void)e; }); } void ContextPickUI::onHover(Dugum* dugum, f32 intensity) { if (!aktif_ || !dugum) return; contextManager_->setHover(dugum, intensity); } void ContextPickUI::update(f32 deltaTime) { if (!aktif_) return; // 60Hz glow intensity animation f32 animation = 0.7f + 0.3f * std::sin(deltaTime * 6.0f); // 6 Hz sine wave contextManager_->updateGlowIntensity(animation); } void ContextPickUI::setVisible(bool visible) { aktif_ = visible; } bool ContextPickUI::isVisible() const { return aktif_; } Vec3f ContextPickUI::getGlowColor(DugumTip tip) const { return contextManager_->getGlowColor(tip); } void ContextPickUI::setGlowIntensity(f32 intensity) { contextManager_->updateGlowIntensity(intensity); } } // namespace fiko::ui