• R/O
  • HTTP
  • SSH
  • HTTPS

KCD: Commit

main code repository.


Commit MetaInfo

Revision5d1d87ae57f167fe0c0cb178752fd1166fa1ddc2 (tree)
Time2018-08-18 00:35:41
Authormasakih <masakih@user...>
Commitermasakih

Log Message

位置合わせ

Change Summary

Incremental Difference

--- a/KCD/GameViewController.swift
+++ b/KCD/GameViewController.swift
@@ -15,6 +15,8 @@ final class GameViewController: NSViewController {
1515 private static let gamePageURL = "http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/"
1616 private static let loginPageURLPrefix = "https://www.dmm.com/my/-/login/=/"
1717
18+ private static let gameSize = NSSize(width: 1200, height: 720)
19+
1820 @IBOutlet private var webView: WebView!
1921
2022 override var nibName: NSNib.Name {
@@ -186,9 +188,9 @@ final class GameViewController: NSViewController {
186188
187189 let rep = NSBitmapImageRep(cgImage: image)
188190
189- if rep.size != NSSize(width: 800, height: 480) {
191+ if rep.size != GameViewController.gameSize {
190192
191- rep.size = NSSize(width: 800, height: 480)
193+ rep.size = GameViewController.gameSize
192194 }
193195
194196 ScreenshotRegister(ApplicationDirecrories.shared.screenshotSaveDirectoryURL)
@@ -305,7 +307,9 @@ extension GameViewController: WebFrameLoadDelegate, WebUIDelegate {
305307 )
306308 let top = context.objectForKeyedSubscript("atop").toDouble()
307309 let left = context.objectForKeyedSubscript("aleft").toDouble()
308- flashTopLeft = NSPoint(x: CGFloat(left), y: webView.frame.size.height - CGFloat(top) - 480)
310+ flashTopLeft = NSPoint(x: CGFloat(left),
311+ y: webView.frame.size.height - CGFloat(top) - GameViewController.gameSize.height)
312+
309313 }
310314
311315 if path.hasSuffix("app_id=854854") {
Show on old repository browser