-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreensetengine.kv
158 lines (155 loc) · 6.45 KB
/
screensetengine.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<ScreenSetEngine>:
name: "screenSetEngine"
MDBoxLayout:
orientation: "vertical"
spacing:16
MDBoxLayout:
size_hint_y:.3
orientation: "vertical"
spacing:8
MDLabel:
size_hint_y:.12
text:'AI引擎设置'
halign:"center"
MDBoxLayout:
size_hint_y:.16
orientation: "horizontal"
MDLabel:
size_hint_x:.45
text:' AI思考时间毫秒:'
MDTextField:
id:id_ai_think_time
size_hint_x:.55
multiline:False
required: True
mode: "line"
#MDLabel:
# size_hint_y:.12
# text:' 选择引擎'
MDRelativeLayout:
size_hint_y:.24
#MDCheckbox:
# pos_hint:{"center_x": .15, "center_y": .95}
# id:id_checkbox_xqpy
# group: 'group1'
# active: True
# icon_active: "check"
# icon_inactive: "close"
# color_active: "red"
# color_active: "red"
# size_hint: None, None
# size: "128dp", "48dp"
# on_active:app.engine_name = 'xqpy'
#MDLabel:
# pos_hint:{"center_x": .75, "center_y": .95}
# text:'XQPy引擎(天天象棋AI中高之间)'
#MDCheckbox:
# pos_hint:{"center_x": .15, "center_y": .35}
# id:id_checkbox_uci
# group: 'group1'
# icon_active: "check"
# icon_inactive: "close"
# color_active: "red"
# color_active: "red"
# size_hint: None, None
# size: "128dp", "48dp"
# on_active:app.engine_name = 'uci'
MDLabel:
pos_hint:{"center_x": .55, "center_y": .35}
text:'UCI引擎'
#非android下使用
MDRectangleFlatButton:
id:id_sel_engine_file
text: "选择"
type:"small"
pos_hint:{"center_x": .55, "center_y": .35}
on_release:app.select_engine_file()
#android下使用 begin
MDCheckbox:
pos_hint:{"center_x": .37, "center_y": .35}
id:id_checkbox_inner
group: 'group2'
icon_active: "check"
icon_inactive: "close"
color_active: "red"
color_active: "red"
size_hint: None, None
size: "32dp", "32dp"
on_active:
app.engine_name = 'uci'
app.uci_engine_location = 'inner'
app.set_inner_engine()
MDLabel:
id:id_checkbox_inner_lab
pos_hint:{"center_x": .9, "center_y": .35}
text:'内置'
MDCheckbox:
pos_hint:{"center_x": .64, "center_y": .35}
id:id_checkbox_outer
group: 'group2'
icon_active: "check"
icon_inactive: "close"
color_active: "red"
color_active: "red"
size_hint: None, None
size: "32dp", "32dp"
on_active:
app.engine_name = 'uci'
app.uci_engine_location = 'outer'
app.set_outer_engine()
MDLabel:
id:id_checkbox_outer_lab
pos_hint:{"center_x": 1.17, "center_y": .35}
text:'外置'
#android下使用 end
MDRectangleFlatButton:
pos_hint:{"center_x": .88, "center_y": .35}
id:id_uci_info
type:"small"
text: "uci"
on_release:app.get_uci_info()
MDTextField:
size_hint_y:.36
id:id_uci_engine_filename
#disabled: True
multiline:True
mode: "line"#rectangle line
MDBoxLayout:
size_hint_y:.37
MDScrollView:
MDTextField:
id:id_uci_info
hint_text:"uci_info"
text:"引擎在收到UCI命令后,引擎必须用 id命令来帮助GUI识别自己的身份。并发送 option信息以告诉GUI该引擎支持哪些设置。下面是皮卡鱼参数仅供参考,以引擎返回的参数为准,不同引擎可能有不同的参数。MultiPV(主变思考数量,越高棋力越弱),Skill level(棋力水平),sixty move rule(60回合自然限招规则),Repetition Rule(棋规),UCIWDLcentipawn(胜率分数开关)"
multiline:True
#disabled: True
readonly:True
mode: "rectangle"
MDBoxLayout:
size_hint_y:.23
MDScrollView:
MDTextField:
id:id_uci_options
hint_text:"setoption"
text:"..."
multiline:True
mode: "rectangle"
MDRelativeLayout:
size_hint_y:.1
orientation: "horizontal"
MDRectangleFlatButton:
pos_hint:{"center_x": .15, "center_y": .5}
text: "修改"
theme_text_color: "Custom"
text_color: "orange"
on_release:app.input_engineoption_edit()
MDRectangleFlatButton:
pos_hint:{"center_x": .45, "center_y": .5}
text: "保存"
theme_text_color: "Custom"
text_color: "orange"
on_release:app.save_engine_settings()
MDRectangleFlatButton:
pos_hint:{"center_x": .75, "center_y": .5}
text: "返回"
on_release:app.back_mainScreen()