diff --git a/hwe/func.php b/hwe/func.php index e1ab09ce..d60d2654 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -461,6 +461,36 @@ function commandGroup($typename, $type = 0) } } +function getCommandTable(General $general){ + $db = DB::db(); + $gameStor = KVStorage::getStorage($db, 'game_env'); + $gameStor->turnOnCache(); + $env = $gameStor->getAll(); + + $result = []; + foreach (GameConst::$availableGeneralCommand as $commandCategory => $commandList) { + $subList = []; + foreach ($commandList as $commandClassName) { + $commandObj = buildGeneralCommandClass($commandClassName, $general, $env); + if (!$commandObj->canDisplay()) { + continue; + } + $subList[Util::getClassNameFromObj($commandObj)] = [ + 'compansation'=>$commandObj->getCompensationStyle(), + 'possible'=>$commandObj->hasMinConditionMet(), + 'title'=>$commandObj->getCommandDetailTitle(), + ]; + } + + $result[] = [ + 'category'=>$commandCategory, + 'values'=>$subList + ]; + } + + return $result; +} + function printCommandTable(General $generalObj) { $db = DB::db(); diff --git a/hwe/index.php b/hwe/index.php index fde1622b..938606dc 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -104,6 +104,8 @@ $auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction'); + + - + + GameConst::$maxTurn, + 'maxPushTurn'=>12, + 'commandList'=>getCommandTable($generalObj), + 'serverNow'=>TimeUtil::now(false), + 'baseColor2'=>GameConst::$basecolor2, + ])?> @@ -233,49 +242,11 @@ $auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction'); -
+
-
- - - - - - - - - - - - - - - - -
- 명령 목록 -
-
-
- Ctrl, Shift, 드래그로 복수선택 가능  반복&수정 - -
-
- ;color:white;width:160px;font-size:13px;> -
-
+
+
diff --git a/hwe/scss/main.scss b/hwe/scss/main.scss index d9983ada..e871e3d5 100644 --- a/hwe/scss/main.scss +++ b/hwe/scss/main.scss @@ -9,19 +9,22 @@ body { border-color: gray; background-position: center; background-repeat: repeat-y; - overflow-x: hidden; } -@include media-breakpoint-up(lg) { +@include media-breakpoint-up(md) { #container { width: 1000px; margin: 0 auto; } } -@include media-breakpoint-down(lg) { +@include media-breakpoint-down(md) { + body{ + overflow-x: hidden; + } + #container { - width: 100%; + width: 500px; margin: 0 auto; } } @@ -33,10 +36,10 @@ body { } -@include media-breakpoint-up(lg) { +@include media-breakpoint-up(md) { #map_view { grid-template-columns: 700px 300px; - grid-template-rows: 520px auto; + grid-template-rows: 520px 130px auto; } #mapZone { @@ -54,14 +57,24 @@ body { grid-row-end: 3; } + + #routeButtons{ + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 3; + grid-row-end: 4; + text-align: center; + } + #reservedCommandList { width: 300px; grid-column-start: 2; grid-column-end: 3; grid-row-start: 1; - grid-row-end: 3; + grid-row-end: 4; } + .buttonPlate { display: grid; grid-template-columns: repeat(10, 1fr); @@ -87,7 +100,7 @@ body { } } -@include media-breakpoint-down(lg) { +@include media-breakpoint-down(md) { .buttonPlate { display: grid; grid-template-columns: repeat(5, 1fr); @@ -111,6 +124,37 @@ body { margin: 0; display: block; } + + + #mapZone { + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 1; + grid-row-end: 2; + } + + + #reservedCommandList { + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 2; + grid-row-end: 3; + } + + #routeButtons{ + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 3; + grid-row-end: 4; + } + + + #cityInfo { + grid-column-start: 1; + grid-column-end: 2; + grid-row-start: 4; + grid-row-end: 5; + } } .toolbarButton { @@ -171,10 +215,6 @@ body { transform: translateY(-50%); } -#sidebar button { - /*width:100px;*/ -} - .turn_pad { white-space: nowrap; font-weight: lighter; diff --git a/hwe/ts/ReservedCommand.vue b/hwe/ts/ReservedCommand.vue new file mode 100644 index 00000000..a3655922 --- /dev/null +++ b/hwe/ts/ReservedCommand.vue @@ -0,0 +1,239 @@ + + + \ No newline at end of file diff --git a/hwe/ts/build_exports.json b/hwe/ts/build_exports.json index 4f185db8..d64ecacf 100644 --- a/hwe/ts/build_exports.json +++ b/hwe/ts/build_exports.json @@ -13,7 +13,6 @@ "bossInfo": "bossInfo.ts", "myPage": "myPage.ts", "extExpandCity": "extExpandCity.ts", - "main": "main.ts", "dipcenter": "dipcenter.ts", "diplomacy": "diplomacy.ts", "currentCity": "currentCity.ts", @@ -21,12 +20,14 @@ "history": "history.ts", "select_general_from_pool": "select_general_from_pool.ts", "extKingdoms": "extKingdoms.ts", - "common": "common_deprecated.ts" + "common": "common_deprecated.ts", + "main": "main.ts" }, "ingame_vue": { "v_inheritPoint": "v_inheritPoint.ts", "v_board": "v_board.ts", "v_NPCControl": "v_NPCControl.ts", - "v_join": "v_join.ts" + "v_join": "v_join.ts", + "v_main": "v_main.ts" } } \ No newline at end of file diff --git a/hwe/ts/main.ts b/hwe/ts/main.ts index 10d15a7e..5e522a50 100644 --- a/hwe/ts/main.ts +++ b/hwe/ts/main.ts @@ -15,6 +15,9 @@ import { exportWindow } from './util/exportWindow'; import {stringifyUrl} from 'query-string'; import { joinYearMonth } from './util/joinYearMonth'; import { parseYearMonth } from './util/parseYearMonth'; + + + exportWindow($, '$'); import '../scss/main.scss'; @@ -40,9 +43,8 @@ type ReservedTurnResponse = { autorun_limit: number|null, } -$(function ($) { - setAxiosXMLHttpRequest(); +$(function ($) { $('#refreshPage').click(function () { document.location.reload(); return false; @@ -218,8 +220,8 @@ $(function ($) { window.open(href); }); - setInterval(myclock, 500); - reloadCommandList(); + //setInterval(myclock, 500); + //reloadCommandList(); activateFlip(); initTooltip(); -}); \ No newline at end of file +}); diff --git a/hwe/ts/v_main.ts b/hwe/ts/v_main.ts new file mode 100644 index 00000000..7141ad33 --- /dev/null +++ b/hwe/ts/v_main.ts @@ -0,0 +1,9 @@ +import { createApp } from 'vue' +import ReservedCommand from './ReservedCommand.vue'; +import BootstrapVue3 from 'bootstrap-vue-3' +import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest'; + + +setAxiosXMLHttpRequest(); + +createApp(ReservedCommand).use(BootstrapVue3).mount('#reservedCommandList') \ No newline at end of file