Skip to content

Commit c57c0e6

Browse files
committed
fix cpm/accuracy crashed when reset stats and add another exercise lesson
1 parent 0e2b620 commit c57c0e6

19 files changed

+72
-54
lines changed

Texts/Lessons/Basic/00000005.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("", "", "", "")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=false
77
message="နောက်ထပ် အလွယ်ကူသော အက္ခရာ
88
\"ဆ တ သ စ\"

Texts/Lessons/Basic/00000006.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("", "", "", "")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=true
77
message=""
88
hide_keyboard=false

Texts/Lessons/Basic/00000008.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("ဆတသစ", "စတသဆ", "သတဆစ", "တသဆစ", "ဆစတသ", "စတဆသ", "သစတဆ", "ဆတသစ")
4-
repeats=1.0
5-
allow_mistakes=80.0
4+
repeats=1
5+
allow_mistakes=80
66
randomize=true
77
message="Keyboard ဖျောက်ပြီး စမ်း ရိုက်ကြည့် ရအောင်
88
မြန်ဖို့မလို မှန်မှန်သာ ရိုက်ပါ။"

Texts/Lessons/Basic/00000009.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("စမင", "ဆတ", "ကတ", "သတက", "ကသ", "မစင", "ကတသ", "မနတဆကငသစ", "ကမနငတသဆစ", "စသငကဆတနမ", "ဆစတသနငမက", "တသနငမကဆစ", "စတသငက", "တဆငနမ", "နငမကတသဆစ", "သတဆစမကနင", "ဆကတငနသမစ", "ဆတစသကငမန")
4-
repeats=1.0
5-
allow_mistakes=80.0
4+
repeats=1
5+
allow_mistakes=80
66
randomize=true
77
message="လေ့လာပြီးသော
88
\"ဆ တ န မ က င သ စ\"

Texts/Lessons/Basic/00000010.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("နိ", "မိ", "တိ", "ဆိ", "ကိ", "ငိ", "သိ", "စိ", "တိတိ", "သိသိ", "ကိတိ", "ကတိ", "သတိ", "တိကိသိစိ", "နိစိသိကိ", "ဆိသိကိနိ", "ကသိတိနိ")
4-
repeats=1.0
5-
allow_mistakes=80.0
4+
repeats=1
5+
allow_mistakes=80
66
randomize=false
77
message="\" ိ \" ကို သုံးပြီး လေ့ကျင့်ပြီးသား အက္ခရာများနဲ့ လေ့ကျင့်ရအောင်"
88
hide_keyboard=false

Texts/Lessons/Basic/00000012.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("သိ", "ငင်", "တင်", "သမ်", "သိမ်", "တိမ်", "ကိမ်", "စမ်", "နန်", "မန်", "တန်", "သိမ်မိန်", "တိမ်သိတ်", "ဆိတ်သတ်", "တိတ်သက်", "သင်ကန်", "သန်တင်")
4-
repeats=1.0
5-
allow_mistakes=80.0
4+
repeats=1
5+
allow_mistakes=80
66
randomize=false
77
message="အကုန် ပေါင်းပြီး ပြန် လေ့ကျင့်ရအောင်"
88
hide_keyboard=false

Texts/Lessons/Basic/00000013.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("", "", "", "")
4-
repeats=3.0
5-
allow_mistakes=80.0
4+
repeats=3
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="\" လ ည အ ပ \" လေးလုံးကို လေ့ကျင့်ရအောင်"

Texts/Lessons/Basic/00000015.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("ဆိုင်", "တိုင်", "သူ", "တုပ", "အမူ", "အကူ", "အတူ", "ကူး", "ကင်း", "တိုင်း", "လည်း", "သိမ်း", "တိမ်း", "နန်း", "တန်း", "ဆန်း", "သန်း", "ငူ", "နုတ်နုတ်", "နုတ်နုတ်စင်းသည်")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="\" ု ူ း \" သုံးလုံး လေ့လာရအောင်"

Texts/Lessons/Basic/00000016.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("ကား", "သား", "စား", "ငါ", "ငါး", "ဆား", "ပါ", "တင်ပါး", "အား", "သိုင်းသမား", "ကစား", "စကား", "တာ", "ခါး", "တား", "စပါး")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="\" ာ ါ \" နှစ်မျိုး လေ့လာရအောင်"

