diff --git a/hwe/func_template.php b/hwe/func_template.php index a5e9af0f..9081d141 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -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(); diff --git a/hwe/templates/tooltip.php b/hwe/templates/tooltip.php new file mode 100644 index 00000000..c0a9661c --- /dev/null +++ b/hwe/templates/tooltip.php @@ -0,0 +1,7 @@ +