247 using namespace Ogre;
248 FileInfoListPtr files = ResourceGroupManager::getSingleton().findResourceFileInfo(
"Wallpapers",
"*.jpg",
false);
249 if (!files || files->empty())
251 files = ResourceGroupManager::getSingleton().findResourceFileInfo(
"Wallpapers",
"*.png",
false);
253 srand ( time(NULL) );
256 for (
int i = 0; i<Math::RangeRandom(0, 10); i++)
257 num = Math::RangeRandom(0, files->size());
261 Ogre::ResourceManager::ResourceCreateOrRetrieveResult wp_tex_result
262 = Ogre::TextureManager::getSingleton().createOrRetrieve(files->at(num).filename,
"Wallpapers");
263 Ogre::TexturePtr wp_tex = Ogre::static_pointer_cast<Ogre::Texture>(wp_tex_result.first);
265 Ogre::MaterialPtr wp_mat = Ogre::MaterialManager::getSingleton().create(
"rigsofrods/WallpaperMat", Ogre::RGN_DEFAULT);
266 Ogre::TextureUnitState* wp_tus = wp_mat->getTechnique(0)->getPass(0)->createTextureUnitState();
267 wp_tus->setTexture(wp_tex);
270 Ogre::OverlayElement* wp_panel = Ogre::OverlayManager::getSingleton()
271 .createOverlayElement(
"Panel",
"rigsofrods/WallpaperPanel",
false);
272 wp_panel->setMaterial(wp_mat);
273 wp_panel->setDimensions(1.f, 1.f);
275 this->
MenuWallpaper = Ogre::OverlayManager::getSingleton().create(
"rigsofrods/WallpaperOverlay");
276 this->
MenuWallpaper->add2D(
static_cast<Ogre::OverlayContainer*
>(wp_panel));
349 ImGuiStyle& style = ImGui::GetStyle();
350 style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
351 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
352 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.06f, 0.06f, 0.90f);
353 style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.1f);
354 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
355 style.Colors[ImGuiCol_Border] = ImVec4(0.20f, 0.20f, 0.20f, 0.90f);
356 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.90f);
357 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.90f);
358 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
359 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
360 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.11f, 0.33f, 0.49f, 1.00f);
361 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.13f, 0.40f, 0.60f, 1.00f);
362 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.13f, 0.40f, 0.60f, 1.00f);
363 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.90f);
364 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.16f, 0.16f, 0.16f, 0.90f);
365 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.30f, 0.30f, 0.29f, 0.90f);
366 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
367 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
368 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.90f);
369 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.39f, 0.39f, 0.39f, 0.90f);
370 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
371 style.Colors[ImGuiCol_Button] = ImVec4(0.26f, 0.26f, 0.25f, 0.90f);
372 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
373 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
374 style.Colors[ImGuiCol_Header] = ImVec4(0.20f, 0.20f, 0.20f, 0.90f);
375 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
376 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
377 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.22f, 0.22f, 0.21f, 0.90f);
378 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
379 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
380 style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
381 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
382 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.18f, 0.53f, 0.79f, 0.90f);
383 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.13f, 0.40f, 0.60f, 0.90f);
384 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.90f);
385 style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.90f);
387 style.WindowPadding = ImVec2(10.f, 10.f);
388 style.FrameRounding = 2.f;
389 style.WindowRounding = 4.f;
390 style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
391 style.ItemSpacing = ImVec2(5.f, 5.f);
392 style.GrabRounding = 3.f;
393 style.WindowBorderSize = 0.f;
System integration layer; inspired by OgreBites::ApplicationContext.
Game state manager and message-queue provider.