@@ -222,15 +222,24 @@ public Keyboard(Context context, String name) {
222
222
continue ; // 縮進
223
223
}
224
224
225
+ final int defaultKeyTextOffsetX = YamlUtils .INSTANCE .getPixel (m , "key_text_offset_x" , 0 );
226
+ final int defaultKeyTextOffsetY = YamlUtils .INSTANCE .getPixel (m , "key_text_offset_y" , 0 );
227
+ final int defaultKeySymbolOffsetX = YamlUtils .INSTANCE .getPixel (m , "key_symbol_offset_x" , 0 );
228
+ final int defaultKeySymbolOffsetY = YamlUtils .INSTANCE .getPixel (m , "key_symbol_offset_y" , 0 );
229
+ final int defaultKeyHintOffsetX = YamlUtils .INSTANCE .getPixel (m , "key_hint_offset_x" , 0 );
230
+ final int defaultKeyHintOffsetY = YamlUtils .INSTANCE .getPixel (m , "key_hint_offset_y" , 0 );
231
+ final int defaultKeyPressOffsetX = YamlUtils .INSTANCE .getInt (m , "key_press_offset_x" , 0 );
232
+ final int defaultKeyPressOffsetY = YamlUtils .INSTANCE .getInt (m , "key_press_offset_y" , 0 );
233
+
225
234
final Key key = new Key (context , this , mk );
226
- key .setKey_text_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_text_offset_x" , 0 ));
227
- key .setKey_text_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_text_offset_y" , 0 ));
228
- key .setKey_symbol_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_symbol_offset_x" , 0 ));
229
- key .setKey_symbol_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_symbol_offset_y" , 0 ));
230
- key .setKey_hint_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_hint_offset_x" , 0 ));
231
- key .setKey_hint_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_hint_offset_y" , 0 ));
232
- key .setKey_press_offset_x (YamlUtils .INSTANCE .getInt (mk , "key_press_offset_x" , 2 ));
233
- key .setKey_press_offset_y (YamlUtils .INSTANCE .getInt (mk , "key_press_offset_y" , 2 ));
235
+ key .setKey_text_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_text_offset_x" , defaultKeyTextOffsetX ));
236
+ key .setKey_text_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_text_offset_y" , defaultKeyTextOffsetY ));
237
+ key .setKey_symbol_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_symbol_offset_x" , defaultKeySymbolOffsetX ));
238
+ key .setKey_symbol_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_symbol_offset_y" , defaultKeySymbolOffsetY ));
239
+ key .setKey_hint_offset_x (YamlUtils .INSTANCE .getPixel (mk , "key_hint_offset_x" , defaultKeyHintOffsetX ));
240
+ key .setKey_hint_offset_y (YamlUtils .INSTANCE .getPixel (mk , "key_hint_offset_y" , defaultKeyHintOffsetY ));
241
+ key .setKey_press_offset_x (YamlUtils .INSTANCE .getInt (mk , "key_press_offset_x" , defaultKeyPressOffsetX ));
242
+ key .setKey_press_offset_y (YamlUtils .INSTANCE .getInt (mk , "key_press_offset_y" , defaultKeyPressOffsetY ));
234
243
235
244
key .setX (x );
236
245
key .setY (y );
0 commit comments