KCDDP ADV综合创作站 » 高级技术区 » 觀看歷史訊息的問題


2009-6-11 09:42 m00525
觀看歷史訊息的問題

以下是從範例改來的
問題在我若調整文字顯示的範圍(ex:增加 marginr=122 marginb=90),整個歷史訊息會變的很怪
煩煩高手告訴我該怎麼改程式碼....感謝>"< !!!
-----------------------
*start
[backlay]
[image layer=3 page="back" storage="History底圖" visible="true" left=0 top=0]
[layopt layer="message1" visible="true" page="back" left=0 top=0]
;调整文字显示位置
[position layer="message1" page="back" marginl=80 margint=121 opacity=0]
[current layer="message1" page="back"]
[er]

;计算页数
[eval exp="tf.行数=kag.historyLayer.dataPos-1"]
[eval exp="tf.页数=tf.行数\10"]
[eval exp="tf.页数++" cond="tf.行数%10>0"]
[eval exp="tf.循环=10"]

[eval exp="tf.当前页=tf.页数"]

;打开时显示最后一页
*循环一
[nowait]
;历史记录不到头则显示
[if exp="kag.historyLayer.dataPos-tf.循环>=0"]
;一般对话字体
[font color="0x000000" shadow="false"]
;姓名显示字体
[font color="0x52823F" shadow="true" shadowcolor="0xFFFFFF" cond="kag.historyLayer.data[kag.historyLayer.dataPos-tf.循环].substring(0,1)=='〔'"]
;@link exp="kag.historyLayer.actionInfo[0][0][0].action.exp"
[emb exp="kag.historyLayer.data[kag.historyLayer.dataPos-tf.循环]"]
;[endlink]
[r]
[endif]
[eval exp="tf.循环--"]

[jump target=*循环一 cond="tf.循环>0"]
[endnowait]
[locate x=600 y=40]
[button normal=上頁鈕 target=*刷新画面 exp="tf.当前页--" cond="tf.当前页>1"]
[locate x=500 y=-60]
[button graphic=r-return storage="rmenu.ks" target=*return]
[trans method="crossfade" time=200]
[wt]
[s]

*刷新画面
[current layer="message1" page="fore"]
[er]
[eval exp="tf.循环=10"]

*循环二
[nowait]

;不是第一页的情况
[if exp="tf.当前页!=1"]

[if exp="kag.historyLayer.dataPos-tf.循环-(tf.页数-tf.当前页)*10>=0"]
[font color="0x000000" shadow="false"]
[font color="0x52823F" shadow="true" shadowcolor="0xFFFFFF" cond="kag.historyLayer.data[kag.historyLayer.dataPos-tf.循环-(tf.页数-tf.当前页)*10].substring(0,1)=='〔'"]
[emb exp="kag.historyLayer.data[kag.historyLayer.dataPos-tf.循环-(tf.页数-tf.当前页)*10]"][r]
[endif]

[endif]
[if exp="tf.当前页==1"]
[font color="0x000000" shadow="false"]
[font color="0x52823F" shadow="true" shadowcolor="0xFFFFFF" cond="kag.historyLayer.data[10-tf.循环].substring(0,1)=='〔'"]
[emb exp="kag.historyLayer.data[10-tf.循环]"][r]
[endif]

[eval exp="tf.循环--"]

[jump target=*循环二 cond="tf.循环>0"]
[endnowait]

[locate x=600 y=40]
[button normal=上頁鈕 target=*刷新画面 exp="tf.当前页--" cond="tf.当前页>1"]
[locate x=600 y=255]
[button normal=下頁鈕 target=*刷新画面 exp="tf.当前页++" cond="tf.当前页<tf.页数"]
[locate x=500 y=-60]
[button graphic=r-return storage="rmenu.ks" target=*return]
[s]

2009-6-11 15:02 全局变量D
你应该先改系统设定历史记录的margin...= =
因为历史记录的换行和对话框的不一样...它是根据历史记录的显示范围自己断行的...

应该是在historylayer.tjs里

2009-6-11 22:46 m00525
是这样子喔,感谢你了^^"
我试试看好了。

[[i] 本帖最后由 m00525 于 2009-6-16 08:52 编辑 [/i]]

2009-8-7 17:10 57379170
习惯 用timer控制

所有的翻页 都是 数据变化
然后在 timer 中监测数据变化 ,监测到数据变化 来处理相应显示。 这样也可以轻松加入 滚动条

也看到过有人写 historyEX 了 自己加了一个 竖向 sliderbar。
其实自己 土鳖改出来一个 竖向的 silderbar 其实,vertical 状态时 silderbar就是竖向的,你可以单独把 sliderbar 里边的 vertical 属性 改成 myvertical 然后 myvertical = true 就可以在一般情况下用 竖向 sliderbar 了

2009-8-7 17:18 57379170
总感觉
不是第一页的情况
这些看着特别别扭。。

页: [1]
查看完整版本: 觀看歷史訊息的問題


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.