mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Locally serve the tooltip jQuery. (#11780)
This commit is contained in:
committed by
clusterfack
parent
ae233c751c
commit
73313fd391
@@ -38,6 +38,7 @@ Notes:
|
||||
/datum/tooltip/New(client/C)
|
||||
if (C)
|
||||
src.owner = C
|
||||
send_asset(owner, "jquery.min.js")
|
||||
src.owner << browse(file2text(src.file), "window=[src.control]")
|
||||
..()
|
||||
|
||||
@@ -50,7 +51,7 @@ Notes:
|
||||
src.init = 1
|
||||
src.owner << output(list2params(list(world.icon_size, src.control)), "[src.control]:tooltip.init")
|
||||
src.showing = 1
|
||||
|
||||
|
||||
if (title && content)
|
||||
title = "<h1>[title]</h1>"
|
||||
content = "<p>[content]</p>"
|
||||
|
||||
@@ -42,24 +42,24 @@
|
||||
.pod .content {border-color: #326D29; background-color: #569F4B;}
|
||||
.colo-pod .wrap {border-color: #256fb9;}
|
||||
.colo-pod .content {border-color: #000000; background-color: #000000;}
|
||||
|
||||
|
||||
/* TG: Themes */
|
||||
/* ScreenUI */
|
||||
.midnight .wrap {border-color: #2B2B33;}
|
||||
.midnight .content {color: #6087A0; border-color: #2B2B33; background-color: #36363C;}
|
||||
|
||||
|
||||
.plasmafire .wrap {border-color: #21213D;}
|
||||
.plasmafire .content {color: #FFA800 ; border-color: #21213D; background-color:#1D1D36;}
|
||||
.retro .wrap {border-color: #005E00;}
|
||||
.retro .content {color: #003366; border-color: #005E00; background-color: #00BD00;}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrap" class="wrap">
|
||||
<div id="content" class="content"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var tooltip = {
|
||||
'tileSize': 32,
|
||||
@@ -87,7 +87,7 @@
|
||||
tilesShown = (tooltip.clientView * 2) + 1,
|
||||
realIconSize = mapWidth / tilesShown,
|
||||
resizeRatio = realIconSize / tooltip.tileSize,
|
||||
//Calculate letterboxing offsets
|
||||
//Calculate letterboxing offsets
|
||||
leftOffset = (map.size.x - mapWidth) / 2,
|
||||
topOffset = (map.size.y - mapHeight) / 2;
|
||||
//alert(realIconSize + ' | ' +tooltip.tileSize + ' | ' + resizeRatio); //DEBUG
|
||||
@@ -190,4 +190,4 @@
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user