• R/O
  • SSH
  • HTTPS

hyakutyping: コミット


コミットメタ情報

リビジョン399 (tree)
日時2010-05-03 07:09:26
作者satofumi

ログメッセージ

BS が振動するように修正

変更サマリ

差分

--- trunk/cpp_lua/scripts/display_waka.lua (revision 398)
+++ trunk/cpp_lua/scripts/display_waka.lua (revision 399)
@@ -38,7 +38,7 @@
3838 local current_text_ = nil
3939 local current_roman_text_ = nil
4040 local current_sample_text_ = nil
41-local bs_offset_ = nil
41+local bs_position_ = nil
4242 local cursor_label_draw_ = nil
4343
4444 local scheduler_blink_cursor_id_ = -1
@@ -59,17 +59,17 @@
5959
6060 -- BS の振動用
6161 function vibrateBs()
62- while bs_offset_ ~= nil do
63- bs_offset_ = Point(0, -3)
62+ while bs_position_ ~= nil do
63+ bs_label_:setPosition(Point(bs_position_.x , bs_position_.y - 3))
6464 Scheduler:wait(100)
6565
66- bs_offset_ = Point(0, 0)
66+ bs_label_:setPosition(Point(bs_position_.x , bs_position_.y))
6767 Scheduler:wait(100)
6868
69- bs_offset_ = Point(0, -3)
69+ bs_label_:setPosition(Point(bs_position_.x , bs_position_.y - 3))
7070 Scheduler:wait(100)
7171
72- bs_offset_ = Point(0, 0)
72+ bs_label_:setPosition(Point(bs_position_.x , bs_position_.y))
7373 Scheduler:wait(500)
7474 end
7575 end
@@ -98,7 +98,7 @@
9898
9999 scheduler_:remove(scheduler_blink_cursor_id_)
100100 scheduler_:remove(scheduler_vibrate_bs_id_)
101- bs_offset_ = nil
101+ bs_position_ = nil
102102
103103 current_waka_id_ = InvalidId
104104 current_yomibito_id_ = InvalidId
@@ -251,10 +251,10 @@
251251 function display_waka_input_sample(waka_id, input_ku, current_text,
252252 is_roman, view_ku)
253253
254- if bs_offset_ == nil then
254+ if bs_position_ == nil then
255255 -- リソースがなければ作成する
256256 scheduler_vibrate_bs_id_ = scheduler_:insert(vibrateBs)
257- bs_offset_ = Point(0, 0)
257+ bs_position_ = Point(0, 0)
258258 end
259259
260260 -- 入力するべき文字列の生成
@@ -314,11 +314,9 @@
314314 -- 入力が間違っている場合に BS を表示
315315 waka_layer_:remove(bs_label_)
316316 if miss_detected then
317- local bs_position = Point(position.x - bs_label_:rect().w,
318- position.y)
319- bs_position.x = bs_position.x - 4 + bs_offset_.x
320- bs_position.y = bs_position.y + 11 + bs_offset_.y
321- bs_label_:setPosition(bs_position)
317+ bs_position_ = Point(position.x - bs_label_:rect().w - 4,
318+ position.y + 11)
319+ bs_label_:setPosition(bs_position_)
322320 waka_layer_:push_front(bs_label_)
323321 end
324322
旧リポジトリブラウザで表示