Osu! StreamCompanion
===
## 大綱跳轉區
[TOC]
## 前言
我不是前端LUL,邊調邊查邊看隨便用的,網頁CSS以後一定。
> 1. 首先要有osu、OBS、[StreamCompanion](https://github.com/Piotrekol/StreamCompanion)
> 2. [StreamCompanion]Plugins/開啟Web Sever
> 3. [StreamCompanion]Web Sever/你可以看到一個http://localhost:`$port`,點旁邊button可以從網頁~~邊看邊挑~~。
> 4. [OBS]來源>瀏覽器>新增對應網址
起訖時程表
---
```mermaid
gantt
title Twitch
dateFormat YYYY-MM
excludes 2022-04-29,2024-03-16
section 直播設置
開始直播(2022-04-29): , 2022-04-29, 3d
新增元件(2023-12-17): , 2023-12-17, 5d
建立筆記(2024-03-16): , 2024-03-16, 2d
```
> 老人Jia_ 從入坑到入土的時間軸,也許以後有需要再增修。
> [name=Jia_]
CSS改寫區
---
> StreamCompanion\Files\Web\overlays\SC_Map Overlay\main.css
> 
> [name=Jia_]
```gherkin=
.progress {
/*background-color: yellow;*/
height: 15px;
transition: none;
margin-bottom: 40px;
border-radius: 10px;
opacity: 0;
}
.pg-enabled {
opacity: 1;
}
.attr {
margin-top: 30px;
}
.attritem {
display: inline-block;
background: rgba(0, 0, 0, 0.25);
margin: 10px;
padding: 10px;
border-radius: 0.8rem;
}
.attrtitle {
display: inline-block;
margin-right: 1px;
font-weight: bold;
}
.box {
border-radius: 2rem;
overflow: hidden;
width: 1000px;
}
body { margin: 0 }
* {
transition: all 0s;
transition-timing-function: ease;
color: white;
text-align: center;
text-shadow: 0px 0px 10px rgba(255, 255, 255, 1), 0px 0px 46px rgba(255, 255, 255, 1), 0px 0px 80px rgba(255, 255, 255, 1);
font-family: 'Comic Sans MS';
font-size: 40px;
}
.title {
font-size: 50px;
}
.diffname {
margin-top: 7.5px;
font-size: 45px;
}
.modcolor {
color: #dbdbdb;
display: inline-block;
text-shadow: 0px 0px 10px #dbdbdb, 0px 0px 46px #dbdbdb, 0px 0px 80px #dbdbdb;
}
.background {
transition: all .2s;
filter: brightness(50%);
width: 1000px;
height: 300px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.move {
position: absolute;
top: 0px;
width: 1000px;
border-radius: 0rem; overflow: hidden;
height: 300px;
}
.move2 {
position: absolute;
top: 200px;
width: 1000px;
}
[v-cloak] { display: none; }
.hide {
display: none;
}
```
> StreamCompanion\Files\Web\overlays\static\conv\DarkAndWhite\deps\css\main.css
> 
> [name=Jia_]
```
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap");
* {
padding: 0;
margin: 0;
-webkit-box-sizing: border-box;
// box-sizing: border-box;
}
body {
font-family: "Roboto", sans-serif;
color: white;
font-size: 50px;
background-color: transparent;
font-size: 100px;
}
.main {
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: absolute;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
top: 20px;
left: 100px;
padding: 20px 40px;
background: block;
border-radius: 0px;
-webkit-box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.5);
box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5), 0 0px 0px rgba(0, 0, 0, 0.5);
z-index: 0;
}
.main .line {
position: absolute;
top: 5px;
left: 0px;
width: calc(100% - 30px);
height: 4px;
background: rgba(255, 255, 255, 0.3);
border-radius: 5px;
overflow: hidden;
}
.main .line::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: var(--progress);
height: 100%;
background: white;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.main .hits {
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
color: #000;
width: 0px;
background: #000;
opacity: .5;
left: 1000px;
border-radius: 10px;
// -webkit-box-shadow: 0 0px 0 #000;
// box-shadow: 0 0px 0 #000;
-webkit-transition: all 1s ease;
transition: all 1s ease;
}
/*
.main .hits .h100,
.main .hits .h50,
.main .hits .h0 {
font-size: 0px;
padding: 0 15px;
}
.main .hits .h100::after,
.main .hits .h50::after,
.main .hits .h0::after {
font-size: 0px;
opacity: 0.5;
}
.main .hits .h100::after {
content: "x100";
}
.main .hits .h50::after {
content: "x50";
}
.main .hits .h0::after {
content: "x0";
}
*/
/*
.main .pp {
position: relative;
text-align: center;
margin-right: 40px;
width: 0px;
-webkit-transition: all 1s ease;
transition: all 1s ease;
}
.main .pp span {
white-space: nowrap;
}
.main .pp span::after {
content: "PP";
}
*/
/*
.songSelect .main .hits {
width: 320px;
}
.songSelect .main .pp {
width: 340px;
}
.songSelect .main .pp span::after {
content: "";
}
.songSelect .main .pp span::before {
content: "/b/";
}
*/
/*# sourceMappingURL=main.css.map */
```
CSS不負責任學習區
---
- 顏色透明
```
//範例一,背景
background:#000;
opacity: .5;
//範例二,idk
color: transparent ;
//transparent = hsla(0,0%,0%,0) = rgba(0,0,0,0)
```
- 調整大小
```
//字體大小
font-size: 100px;
//間距大小
border-radius: 5px;
//邊界位移
left: 10px;
//寬度動態調整
width: var(--progress);
width: calc(100% - 80px);
```
## 參考相關連結
:::info
:pray: 感謝教會我的人
:::
* [osu! pp counter setup for OBS (+ how to change font)](https://www.youtube.com/watch?v=YEEW9OyzHPs)
###### tags: `Osu` `Jia_ Note` `Documentation` `StreamCompanion` `CSS`