floh22 / LeagueBroadcast

League of Legends Spectate Overlay Tools
MIT License
219 stars 46 forks source link

[Question] how to remove or blank the stoke circle? #90

Open shinilee opened 2 years ago

shinilee commented 2 years ago

https://youtu.be/1B8o-DXFJsU

image

for the score I want to make blank or remove the stroke circle is there any way to do it?

overkido commented 2 years ago

vc quer remover o circulo preto? ou deixa branco?

shinilee commented 2 years ago

the stroke. it's the black stroke circle

overkido commented 2 years ago

você me arranja esse vídeos dos drags e baron que vc usa sem as informações que tem? só o video?

shinilee commented 2 years ago

https://drive.google.com/file/d/1U971VvPr_cvHOYuQUkDVNy0GCXrU30aA/view?usp=sharing

overkido commented 2 years ago

você sabe me dizer se tem como desativar o scores do layout pra colocar numeração de, vitorias/derrotas? em vez de ser o scores circle?

overkido commented 2 years ago

para a pontuação que quero deixar em branco ou remover o círculo de traço, há alguma maneira de fazer isso?

obs: você pode deixa o traçado do circulo branco junto com o circulo fechado após a vitória. como nesse meu aqui. image

floh22 commented 2 years ago

Currently you cannot change the border of the circle. If you wish to adjust the source yourself, https://github.com/floh22/LeagueBroadcast/blob/v2/Overlays/ingame/src/visual/ScoreboardVisual.ts Line 891, 895, 919, 923

21Broo commented 2 years ago

혹시 해결하셨나요? 저같은 경우는 코드 수정해서 공 모양 대신 숫자로 표시되도록 바꿨습니다

shinilee commented 2 years ago

혹시 해결하셨나요? 저같은 경우는 코드 수정해서 공 모양 대신 숫자로 표시되도록 바꿨습니다

아니요 제작자가 바꿀수없다고하네요 ㅠㅠ 코드 어떻게 수정해서 공 모양대신 숫자로 표시를 하셨나요?

21Broo commented 2 years ago

우선 위에 floh22님이 바꿀 수 없다고 말하신것 같은데 바꿀 수 있습니다 https://github.com/floh22/LeagueBroadcast/archive/refs/heads/v2.zip 이거 다운 받으시고 압축 푸신다음 https://github.com/floh22/LeagueBroadcast/tree/v2/Overlays/ingame 이 주소로 들어가시면 readme 파일에 브로드캐스트 내부 파일을 수정해서 실행할 수 있는 방법이 나와 있습니다 우선 이 방법대로 세팅을 하셔야 합니다 그 다음에 아까 압축 푼 폴더에서 Overlays/ingame/src/visual/ScoreboardVisual.ts 파일을 수정하셔야 합니다

사실 저도 타입스크립트를 다룰줄 몰라서 계속 찾아 보다가 야매로 수정한거라 shinilee님이 프로그래밍 쪽으로 얼마나 아시는지 모르겠지만 만약 타입스크립트를 다룰줄 아시거나 더 정확한 방법을 아시면 이 수정방법은 추천드리진 않습니다(제가 알려드리는 방법에서 수정해가면서 하셔도 됩니다) 지금은 shinilee님이 초보라고 가정하고 설명을 드리겠습니다

간단하게 원리만 설명드리자면 리그 브로드캐스트 프로그램에 픽벤 부분에서 팀 스코어를 바꾸실 수 있는건 알고 계실겁니다 그리고 어딘진 모르겠지만 이 코드들 안에 브로드캐스트 내에서 입력한 스코어 값을 받아주는 코드가 분명히 존재합니다 또 받은 스코어 값을 공 모양으로 변환해서 표시하는 코드도 존재합니다 이 공모양으로 표시하는 코드 같은 경우는 if문과 else문으로 되어있습니다 if는 공표시 else는 공 표시 안함 이런식으로요 그래서 공 모양으로 표시하는 코드의 if문 내용과 else문 내용을 서로 바꿔줄겁니다 그리고 나서 숫자로 표시하도록 하는 코드를 따로 추가해주면 됩니다

