Redesign UI to be modern responsive and implement dynamic sub-menu illustration mapping
This commit is contained in:
+98
-109
@@ -20,11 +20,24 @@ sub html{
|
||||
# 마우스 자동 조작 치트 격퇴 전투 시에 4/400 확률로 발동
|
||||
my $no_mouse = ($no_mouse && $type eq '수행중') ? int(rand(400)) : 100 ;
|
||||
|
||||
# 활성화된 이미지 결정 (동적 이미지 매핑)
|
||||
my $menu_img = "lobby.png";
|
||||
if ($type eq '수행' || $type eq '수행중' || $cmd == 1) { $menu_img = "training.png"; }
|
||||
elsif ($type eq '내정' || $cmd == 2) { $menu_img = "politics.png"; }
|
||||
elsif ($type eq '전쟁' || $type eq '전쟁중' || $cmd == 3) { $menu_img = "war.png"; }
|
||||
elsif ($type eq '능력' || $cmd == 4) { $menu_img = "ability.png"; }
|
||||
elsif ($type eq '사관' || $cmd == 5) { $menu_img = "changes.png"; }
|
||||
elsif ($type eq '정보' || $cmd == 6) { $menu_img = "infomation.png"; }
|
||||
elsif ($type eq '토벌' || $type eq '토벌 중' || $cmd == 7) { $menu_img = "subdue.png"; }
|
||||
elsif ($type eq '군사' || $cmd == 8) { $menu_img = "mission.png"; }
|
||||
elsif ($type eq '쇼핑' || $cmd == 20) { $menu_img = "shop.png"; }
|
||||
|
||||
print <<EOM;
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>$titleh</title>
|
||||
<link rel=stylesheet type="text/css" href="$css" title="style">
|
||||
<link rel="stylesheet" type="text/css" href="$css">
|
||||
EOM
|
||||
|
||||
# Javascript 자동 조작 치트 방어(frame 방어)
|
||||
@@ -42,137 +55,113 @@ EOM
|
||||
|
||||
print <<EOM;
|
||||
</head>
|
||||
<body $body class="bar">
|
||||
<center>
|
||||
<table width="740" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="left">
|
||||
$title
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<body>
|
||||
<div class="game-container">
|
||||
<div class="card">
|
||||
<div class="title-section">
|
||||
<div class="title-images">
|
||||
<img src="./imgs/title_text.png">
|
||||
<img src="./imgs/title_game.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 하위 메뉴 맞춤형 동적 이미지 영역 -->
|
||||
<img class="menu-illustration" src="./imgs/$menu_img" alt="Menu Illustration">
|
||||
</div>
|
||||
|
||||
<table width="740" border="0" cellspacing="0" cellpadding="0" height="300">
|
||||
<tr>
|
||||
<td align="center" valign="middle" width="500">
|
||||
|
||||
<table width="540" border="0" cellspacing="6" cellpadding="6" height="285" bgcolor="#444466">
|
||||
<tr>
|
||||
<td bgcolor="#000000" align="left" valign="top">
|
||||
$log1
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td align="right" valign="middle" width="200">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="5" height="285">
|
||||
<tr>
|
||||
<form method="get" action="$index">
|
||||
<td bgcolor="#000000" valign="middle">
|
||||
<input type="submit" value="† 타이틀로 돌아가기 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<div class="game-layout">
|
||||
<!-- 메인 콘텐츠 영역 (로그 및 행동 폼) -->
|
||||
<main class="card">
|
||||
$log1
|
||||
</main>
|
||||
|
||||
<!-- 사이드바 네비게이션 메뉴 -->
|
||||
<aside class="card">
|
||||
<div class="card-title">네비게이션</div>
|
||||
EOM
|
||||
|
||||
# 사이드바 버튼 출력
|
||||
print <<EOM;
|
||||
<form method="get" action="$index">
|
||||
<input type="submit" value="† 타이틀로 돌아가기 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
|
||||
if($no_mouse==0){
|
||||
print qq|<tr>$log2</tr>|;
|
||||
# $log2 는 수행 등 커맨드 폼의 셀렉트 및 NEXT 버튼
|
||||
print $log2;
|
||||
}
|
||||
print<<EOM;
|
||||
<tr>
|
||||
<form method="$method" action="$park">
|
||||
<td valilgn="middle">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="hidden" name="camp" value="$camp">
|
||||
<input type="hidden" name="sogo" value="$sogo">
|
||||
<input type="submit" value="† 국제 교류 광장 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
|
||||
print <<EOM;
|
||||
<form method="$method" action="$park">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="hidden" name="camp" value="$camp">
|
||||
<input type="hidden" name="sogo" value="$sogo">
|
||||
<input type="submit" value="† 국제 교류 광장 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
|
||||
if($no_mouse==1){
|
||||
print qq|<tr>$log2</tr>|;
|
||||
print $log2;
|
||||
}
|
||||
print<<EOM;
|
||||
<tr>
|
||||
<form method="$method" action="$hist">
|
||||
<td valilgn="middle">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 과거의 영광 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
|
||||
print <<EOM;
|
||||
<form method="$method" action="$hist">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 과거의 영광 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
|
||||
if(!$type && $cmd<=0){
|
||||
print <<"EOM";
|
||||
<tr>
|
||||
<form method="$method" action="$script">
|
||||
<td valilgn="middle">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="hidden" name="cmd" value="20">
|
||||
<input type="submit" value="† 쇼핑몰 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
if(!$type && $cmd<=0){
|
||||
print <<EOM;
|
||||
<form method="$method" action="$script">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="hidden" name="cmd" value="20">
|
||||
<input type="submit" value="† 쇼핑몰 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
}
|
||||
print <<"EOM";
|
||||
<tr>
|
||||
<form method="$method" action="$public">
|
||||
<td valilgn="middle">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 공식 조약 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
}
|
||||
|
||||
print <<EOM;
|
||||
<form method="$method" action="$public">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 공식 조약 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
|
||||
if($no_mouse==2){
|
||||
print qq|<tr>$log2</tr>|;
|
||||
print $log2;
|
||||
}
|
||||
print<<EOM;
|
||||
<tr>
|
||||
<form method="$method" action="$campbbs">
|
||||
<td>
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 국가별 작전 회의실 †" class="button1">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
EOM
|
||||
if($no_mouse>=3){
|
||||
print qq|<tr>$log2</tr>|;
|
||||
}
|
||||
print<<EOM;
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
print <<EOM;
|
||||
<form method="$method" action="$campbbs">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<input type="hidden" name="pw" value="$pw">
|
||||
<input type="submit" value="† 국가별 작전 회의실 †" class="button1">
|
||||
</form>
|
||||
EOM
|
||||
|
||||
if($no_mouse>=3){
|
||||
print $log2;
|
||||
}
|
||||
|
||||
print <<EOM;
|
||||
</aside>
|
||||
</div>
|
||||
EOM
|
||||
|
||||
my($uti, $sti, $cuti, $csti) = times();
|
||||
$uti += $cuti;
|
||||
$sti += $csti;
|
||||
my($cpu) = $uti + $sti;
|
||||
my $disp="CPUs($cpu): User($uti) System($sti)<br>";
|
||||
my $disp="<div class='moji2'>CPUs($cpu): User($uti) System($sti)</div>";
|
||||
|
||||
if($layout_flag==1){
|
||||
print <<EOM;
|
||||
<table width="740" border="0" cellspacing="4" cellpadding="4" bgcolor="#444466">
|
||||
<tr>
|
||||
<td bgcolor="#000000" align="center" valign="top" height="120">
|
||||
<tt class="moji1">
|
||||
$log
|
||||
</tt>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
Reference in New Issue
Block a user