65 lines
2.1 KiB
Java
65 lines
2.1 KiB
Java
package com.ubt.jimu.controller.data.widget;
|
|
|
|
import android.content.Context;
|
|
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
|
import com.thoughtworks.xstream.annotations.XStreamOmitField;
|
|
import com.ubt.jimu.R;
|
|
import com.ubt.jimu.controller.data.config.JockstickConfig;
|
|
|
|
@XStreamConverter(priority = 9999, value = JockstickDataConverter.class)
|
|
/* loaded from: classes.dex */
|
|
public class JockstickData extends MoveBaseData<JockstickConfig> {
|
|
|
|
@XStreamOmitField
|
|
private JockstickConfig config;
|
|
|
|
public JockstickData() {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public String getShowName(Context context) {
|
|
String string = context.getResources().getString(R.string.control_two_engine);
|
|
if (getConfig().getType() == JockstickConfig.JockType.fourServo) {
|
|
string = context.getResources().getString(R.string.control_four_engine);
|
|
}
|
|
if (getConfig().getType() == JockstickConfig.JockType.sixServo) {
|
|
string = context.getResources().getString(R.string.control_six_engine);
|
|
}
|
|
int index = getConfig().getIndex();
|
|
if (index <= 1) {
|
|
return string;
|
|
}
|
|
return string + index;
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.ItemBaseData
|
|
public String getWidgetInfo(Context context) {
|
|
return getShowName(context);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.ItemBaseData
|
|
public String toString() {
|
|
return super.toString() + " " + getConfig().toString();
|
|
}
|
|
|
|
public JockstickData(String str) {
|
|
super(str);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public JockstickConfig getConfig() {
|
|
return this.config;
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public void setConfig(JockstickConfig jockstickConfig) {
|
|
super.setConfig((JockstickData) jockstickConfig);
|
|
this.config = jockstickConfig;
|
|
}
|
|
|
|
public JockstickData(String str, float f, float f2) {
|
|
super(str, f, f2);
|
|
}
|
|
}
|