우선 884번줄 if (cfg.BlueTeam.Score.UseCircleIcons) 부터 938번줄 (//update data 바로 위) 까지 모두 지웁니다 그리고 다음 내용을 추가합니다

if (cfg.BlueTeam.Score.UseCircleIcons) { this.BlueScoreText!.text = conf.BlueTeam.Score + ''; } else { //Draw blue score icons let color = Phaser.Display.Color.IntegerToColor(variables.fallbackBlue); if (cfg.BlueTeam.Score.UseTeamColor) { if (state.blueColor !== undefined && state.blueColor !== '') { color = Phaser.Display.Color.RGBStringToColor(state.blueColor); this.ScoreG.fillStyle(color.color, 1); this.ScoreG.lineStyle(3, color.color, 1); } } else { this.ScoreG.fillStyle(Phaser.Display.Color.RGBStringToColor(cfg.BlueTeam.Score.FillColor).color, 1); this.ScoreG.lineStyle(3, Phaser.Display.Color.RGBStringToColor(cfg.BlueTeam.Score.StrokeColor).color, 1); } let numIcons = this.TotalGameToWinsNeeded[conf.SeriesGameCount]; this.BlueScoreTemplates.forEach(template => { if (numIcons-- > 0) { if (blueWins-- > 0) { this.ScoreG.fillCircleShape(template); } else { this.ScoreG.strokeCircleShape(template); } } }); } if (cfg.RedTeam.Score.UseCircleIcons) { this.RedScoreText!.text = conf.RedTeam.Score + ''; } else { //Draw red score icons let color = Phaser.Display.Color.IntegerToColor(variables.fallbackRed); if (cfg.RedTeam.Score.UseTeamColor) { if (state.redColor !== undefined && state.redColor !== '') { color = Phaser.Display.Color.RGBStringToColor(state.redColor); this.ScoreG.fillStyle(color.color, 1); this.ScoreG.lineStyle(3, color.color, 1); } } else { this.ScoreG.fillStyle(Phaser.Display.Color.RGBStringToColor(cfg.RedTeam.Score.FillColor).color, 1); this.ScoreG.lineStyle(3, Phaser.Display.Color.RGBStringToColor(cfg.RedTeam.Score.StrokeColor).color, 1); } let numIcons = this.TotalGameToWinsNeeded[conf.SeriesGameCount]; this.RedScoreTemplates.forEach(template => { if (numIcons-- > 0) { if (redWins-- > 0) { this.ScoreG.fillCircleShape(template); } else { this.ScoreG.strokeCircleShape(template); } } }); }

여기까지가 공모양 표시 안하는 방법이고

208번 줄(//red team 바로 윗줄)에 다음 코드를 추가합니다 //TotalScore if (cfg.BlueTeam.Score.UseCircleIcons) { this.BlueScoreText = scene.add.text(this.position.X + cfg.BlueTeam.Score.Position.X, this.position.Y + cfg.BlueTeam.Score.Position.Y, '0', { fontFamily: cfg.BlueTeam.Name.Font.Name, fontSize: cfg.BlueTeam.Name.Font.Size, fontStyle: cfg.BlueTeam.Name.Font.Style, align: cfg.BlueTeam.Name.Font.Align, color: cfg.BlueTeam.Name.Font.Color, }); this.AddVisualComponent(this.BlueScoreText); } 그리고 311번 줄(//load resourses 바로 윗줄)에 다음 코드를 추가합니다 //TotalScore if (cfg.RedTeam.Score.UseCircleIcons) { this.RedScoreText = scene.add.text(this.position.X + cfg.RedTeam.Score.Position.X, this.position.Y + cfg.RedTeam.Score.Position.Y, '0', { fontFamily: cfg.RedTeam.Name.Font.Name, fontSize: cfg.RedTeam.Name.Font.Size, fontStyle: cfg.RedTeam.Name.Font.Style, align: cfg.RedTeam.Name.Font.Align, color: cfg.RedTeam.Name.Font.Color, }); this.AddVisualComponent(this.RedScoreText); }

위에 몇번 줄이라고 표시해놓은건 약간식 차이가 날 수 있습니다(전 다른 코드를 더 추가해놓은 상태라 그걸 빼고 계산하긴 했지만 정확하지 않을 수 있습니다) 그리고 표시되는 숫자 폰트는 팀 이름에 적용된 폰트와 같은걸로 적용됩니다(따로 설정할 수 있을것 같긴한데 다른 파일도 건드려야 되는 것 같아서 그냥 팀 이름이랑 똑같은 폰트로 적용되도록 코드를 짰습니다)

설명을 못해서 잘 이해하실지 모르겠네요 ㅠㅠ 도움 되셨으면 좋겠습니다

shinilee commented 2 years ago

오우 정말 감사합니다. 네 져 코드에 대해서 아무것도 몰라서 멘땅에 헤딩으로 이것저것 바꿔서 하고있습니다. 적어주신 코드로 잘 사용해보겠습니다. 감사합니다.

21Broo commented 2 years ago

넵 잘 해결하셨으면 좋겠네요 ㅋㅋ