툴팁 준비

This commit is contained in:
2018-07-11 01:15:22 +09:00
parent 87e324d4d9
commit 037a1e9c0c
2 changed files with 18 additions and 0 deletions
+11
View File
@@ -64,6 +64,17 @@ function CoreTurnTable() {
";
}
function displaySpecialInfo(?int $type):string{
$info = getSpecialInfo($type);
$text = getGenSpecial($type);
$templates = new \League\Plates\Engine(__dir__.'/templates');
return $templates->render('tooltip', [
'text'=>$text,
'info'=>$info,
]);
}
function allButton() {
$db = DB::db();
+7
View File
@@ -0,0 +1,7 @@
<div class="tooltip"><?=$text?>
<?php if(isset($info)):?>
<span class="tooltiptext">
<?=$info?>
</span>
<?php endif;?>
</div>