楼主: 海胆啾啾
打印 上一主题 下一主题

[反馈] ScrollView经常出现自动下滑的情况

[复制链接]

3

主题

138

回帖

65

积分

Lv.3 矿物能手

UID
6472670
小麦
3
金锭
422
下界之星
0
楼主
发表于 2020-1-26 11:48:37 | 显示全部楼层 IP:福建
这个控件是微软原生的,可以自行去res/ui目录下里找到scrollview控件的等等详细参数,ModSDK的UI教程相对不太完善,原版包是最好的教材

3

主题

138

回帖

65

积分

Lv.3 矿物能手

UID
6472670
小麦
3
金锭
422
下界之星
0
沙发
发表于 2020-1-27 17:34:21 | 显示全部楼层 IP:福建
  1. "scrolling_panel": {
  2.     "type": "panel",
  3.     // Size and offset of the area within this control that contains the visible
  4.     // scrolling content area and scroll box/track
  5.     "$scrolling_pane_size|default": [ "100%", "100%" ],
  6.     "$scrolling_pane_offset|default": [ 0, 0 ],

  7.     // Sizes and offsets of the background behind the scrolling content, the
  8.     // viewport containing the scrolling content, the scroll track, and the area
  9.     // in which the scroll box is drawn.
  10.     "$background_size|default": [ "100%", "100%" ],
  11.     "$background_offset|default": [ 0, 0 ],
  12.     "$scroll_view_port_size|default": [ "100%", "100%" ],
  13.     "$scroll_view_port_offset|default": [ 0, 0 ],
  14.     "$scroll_bar_left_padding_size|default": [ 2, 0 ],
  15.     "$scroll_bar_right_padding_size|default": [ 2, 0 ],
  16.     "$view_port_size|default": [ "fill", "100%" ],
  17.     "$scroll_bar_contained|default": false,
  18.     "$scroll_size|default": [ 4, "100%" ],

  19.     // The touch version of the scroll track and bar are narrower by default,
  20.     // but these overrides can themselves be overridden.
  21.     "$background_size_touch|default": [ "100%", "100%" ],
  22.     "$background_offset_touch|default": [ 0, 0 ],
  23.     "$scroll_view_port_size_touch|default": [ "100%", "100%" ],
  24.     "$scroll_view_port_offset_touch|default": [ 0, 0 ],
  25.     "$scroll_bar_left_padding_size_touch|default": [ 0, 0 ],
  26.     "$scroll_bar_right_padding_size_touch|default": [ 0, 0 ],
  27.     "$view_port_size_touch|default": [ "100%", "100%" ],
  28.     "$scroll_bar_contained_touch|default": true,
  29.     "$scroll_size_touch|default": [ 4, "100%" ],

  30.     // The images used for the background, scroll track, and scroll box (for
  31.     // mouse and for touch) can be overridden by specifying
  32.     // $scroll_background_image_control, $scroll_track_image_control,
  33.     // $scroll_box_mouse_image_control, and $scroll_box_touch_image_control.

  34.     // The content you want inside the scrolling viewport must be specified
  35.     // by defining $scrolling_content.

  36.     "$scroll_box_visible|default": true,
  37.     "$scroll_box_visible_touch|default": false,
  38.     "$use_touch_mode|default": false,
  39.     "$show_background|default": true
  40. }
复制代码

确认一下这些property都有检查过了吗

3

主题

138

回帖

65

积分

Lv.3 矿物能手

UID
6472670
小麦
3
金锭
422
下界之星
0
板凳
发表于 2020-2-21 17:04:04 | 显示全部楼层 IP:福建

这个问题是只有在手机版才存在的吗?
我在电脑版使用网格布局,将按钮作为模板绑定在网格里
同时用网格作为下拉选单的内容
点击下方按钮并不会自动下滑

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

3

主题

138

回帖

65

积分

Lv.3 矿物能手

UID
6472670
小麦
3
金锭
422
下界之星
0
地板
发表于 2020-6-6 20:27:21 | 显示全部楼层 IP:福建
海胆啾啾 发表于 2020-6-5 20:01
1 是的,我直接尝试了100%,在开发过程中还是会下滑,且希望是否能在之后修复固定尺寸的问题呢, 让我困惑 ...

如果是关闭UI或者打开UI闪退,我个人是认为因为serverblockuseevent是tick事件,你点击一次自定义方块实际会触发好几次,同时创建好几层UI可能会产生蜜汁BUG
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

返回顶部