Texts/Lessons/Basic/00000017.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("", "ဖိုးဖိုး", "ဖား", "ဖုတ်", "ဖိမိ", "", "ထိုင်", "ထိထိမိမိ", "ထိုးသား", "ထားထားပါ", "ထိထိမိမိ", "ဖိမိထိမိ", "ထမင်းစား", "ထူး", "ထား", "", "ခင်ခင်မင်မင်", "ခါးနာ", "ထမင်းခူး", "", "လိမ်", "လူးလိမ့်", "လင်းလက်ထင်းထိန်", "လိမ်လိမ်မာမာ", "", "ထခဖလ", "ခလဖလ", "လလထဖခခဖထ")
4-
repeats=1.0
5-
allow_mistakes=80.0
4+
repeats=1
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="\" ဖ ထ ခ လ ည\" များလေ့လာရအောင်"

Texts/Lessons/Basic/00000018.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("စုံစုံလင်လင်", "နိုင်ငံ", "ပြည်", "ခြင်", "ခြား", "စမ်းမြမြ", "လူ့", "အချို့", "ကြိုတင်", "အမြင့်", "ဖြည်ထုတ်", "ဖြည်းဖြည်း", "ပိုင့်", "အခြား", "စိမ့်စိမ့်", "အံ့", "အဆိုးအမြင့်", "ကြီးကြီးမားမား", "ကြီးမြင့်")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="နောက်ထပ် \" ့ ံ ြ \" များ ဆက်လက်လေ့လာရအောင်"

Texts/Lessons/Basic/00000019.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Exercise]
22

33
texts=PackedStringArray("", "", "", "", "ဒို့", "ဒိုင်", "ဒါ", "ဒီ", "ဓိ", "အဓိက", "ဓာတ်", "ဒိုးမတ်", "ဓာတ်ဆီဆိုင်", "ဒီး", "ဓာတ်ကြီး", "", "", "", "", "ဗိုလ်", "ဗိုက်", "ဗိုလ်ကြီး", "ဗန်း", "ဗဟုသုတ", "ဗဟို")
4-
repeats=2.0
5-
allow_mistakes=80.0
4+
repeats=2
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false
88
message="အက္ခရာ အသစ်လေးလုံး \"ဗ ဒ ဓ ဂ\" ဆက်လက်လေ့လာရအောာင်။"

Texts/Lessons/Extra/00000015.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Exercise]
22

33
texts=PackedStringArray("ဖိုးသာထူး", "ဖိုးသာထူး ဖိုးသာထူး၊", "အလွန်ဝတဲ့ ဖိုးသာထူး။", "ဖိုးသာထူး ဝမ်းပူပူ၊", "ဖိုးဝကြီးနဲ့တူ။", "တူပါသကွဲ့ မယုံငြား၊", "သည်မှာ ကြည့်ပါသလား။", "တောင် တောရယ် သာ", "မာလာက ငုံဖူး။", "တစ်ပင်ကို နှစ်ပင်ယှက်တယ်၊", "ကျေးငှက်က မြူး။")
4-
repeats=0.0
5-
allow_mistakes=80.0
4+
repeats=0
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false

Texts/Lessons/Extra/00000050.cfg

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Exercise]
22

