Commit 68c6d88f authored by fallenstardust's avatar fallenstardust

重做卡片归属显示文本

parent e43db7f5
...@@ -45,6 +45,7 @@ import ocgcore.ConfigManager; ...@@ -45,6 +45,7 @@ import ocgcore.ConfigManager;
import ocgcore.DataManager; import ocgcore.DataManager;
import ocgcore.StringManager; import ocgcore.StringManager;
import ocgcore.data.Card; import ocgcore.data.Card;
import ocgcore.enums.CardOt;
import ocgcore.enums.CardType; import ocgcore.enums.CardType;
import static cn.garymb.ygomobile.core.IrrlichtBridge.ACTION_SHARE_FILE; import static cn.garymb.ygomobile.core.IrrlichtBridge.ACTION_SHARE_FILE;
...@@ -285,6 +286,22 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -285,6 +286,22 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
return mCardInfo; return mCardInfo;
} }
public String getOTSString(int ot) {
String str = "";
if (ot == CardOt.OCG.ordinal()) {
str = mContext.getString(R.string.label_ot_OCG);
} else if (ot == CardOt.TCG.ordinal()) {
str = mContext.getString(R.string.label_ot_TCG);
} else if (ot == 8) {
str = mContext.getString(R.string.label_ot_SC_OCG);
} else if (ot == CardOt.CUSTOM.ordinal()) {
str = mContext.getString(R.string.label_ot_CUSTOM);
} else {
str = "OCG/TCG";
}
return str;
}
private void setCardInfo(Card cardInfo, View view) { private void setCardInfo(Card cardInfo, View view) {
if (cardInfo == null) return; if (cardInfo == null) return;
...@@ -312,7 +329,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -312,7 +329,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
type.setText(CardUtils.getAllTypeString(cardInfo, mStringManager).replace("/", "|")); type.setText(CardUtils.getAllTypeString(cardInfo, mStringManager).replace("/", "|"));
attrView.setText(mStringManager.getAttributeString(cardInfo.Attribute)); attrView.setText(mStringManager.getAttributeString(cardInfo.Attribute));
otView.setText(mStringManager.getOtString(cardInfo.Ot, "" + cardInfo.Ot)); otView.setText(getOTSString(cardInfo.Ot));
//otView.setText(mStringManager.getOtString(cardInfo.Ot, "" + cardInfo.Ot));//暂时弃用
long[] sets = cardInfo.getSetCode(); long[] sets = cardInfo.getSetCode();
setname.setText(""); setname.setText("");
int index = 0; int index = 0;
......
package ocgcore.enums; package ocgcore.enums;
public enum CardOt { public enum CardOt {
All,
OCG, OCG,
TCG, TCG,
SC_OCG, SC_OCG,
CUSTOM, CUSTOM,
No_Exclusive, OCG_TCG
All
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment