Files
erqiwang_youle/client/js/01_SubGame/codes/config/Layout_Action.js
T
joywayerandClaude Opus 5 b81e800f22 二七王:选主面板按美术实际出图方式(一张图5帧)重做资源与精灵定义
BTN_SUIT_CHOOSE 改为 5 帧(4 花色按钮各含底+图标+角标底、帧5=投降按钮含底+文字),
删除独立的 SUIT_ICON_L(512)/BTN_SURRENDER(534)/花色图标精灵/角标底精灵/投降文字精灵;
花色张数从单个文字精灵改为图片数字精灵(十位+个位),新增资源 NUM_MAIN_SUIT_COUNT(636)。
同步规格清单文档与两个测试文件里被钉死的精灵总数(387→382)。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 23:30:12 +08:00

105 lines
4.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
///////////////////////////////////////////////////////////////
////////// EQW_Layout: 阶段操作区配置(清单 §6.8)//////////////
///////////////////////////////////////////////////////////////
// 【纯数据文件】无函数、无副作用;依赖 LayoutConstants.js 先加载
// (引用其 EQW_Layout.TEXT_STYLE.*,属 EQW_Layout 内部自引用)。
var EQW_Layout = EQW_Layout || {};
//===== 叫分面板 =====
EQW_Layout.CALL_PANEL_BG = { kind: 'point', x: 355, y: 140, w: 575, h: 170 };
EQW_Layout.CALL_HINT_BG = { kind: 'point', x: 470, y: 100, w: 345, h: 33 };
//14 档位按钮:grid 布局(清单 §6.1 示例,7×2)
EQW_Layout.CALL_BTN_GRID = {
kind: 'grid', anchorX: 640, anchorY: 160, cols: 7, rows: 2,
itemWidth: 74, itemHeight: 56, spacingX: 7, spacingY: 24,
anchor: 'center', fillOrder: 'row'
};
//档位分数文字:贴对应档位按钮居中。CALL_BTN_1..14 是 14 个固定精灵,但本节点是共用模板,
//target 由调用方按第几档注入(不预置单一 target)。宽高随数字位数变化,清单未给固定值,
//资源 NUM_CALL_SCORE 单字位 30×40 仅供参考,不作为本节点的 w/h
EQW_Layout.CALL_BTN_SCORE_TEXT = {
kind: 'attach', targetKind: 'sprite', hAlign: 'center', vAlign: 'middle', offsetY: 4,
runtime: ['target', 'w', 'h']
};
//档位子数角标:贴对应档位按钮右上角,纯文字无底图,清单未给宽高(同上,调用方注入 target)
EQW_Layout.CALL_BTN_MULTIPLE_BADGE = {
kind: 'attach', targetKind: 'sprite', corner: 'topRight', offsetX: -30, offsetY: 2,
runtime: ['target', 'w', 'h']
};
EQW_Layout.CALL_BTN_NONE = { kind: 'point', x: 553, y: 345, w: 184, h: 57 };
//自己叫分大字
EQW_Layout.CALL_SELF_SCORE_TEXT = {
kind: 'point', x: 570, y: 320, w: 140, h: 70, textStyle: EQW_Layout.TEXT_STYLE.CALL_BIG
};
//===== 选主 / 投降面板 =====
EQW_Layout.MAIN_TITLE_BG = { kind: 'point', x: 330, y: 315, w: 425, h: 50 };
//4 花色 + 投降:投降不显示时只排前 4 项,anchor:left 保证前 4 个位置不变
EQW_Layout.MAIN_SUIT_LINE = {
kind: 'line', direction: 'horizontal', anchorX: 330, anchorY: 373,
itemWidth: 128, itemHeight: 55, spacing: 9, anchor: 'left'
};
//张数数字(十位):贴对应花色按钮下方偏左,资源 NUM_MAIN_SUIT_COUNT 24×32(十位为 0 时该精灵隐藏,调用方注入 target)
EQW_Layout.MAIN_SUIT_COUNT_TENS = {
kind: 'attach', targetKind: 'sprite', hAlign: 'center', vAlign: 'bottom', offsetX: -12, offsetY: -6, w: 24, h: 32,
runtime: ['target']
};
//张数数字(个位):贴对应花色按钮下方偏右,紧邻十位,资源 NUM_MAIN_SUIT_COUNT 24×32(调用方注入 target)
EQW_Layout.MAIN_SUIT_COUNT_ONES = {
kind: 'attach', targetKind: 'sprite', hAlign: 'center', vAlign: 'bottom', offsetX: 12, offsetY: -6, w: 24, h: 32,
runtime: ['target']
};
//对数角标文字:贴对应花色按钮右上角(按钮帧内已含角标底,本节点只定位叠加的文字)。
//清单未给宽高(调用方注入 target)
EQW_Layout.MAIN_SUIT_PAIR_BADGE = {
kind: 'attach', targetKind: 'sprite', corner: 'topRight', offsetX: -36, offsetY: 2, w: 34, h: 18,
runtime: ['target']
};
//===== 埋牌 / 出牌操作条 =====
//埋牌操作条:提示 / 倒计时(CD_SELF) / 埋牌,逐项不等宽(清单 §6.1)
EQW_Layout.BURY_OPERATION_BAR = {
kind: 'line', direction: 'horizontal', anchorX: 640, anchorY: 165,
itemHeight: 63, spacing: 45, anchor: 'center',
items: [
{ key: 'BURY_BTN_TIP', width: 180 },
{ key: 'CD_SELF', width: 60 },
{ key: 'BURY_BTN_SUBMIT', width: 180 }
]
};
//出牌操作条:倒计时(CD_SELF) / 出牌
EQW_Layout.PLAY_OPERATION_BAR = {
kind: 'line', direction: 'horizontal', anchorX: 640, anchorY: 345,
itemHeight: 55, spacing: 35, anchor: 'center',
items: [
{ key: 'CD_SELF', width: 75 },
{ key: 'PLAY_BTN_SUBMIT', width: 157 }
]
};
//===== 浮层 =====
//捡分飘字:起始位置在此。动画参数(floatRise / floatDuration)见 EQW_Anim.SCORE_FLOAT,不在此重复(SSOT)
EQW_Layout.GRADE_FLOAT = { kind: 'point', x: 570, y: 180, w: 170, h: 55 };
//状态提示条 · 等待类(如『等待庄家选主』)。与即时反馈类共用同一套精灵 BAR_TOAST/TXT_TOAST,
//仅位置预设不同,调用方按提示类型二选一应用(清单 §2.8:收敛为 3 条)
EQW_Layout.TOAST_WAIT = { kind: 'point', x: 500, y: 373, w: 320, h: 47 };
//状态提示条 · 即时反馈类(如『强甩失败』)。自动消失时长见 EQW_Anim.TOAST_DURATION,不在此重复(SSOT)
EQW_Layout.TOAST_INSTANT = { kind: 'point', x: 462, y: 172, w: 363, h: 50 };