3-
texts=PackedStringArray("နွေဦးကာက မြူထသောအခါ")
4-
repeats=0.0
5-
allow_mistakes=80.0
3+
texts=PackedStringArray("နွေဦးကာက မြူထသောအခါ", "ရင်းထောင်ရင်းဆွဲ၊ ဆောင်မြဲအိုးလွယ်ကာ", "ဓားနှီးထက်စွာ၊ ခါးမှာချပ်လျက်", "ထန်းပွင့်ထန်းခိုင်၊ ရွှန်းမြိုင်မြိုင်", "ကလိုင်သာလွယ်လို့ တက်သည်နှင့်လေး။", "ထန်းပင်ထန်းလက်၊ ထန်းရွက်ကယ်ဝေဝေ", "စင်အောင်ခုတ်ထစ်၊ နုမျစ်ကယ်ထန်းဦးရေ", "မယားငယ်ဆွေ။ ထန်းရေသိမ်းဆည်း", "သားမြေးဟစ်ကြော်၊ ခွေးဝက်ကယ်ခေါ်", "ထန်းလျှော်သာ ယုန်ပိုက်စည်းငယ်နှင့်လေး။", "ခေါ်သံရိုက်ဟည်း၊ လူလည်းကြော်ငြာ", "ခွေးဟစ်လူဟစ်၊ ခတ်ပစ်ကယ်ခြောက်သောခါ", "ပုတတ်ကယ်ယုန်ခါ၊ တောမှာရှိကြ", "ငုံး ကြက်ကယ် ဖွတ် မြွေ၊ ဝံပုလွေ", "မနေထွက်လာကြသည်တည့်လေး။", "ဝမ်းသာအားရ၊ မယားကတစ်သွယ်", "ဟင်းရွက်ဆိုးကောင်း၊ သောင်းပြောင်းရော၍လွယ်", "လင်ကတစ်သွယ်၊ ယုန်ငယ်ကစ", "တောသတ္တဝါ၊ တွေ့တိုင်းကိုသာ", "အိတ်မှာသာယူ၍ ချသည်နှင့်လေး။", "သို့နှင့်ရောက်က၊ ခဏအောင့်လျှင်", "တံစို့တက်နှင့်၊ ထန်းလျက်ဖိုမှာကင်", "ဟင်းအိုးဆူလျှင်၊ အကင်ခတ်ပြီး", "အိုးကင်းနှင့်လျှော်၊ ရေနှင့်ကြော်", "မိုးမျှော်ငရုတ်သီးငယ်နှင့်လေး။", "နှီးဒေါင်းလန်းကြီး၊ ခူးပြီးသောခါ", "သမီးနှင့်သား၊ များလို့မဝင်သာ", "ဒူးတစ်ဖက်ဟာ၊ တွန်းကာဖယ်လျက်", "သူ့ထက်ငါလေ၊ စားတော့မည်စေ", "စားပေသာလှ အုန်းခွက်ကယ်နှင့်လေး။", "ငုံ့လျက်ကိုယ်စီသာ၊ ဆုပ်ကာလွေးတော့သည်။", "ပြီးလျှင်ရေမရှာ၊ ခွေးသာကျွေးတော့သည်။")
4+
repeats=0
5+
allow_mistakes=80
66
randomize=false
77
hide_keyboard=false

project.godot

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ config_version=5
1111
[application]
1212

1313
config/name="Ultimate Myanmar Typing Wizard"
14+
config/tags=PackedStringArray("project")
1415
run/main_scene="res://src/main.tscn"
1516
config/project_settings_override="user://override.cfg"
1617
config/features=PackedStringArray("4.3", "Mobile")

src/Keyboard/keyboard.tscn

+13
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ offset_left = -64.0
129129
offset_top = -40.0
130130
offset_right = -12.0
131131
offset_bottom = 16.0
132+
text = "Backspace"
132133

133134
[node name="qwerty" type="HBoxContainer" parent="VBoxContainer"]
134135
layout_mode = 2
@@ -148,6 +149,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_dr5yv")
148149
[node name="Char" parent="VBoxContainer/qwerty/tab/Panel" index="2"]
149150
offset_left = -55.0
150151
offset_right = -3.0
152+
text = "Tab"
151153

152154
[node name="qwerty" type="Control" parent="VBoxContainer/qwerty"]
153155
layout_mode = 2
@@ -170,6 +172,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_ng5ll")
170172
[node name="Char" parent="VBoxContainer/asdfgh/CapsLock/Panel" index="2"]
171173
offset_left = -56.0
172174
offset_right = -4.0
175+
text = "CapsLock"
173176

174177
[node name="asdfgh" type="Control" parent="VBoxContainer/asdfgh"]
175178
layout_mode = 2
@@ -187,6 +190,7 @@ offset_left = -61.0
187190
offset_top = -41.0
188191
offset_right = -9.0
189192
offset_bottom = 15.0
193+
text = "Enter"
190194

191195
[node name="zxcvb" type="HBoxContainer" parent="VBoxContainer"]
192196
layout_mode = 2
@@ -206,6 +210,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_8djne")
206210
[node name="Char" parent="VBoxContainer/zxcvb/LShift/Panel" index="2"]
207211
offset_left = -59.0
208212
offset_right = -7.0
213+
text = "Shift"
209214

210215
[node name="zxcvb" type="Control" parent="VBoxContainer/zxcvb"]
211216
layout_mode = 2
@@ -221,6 +226,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_jjy0n")
221226
[node name="Char" parent="VBoxContainer/zxcvb/RShift/Panel" index="2"]
222227
offset_left = -58.0
223228
offset_right = -6.0
229+
text = "Shift"
224230

225231
[node name="ctrl_win_alt_space_alt_win_menu_ctrl" type="HBoxContainer" parent="VBoxContainer"]
226232
layout_mode = 2
@@ -236,6 +242,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_bbdjs")
236242
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/ctrl/Panel" index="2"]
237243
offset_left = -54.0
238244
offset_right = -2.0
245+
text = "Ctrl"
239246

240247
[node name="win" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl" instance=ExtResource("1_ik4w2")]
241248
custom_minimum_size = Vector2(120, 80)
@@ -248,6 +255,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_apsic")
248255
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/win/Panel" index="2"]
249256
offset_left = -47.0
250257
offset_right = 5.0
258+
text = "Win"
251259

252260
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/win"]
253261
modulate = Color(1, 1, 1, 0.705882)
@@ -278,6 +286,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_aoubn")
278286
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/alt/Panel" index="2"]
279287
offset_left = -57.0
280288
offset_right = -5.0
289+
text = "Alt"
281290

282291
[node name="space" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl" instance=ExtResource("1_ik4w2")]
283292
unique_name_in_owner = true
@@ -305,6 +314,7 @@ grow_vertical = 0
305314
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/space/Panel" index="2"]
306315
offset_left = -57.0
307316
offset_right = -5.0
317+
text = ""
308318

309319
[node name="line" type="Panel" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/space"]
310320
unique_name_in_owner = true
@@ -334,6 +344,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_aoubn")
334344
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/alt2/Panel" index="2"]
335345
offset_left = -56.0
336346
offset_right = -4.0
347+
text = "Alt"
337348

338349
[node name="win2" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl" instance=ExtResource("1_ik4w2")]
339350
custom_minimum_size = Vector2(120, 80)
@@ -346,6 +357,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_apsic")
346357
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/win2/Panel" index="2"]
347358
offset_left = -54.0
348359
offset_right = -2.0
360+
text = "Win"
349361

350362
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/win2"]
351363
modulate = Color(1, 1, 1, 0.705882)
@@ -376,6 +388,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_bbdjs")
376388
[node name="Char" parent="VBoxContainer/ctrl_win_alt_space_alt_win_menu_ctrl/ctrl2/Panel" index="2"]
377389
offset_left = -57.0
378390
offset_right = -5.0
391+
text = "Ctrl"
379392

380393
[node name="ColorHint" type="HBoxContainer" parent="VBoxContainer"]
381394
unique_name_in_owner = true

src/Stats/AccuracyProgressRadical.gd

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ var accuracy := 0.0
1313
func _ready() -> void:
1414
var stats : Array[StatisticEntry]= UserProfileManager.load_stats()
1515
texture_progress_bar.value = 0
16+
if stats.size() == 0:
17+
return
1618
var stat := stats[stats.size() - 1]
1719

1820
accuracy = stat.accuracy

src/Stats/cpm_progress_radical.gd

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ class_name CPMProgressRadical
55

66
var cpm: int
77

8-
@export var average_cpm: int = 180
9-
@export var professional_cpm: int = 320
8+
@export var average_cpm: int = 150
9+
@export var professional_cpm: int = 250
1010

1111
@export var lower_average_cpm_color: Color = Color.DARK_CYAN
1212
@export var above_average_cpm_color: Color = Color.MEDIUM_SPRING_GREEN
@@ -16,6 +16,8 @@ var cpm: int
1616

1717
func _ready() -> void:
1818
var stats := UserProfileManager.load_stats()
19+
if stats.size() == 0:
20+
return
1921
var stat := stats[stats.size() - 1]
2022
cpm = stat.char_per_min
2123
show_cpm()

src/Themes/main.tres

+23-23
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)