Files
TankIC/3DTank/docs/SettingsStyleTable.md
T

4.9 KiB

Settings Style Table(设置页校准)

来源:3dtank.com/play/static/js/unpacked/module_82347.js 的 SettingsComponentStyle / SettingsMenuComponentStyle / SettingsButtonsComponentStyle / GameSettingsStyle / DropDownStyle / CheckBoxComponentStyle / InputRangeComponentStyle。 方法:在无头页面中加载原包模块,patch module_37036 的 ld 捕获样式类,实例化样式类后逐个执行 duv_1[0] 样式函数,并用 recording style object 记录 rpf / gp8 调用。

1. 页面骨架

原版字段 CSS
str.container(页面根) background:radial-gradient(#203040 0%, #03080D 100%); width:100%; height:100%; position:absolute; margin:0
blockContentOptions display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:flex-start; width:72.25em; height:calc(100% - 8.5em); padding-top:4.5em; position:relative
scroll display:flex; flex-direction:column; width:46.875em; overflow-x:hidden; overflow-y:scroll; scrollbar-width:thin
settingsBlockOptions display:flex; flex-direction:column; width:46.875em; height:100%; padding:1.875em; padding-bottom:0; background:rgba(255,255,255,0.1); position:relative
containerBlock width:50.625em; height:100%; padding-left:2.625em
borderLineOption width:49.125em; height:0.063em; margin-left:-1.875em; margin-bottom:1.875em; background:rgba(255,255,255,0.1)
commonBlock display:flex; flex-direction:column; justify-content:flex-start; align-items:center; width:100%; height:auto
rowBlock display:flex; flex-direction:row; justify-content:space-between; align-items:center; width:100%; height:auto
textHeadlineOptions font:500 1.125em/normal BaseFontBold; text-transform:uppercase
dropDownTitle font:400 1em/normal BaseFontRegular; margin:0 0 1em
dropDown width:30.625em; margin-bottom:1.75em
slider width:31.25em

2. 左侧菜单

原版字段 CSS
slideMenuOptions display:flex; flex-direction:column; justify-content:center; width:18em; height:2.5em; background:linear-gradient(to right,#2E3235,rgba(46,50,53,0)); color:rgb(255,188,9); z-index:1; transition:all .1s ease-in-out; position:relative
yellowLineMenuOptions width:0.313em; height:2.5em; background:rgb(255,188,9); position:absolute; z-index:3
menuItemOptions display:flex; align-items:center; justify-content:flex-start; width:18em; height:5em; position:relative; z-index:4; cursor:pointer
menuItemOptions span font:500 1.125em/normal BaseFontBold; text-transform:uppercase; margin-left:1.875em; margin-top:0.1em; color:rgba(255,255,255,0.6)
activeItemOptions span color:white; transition:.5s

3. 底部按钮

原版字段 CSS
containerGroupButton display:flex; align-items:center; justify-content:flex-end; width:100%; height:3.125em; padding-bottom:1.875em; align-self:flex-end; background:transparent
buttonsWidthBackReset width:15.625em
buttonSaveLeave width:18.125em

4. 控件

原版类/字段 CSS
DropDownStyle 容器 width:100%; position:relative
DropDownStyle 按钮 display:flex; align-items:center; justify-content:space-between; min-width:4.375em; width:100%; height:3.125em; border:0.063em solid rgba(255,255,255,0.2); background:rgba(255,255,255,0.1); padding:0 0.875em; box-sizing:border-box
CheckBoxComponentStyle display:flex; align-items:center; justify-content:flex-start; width:100%; height:2.25em; margin-bottom:1.25em
CheckBoxStyle 桌面 width:2.375em; height:2.375em; background:rgba(255,255,255,0.1); border:0.063em solid rgb(190,190,190); border-radius:20%; backdrop-filter:blur(12.5px)
InputRangeComponentStyle display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; height:3.188em; min-height:3.188em; margin-bottom:1.75em
InputRangeComponentStyle label color:white; font-size:0.9375em; margin-top:0
InputRangeComponentStyle input -webkit-appearance:none; width:100%; height:0.563em; background:transparent; cursor:pointer
GameSettingsStyle.containerFormOptions display:flex; flex-direction:column; margin-left:0.9em; margin-bottom:1em
GameSettingsStyle.notificationText color:rgba(255,255,255,0.5); text-align:left

5. 当前仍为近似

  • 复选框:外框/背景/圆角/边框已按 CheckBoxStyle 对齐;勾的图形仍是近似(原版由组件内部 SVG/伪元素绘制)。
  • 设置行的组合方式:已按 rowBlock / dropDownTitle / slider 的尺寸重建,但原版每个设置项的具体子组件层级仍需继续展开。
  • 下拉选项弹层:当前用原生 select,原版是自定义列表;尺寸/边框/背景已对齐。
  • 菜单滑动条的动态位置:当前按 index * 5em + 1.25em 计算,原版由组件状态计算 margin-top。