当前位置: 首页 > 文档资料 > KAG 标签文档 v1.0 >

履历层

优质
小牛编辑
128浏览
2023-12-01

标签

描述

history

设定履历层的属性

showhistory

clearhistory

自动显示履历层

清除履历层

hr

把履历层换行

hact

endhact

为履历层的文字添加行为

hidemessage

隐藏文字层

history

说明:

(1) 设定履历层的属性

(2) 内部主要通过setHistoryOptions(elm)实现

属性:

enable: true/false(history层是否滚动鼠标滑轮是否出现)

output: true/false

(判断此句之后的文字是否记录在history层上, false 为不记录,文字不会出现)

autoReturn true/false

例子:

Hello6[r]

@history output=true enabled = true autoReturn = false

;因为 autoReturn = false,所以在履历图层中不会自动换行

Hello7Hello7Hello7Hello7Hello7Hello7Hello7Hello7Hello7aaaaaaaaaaaassss[r]

fasdfasd[r]

fasdf[r]

showhistory

说明:

(1) 自动显示履历层

(2) 内部主要通过showHistoryByScenario(elm)实现

例子:

fdadfadfasdf

@showhistory

clearhistory

说明:

(1) 清除historyLayer和historyOfStore 两层

(2) 内部主要通过historyLayer.clear()和historyOfStore.clear()实现

例子:

asasf

@clearhistory

@showhistory

; “asasf”不出现在history层

hr

说明:

(1) 将history层换页加换行, 但测试后好像只有换行功能

(2) 内部主要通过historyLayer.repage()和historyLayer.reline()实现

例子:

asfasdfasfasf

@hr

;下面一行与上一行中间空了一行

Fasdfasdfasfasdfadf

hact

endhact

说明:

(1) 为履历层的文字添加行为

(2) 打开履历层时, 对应最后面的文字会有底线

(3) 前者内部通过historyLayer.setNewAction(elm.exp)实现

(4) 后者内部通过historyLayer.clearAction()实现

属性:

hact有属性exp

例子:

asasf

[l][r]

@hact exp="System.inform('abc')"

123[r]

@endhact

hello[r]

hello2[r]

hello3[r]

;123和hello在historylayer都有高亮(hightlight),当点击它时就会弹出abc的对话框

hidemessage

说明:

(1) 隐藏所有message层, 一按键就会出现返

(2) 内部通过hideMessageLayerByScenario(elm)实现

例子:

@iscript

kag.fore.messages[0].loadImages("a");

System.inform("HI");

kag.tagHandlers.hidemessage();

@endscript

在message[0]的图像被隐藏,相当于点了鼠标右键消失掉