void CTUI::InitNCurses() { EndWin(); initscr(); NoEcho(); CBreak(); leaveok(GetRootWin(), false); KeyPad(GetRootWin(), true); Meta(GetRootWin(), true); if (has_colors()) StartColor(); m_pMainBox = new CBox(CBox::VERTICAL, false); m_pMainBox->SetParent(GetRootWin()); m_pMainBox->Init(); m_pMainBox->SetSize(0, 0, GetWWidth(GetRootWin()), GetWHeight(GetRootWin())); m_pMainBox->SetFocus(true); m_pButtonBar = new CButtonBar(GetWWidth(GetRootWin())); // Focused colors are used for keys, defocused colors for descriptions m_pButtonBar->SetFColors(COLOR_YELLOW, COLOR_RED); m_pButtonBar->SetDFColors(COLOR_WHITE, COLOR_RED); m_pMainBox->EndPack(m_pButtonBar, false, false, 0, 0); m_pWinManager = new CWindowManager; m_pMainBox->AddWidget(m_pWinManager); m_pWinManager->ReqFocus(); m_pMainBox->RequestQueuedDraw(); }
void TrailSystemComponent::serialize(SerializedScenePtr& scene) const { Serialized s; s.Depth = WorldDepth(); s.StartWidth = StartWidth(); s.EndWidth = EndWidth(); s.StartGlow = StartGlow(); s.EndGlow = EndGlow(); s.StartColor = StartColor().vec4(); s.EndColor = EndColor().vec4(); s.Texture = Texture(); s.TextureRepeat = TextureRepeat(); s.UseGlobalTexCoords = UseGlobalTexCoords(); s.BlendAdd = BlendAdd(); s.System = trail_system_; scene->renderers().trail_systems.add(std::move(s)); }