Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #56 from TigraTT-Driver/v201
Browse files Browse the repository at this point in the history
V201
  • Loading branch information
TigraTT-Driver authored Oct 13, 2022
2 parents 05872e5 + 5fe6ec6 commit 3e00af8
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 20 deletions.
15 changes: 13 additions & 2 deletions Games/GameItemGridBoxFront.qml
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,26 @@ Item {
}

function steamBoxFront(gameData) {
return steamAppID(gameData) + "/library_600x900_2x.jpg";
if (gamesBoxArtPref == "steam" || gamesBoxArtPref == "marquee")
return steamAppID(gameData) + "/header.jpg";
else
return steamAppID(gameData) + "/library_600x900_2x.jpg";
}

function boxArt(data) {
if (data != null) {
if (data.assets.boxFront.includes("header.jpg"))
return steamBoxFront(data);
else {
if (data.assets.boxFront != "")
if (data.assets.boxFront != "" && gamesBoxArtPref == "boxfront")
return data.assets.boxFront;
else if (data.assets.poster != "" && gamesBoxArtPref == "poster")
return data.assets.poster;
else if (data.assets.steam != "" && gamesBoxArtPref == "steam")
return data.assets.steam;
else if (data.assets.marquee != "" && gamesBoxArtPref == "marquee")
return data.assets.marquee;
else if (data.assets.boxFront != "")
return data.assets.boxFront;
else if (data.assets.poster != "")
return data.assets.poster;
Expand Down
15 changes: 13 additions & 2 deletions Games/GameItemTopBoxFront.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,26 @@ Item {
}

function steamBoxFront(currentGame) {
return steamAppID(currentGame) + "/library_600x900_2x.jpg"
if (gamesBoxArtPref == "steam" || gamesBoxArtPref == "marquee")
return steamAppID(currentGame) + "/header.jpg";
else
return steamAppID(currentGame) + "/library_600x900_2x.jpg";
}

function boxArt(data) {
if (data != null) {
if (data.assets.boxFront.includes("header.jpg"))
return steamBoxFront(data);
else {
if (data.assets.boxFront != "")
if (data.assets.boxFront != "" && gamesBoxArtPref == "boxfront")
return data.assets.boxFront;
else if (data.assets.poster != "" && gamesBoxArtPref == "poster")
return data.assets.poster;
else if (data.assets.steam != "" && gamesBoxArtPref == "steam")
return data.assets.steam;
else if (data.assets.marquee != "" && gamesBoxArtPref == "marquee")
return data.assets.marquee;
else if (data.assets.boxFront != "")
return data.assets.boxFront;
else if (data.assets.poster != "")
return data.assets.poster;
Expand Down
39 changes: 26 additions & 13 deletions Home/HomeItemGame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Item {
} else {
fadescreenshot.stop();
screenshot.opacity = 1;
marquee.opacity = 1;
imgPrecompose.opacity = 1;
container.opacity = 1;
}
}
Expand All @@ -67,7 +67,7 @@ Item {
interval: 1200
onTriggered: {
screenshot.opacity = 0;
marquee.opacity = 0;
imgPrecompose.opacity = 0;
}
}

Expand All @@ -83,17 +83,30 @@ Item {
sound: homeVideoMute
}

Image {
id: marquee
anchors.fill: parent
source: gameData ? gameData.assets.marquee : ""
fillMode: Image.PreserveAspectCrop
sourceSize: Qt.size(screenshot.width, screenshot.height)
smooth: false
asynchronous: true
visible: gameData.assets.marquee && !doubleFocus
Item {
id: imgPrecompose
Image {
id: marquee
anchors.fill: parent
source: gameData ? gameData.assets.marquee : ""
sourceSize: Qt.size(screenshot.width, screenshot.height)
smooth: false
asynchronous: true
visible: homeImgPrecomposePref == "marquee" && gameData.assets.marquee
}
Image {
id: steamgrid
anchors.fill: parent
source: gameData ? gameData.assets.steam : ""
sourceSize: Qt.size(screenshot.width, screenshot.height)
smooth: false
asynchronous: true
visible: homeImgPrecomposePref == "steam" && gameData.assets.steam
}
anchors.fill:parent
Behavior on opacity { NumberAnimation { duration: 200 } }
z: 11
visible: homeImgPrecompose && !doubleFocus && (homeImgPrecomposePref == "marquee" && gameData.assets.marquee || homeImgPrecomposePref == "steam" && gameData.assets.steam)
}

Image {
Expand All @@ -105,7 +118,7 @@ Item {
sourceSize: Qt.size(screenshot.width, screenshot.height)
smooth: false
asynchronous: true
visible: !gameData.assets.marquee || doubleFocus
visible: imgPrecompose.opacity !== 1 || (!marquee.visible && !steamgrid.visible)
Behavior on opacity { NumberAnimation { duration: 200 } }

CompletedIcon {
Expand All @@ -125,7 +138,7 @@ Item {
fillMode: Image.PreserveAspectFit
asynchronous: true
smooth: true
visible: !gameData.assets.marquee || doubleFocus
visible: imgPrecompose.opacity !== 1 || (!marquee.visible && !steamgrid.visible)
z: 10
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# shinretro

Current Version: [0.200](CHANGELOG.md) [![GPLv3 license](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)
Current Version: [0.201](CHANGELOG.md) [![GPLv3 license](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)

A flexible and tweakable theme for [Pegasus Frontend](http://pegasus-frontend.org).
Forked from [Valentin MEZIN](https://github.com/valsou)'s theme [neoretrō](https://github.com/valsou/neoretro) v0.131 and [Luciano Oliveira](https://github.com/luciano-work)'s dark variant.
Expand Down
20 changes: 20 additions & 0 deletions SETTINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ changes the used button layout for onscreen controls
| PS | Playstation like onscreen buttons |
| PS-JP | Playstation like onscreen buttons, Japanese Layout (Swapped Accept and Back) |
## Home
### Use precomposed image
use precomposed images on home screen instead of dynamic ones
| setting | |
|--|--|
| **No** | use dynamic generated images for games |
| Yes | prefer precomposed images |
### Precomposed image type
which image type should be used if precomposed images are used
| setting | |
|--|--|
| **Steam** | use Steam grids |
| Marquee | use marquees |
### Video playback
controls video playback on the home screen
| setting | |
Expand Down Expand Up @@ -183,6 +195,14 @@ shows fanart / screenshot of currently selected item
|--|--|
| **Yes** | shows background image |
| No | disables background image|
### Prefered boxart image
preference for shown boxart image
| setting | |
|--|--|
| **Boxfront** | prefer boxfront |
| Poster | prefer poster |
| Steam | prefer Steam grid |
| Marquee | prefer marquee|
### Game grid - LT/RT function
changes behaviour of the trigger buttons
| setting | |
Expand Down
3 changes: 3 additions & 0 deletions Settings/Settings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ FocusScope {
id: homeSettingsModel
Component.onCompleted: {
[
[ dataText[lang].settings_global_ImgPrecompose, "homeImgPrecompose", "", dataText[lang].global_no + "," + dataText[lang].global_yes ],
[ dataText[lang].settings_global_ImgPrecomposePref, "homeImgPrecomposePref", "", "Steam" + "," + "Marquee" ],
[ dataText[lang].settings_global_videoPlayback, "homeVideo", "", dataText[lang].global_yes + "," + dataText[lang].global_no ],
[ dataText[lang].settings_global_videoMute, "homeVideoMute", "", dataText[lang].global_no + "," + dataText[lang].global_yes ]
].forEach(function(element) {
Expand Down Expand Up @@ -148,6 +150,7 @@ FocusScope {
[ dataText[lang].settings_global_backgroundImg, "gamesBGImg", "", dataText[lang].global_yes + "," + dataText[lang].global_no ],
[ dataText[lang].settings_global_videoPlayback, "gamesVideo", "", dataText[lang].global_yes + "," + dataText[lang].global_no ],
[ dataText[lang].settings_global_videoMute, "gamesVideoMute", "", dataText[lang].global_no + "," + dataText[lang].global_yes ],
[ dataText[lang].settings_games_BoxArtPref, "gamesBoxArtPref", "", "Boxfront,Poster,Steam,Marquee" ],
[ dataText[lang].settings_games_page_updown_function, "gamesPageUpDownFunction", "", "Collections,Games" ]
].forEach(function(element) {
append({
Expand Down
2 changes: 1 addition & 1 deletion theme.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: shinretro
author: Valentin MEZIN, Luciano Oliveira, TigraTT-Driver, msheehan79
version: 0.200
version: 0.201
summary: A flexible and tweakable theme for Pegasus-Frontend
homepage: https://github.com/TigraTT-Driver/shinretro
keywords: clean, modern, 1080p, 4K, videos, 16:9
Expand Down
43 changes: 42 additions & 1 deletion theme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ FocusScope {
settings_global_backgroundImg: "Background image",
settings_global_videoPlayback: "Video playback",
settings_global_videoMute: "Mute video",
settings_global_ImgPrecompose: "Use precomposed image",
settings_global_ImgPrecompose: "Precomposed image type",
settings_collection_showAll: 'Show "All games" collection',
settings_collection_showFavorites: 'Show "Favorites" collection',
settings_collection_showLastPlayed: 'Show "Last Played" collection',
Expand All @@ -291,6 +293,7 @@ FocusScope {
settings_games_layout: "Games layout",
settings_games_gridItemsPerRow: "Game grid - items per row",
settings_games_gridItemsViewableRows: "Game grid - viewable rows",
settings_games_BoxArtPref: "Prefered boxart image",
settings_games_page_updown_function: "Game grid - LT/RT button function",
menu_settings: "settings",
menu_home: "home",
Expand Down Expand Up @@ -353,6 +356,8 @@ FocusScope {
settings_global_backgroundImg: "背景图片",
settings_global_videoPlayback: "视频播放",
settings_global_videoMute: "静音视频",
settings_global_ImgPrecompose: "使用预合成的图像",
settings_global_ImgPrecomposePref: "预合成的图像类型",
settings_collection_showAll: '显示 "全部游戏" ',
settings_collection_showFavorites: '显示“收藏夹”',
settings_collection_showLastPlayed: '显示“最后游玩”',
Expand All @@ -362,6 +367,7 @@ FocusScope {
settings_games_layout: "游戏布局",
settings_games_gridItemsPerRow: "游戏网格 - 每行项目",
settings_games_gridItemsViewableRows: "游戏网格 - 可查看的行",
settings_games_BoxArtPref: "首选的盒画图片。",
settings_games_page_updown_function: "游戏网格-LT/RT按钮功能",
menu_settings: "设置",
menu_home: "主页",
Expand Down Expand Up @@ -424,6 +430,8 @@ FocusScope {
settings_global_backgroundImg: "Hintergrundbild",
settings_global_videoPlayback: "Videowiedergabe",
settings_global_videoMute: "Video stummschalten",
settings_global_ImgPrecompose: "Vorgefertigte Bilder verwenden",
settings_global_ImgPrecomposePref: "Vorgefertigte Bildart",
settings_collection_showAll: 'Sammlung "Alle Spiele" anzeigen',
settings_collection_showFavorites: 'Sammlung "Favoriten" anzeigen',
settings_collection_showLastPlayed: 'Sammlung "Zuletzt gespielt" anzeigen',
Expand All @@ -433,6 +441,7 @@ FocusScope {
settings_games_layout: "Spiele-Layout",
settings_games_gridItemsPerRow: "Spiele Raster - Objekte pro Reihe",
settings_games_gridItemsViewableRows: "Spiele Raster - Sichtbare Reihen",
settings_games_BoxArtPref: "Bevorzugtes Boxart-Bild",
settings_games_page_updown_function: "Spiel Raster - LT/RT-Tastenfunktion",
menu_settings: "Optionen",
menu_home: "Start",
Expand Down Expand Up @@ -495,6 +504,8 @@ FocusScope {
settings_global_backgroundImg: "Image de fond",
settings_global_videoPlayback: "Activer les vidéos",
settings_global_videoMute: "Désactiver le son des vidéos",
settings_global_ImgPrecompose: "Utiliser des images pré-composées",
settings_global_ImgPrecomposePref: "Type d'image pré-composée",
settings_collection_showAll: 'Afficher la collection "Tous"',
settings_collection_showFavorites: 'Afficher la collection "Favoris"',
settings_collection_showLastPlayed: 'Afficher la collection "Dernière lecture"',
Expand All @@ -504,6 +515,7 @@ FocusScope {
settings_games_layout: "Mise en page des jeux",
settings_games_gridItemsPerRow: "Grille - nombre de jeux par ligne",
settings_games_gridItemsViewableRows: "Grille - nombre de lignes",
settings_games_BoxArtPref: "Image de boxart préférée",
settings_games_page_updown_function: "Grille - Fonction bouton LT/RT",
menu_settings: "Réglages",
menu_home: "Accueil",
Expand Down Expand Up @@ -566,6 +578,8 @@ FocusScope {
settings_global_backgroundImg: "Imagem de fundo",
settings_global_videoPlayback: "Reprodução de vídeo",
settings_global_videoMute: "Silenciar vídeo",
settings_global_ImgPrecompose: "Utilizar imagem pré-composta",
settings_global_ImgPrecomposePref: "Tipo de imagem pré-composta",
settings_collection_showAll: 'Mostrar a coleção "Todos jogos"',
settings_collection_showFavorites: 'Mostrar coleção "Favoritos"',
settings_collection_showLastPlayed: 'Mostrar coleção "Últimas jogadas"',
Expand All @@ -575,6 +589,7 @@ FocusScope {
settings_games_layout: "Layout do jogos",
settings_games_gridItemsPerRow: "Grade - Jogos por fileira",
settings_games_gridItemsViewableRows: "Grade - Fileiras visíveis",
settings_games_BoxArtPrev: "Imagem de boxart preferida",
settings_games_page_updown_function: "Grade - função do botão LT/RT",
menu_settings: "ajustes",
menu_home: "início",
Expand Down Expand Up @@ -635,6 +650,20 @@ FocusScope {
return "1.0";
}
}
property bool homeImgPrecompose: {
if (api.memory.get('homeImgPrecomposeIndex') == "1") {
return true;
} else {
return false;
}
}
property string homeImgPrecomposePref: {
if (api.memory.get('homeImgPrecomposePrefIndex') == "1") {
return "marquee";
} else {
return "steam";
}
}
property int homeVideo: api.memory.get('homeVideoIndex') || 0
property bool homeVideoMute: {
if (api.memory.get('homeVideoMuteIndex') == "1") {
Expand Down Expand Up @@ -676,7 +705,18 @@ FocusScope {
return false;
}
}

property string gamesBoxArtPref: {
if (api.memory.get('gamesBoxArtPrefIndex') == "1") {
return "poster";
} else if (api.memory.get('gamesBoxArtPrefIndex') == "2") {
return "steam";
} else if (api.memory.get('gamesBoxArtPrefIndex') == "3") {
return "marquee";
} else {
return "boxfront";
}
}

// [0] = Settings
// [1] = HOME
// [2] = COLLECTIONS
Expand Down Expand Up @@ -953,6 +993,7 @@ FocusScope {
"switch": { manufacturer: "nintendo", release: "2017", color: "#232323", altColor: "#0D0D0D", altColor2: "#FE0016", fullName: "Nintendo Switch" },
"ti99": { manufacturer: "ti", release: "1979", color: "#484141", altColor: "#363030", altColor2: "#000000", fullName: "TI-99" },
"tic80": { manufacturer: "vadimGrigoruk", release: "2017", color: "#4E76B4", altColor: "#456AA1", altColor2: "#65A33D", fullName: "TIC-80" },
"triforce": { manufacturer: "sega", release: "2002", color: "#5d4472", altColor: "#413050", altColor2: "#352bc0", fullName: "Triforce Arcade" },
"turbografx16": { manufacturer: "nec", release: "1987", color: "#333333", altColor: "#1a1a1a", altColor2: "#F79226", fullName: "TurboGrafx 16" },
"turbografxcd": { manufacturer: "nec", release: "1987", color: "#F79226", altColor: "#D97408", altColor2: "#1E1C1A", fullName: "TurboGrafx CD" },
"uzebox": { manufacturer: "belogic", release: "2008", color: "#EDC63D", altColor: "#E9BB16", altColor2: "#C9C2BF", fullName: "Uzebox" },
Expand Down

0 comments on commit 3e00af8

Please sign in to comment.