EjectOSD::EjectOSD() : OSD(L"3RVX-EjectDispatcher"), _mWnd(L"3RVX-EjectOSD", L"3RVX-EjectOSD") { Skin *skin = SkinManager::Instance()->CurrentSkin(); if (skin->HasOSD("eject") == false) { return; } /* TODO: NULL check*/ _mWnd.BackgroundImage(skin->ejectBackground); if (skin->ejectMask != NULL) { _mWnd.EnableGlass(skin->ejectMask); } _mWnd.Update(); Settings *settings = Settings::Instance(); _mWnd.AlwaysOnTop(settings->AlwaysOnTop()); _mWnd.HideAnimation(settings->HideAnim(), settings->HideSpeed()); _mWnd.VisibleDuration(settings->HideDelay()); UpdateWindowPositions(ActiveMonitors()); }
void OSD::InitMeterWnd(MeterWnd &mWnd) { mWnd.AlwaysOnTop(_settings->AlwaysOnTop()); mWnd.HideAnimation(_settings->HideAnim(), _settings->HideSpeed()); mWnd.VisibleDuration(_settings->HideDelay()); std::vector<Monitor> monitors = ActiveMonitors(); for (unsigned int i = 1; i < monitors.size(); ++i) { mWnd.Clone(); } PositionWindow(monitors[0], mWnd); std::vector<LayeredWnd *> clones = mWnd.Clones(); for (unsigned int i = 1; i < monitors.size(); ++i) { PositionWindow(monitors[i], *clones[i - 1]); } }