1076 {
1078
1079 widget =
m_Root.FindAnyWidget(itemWidget);
1080
1081 if (enabled)
1082 {
1083 ProgressBarWidget progressBar;
1084 TextWidget textWidget;
1085 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
1086 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
1087
1088
1089 switch (type)
1090 {
1092 progressBar.Show(false);
1093 textWidget.Show(false);
1094 textWidget.GetParent().Show(false);
1095 break;
1097 if (max > 1 || current > 1)
1098 {
1099 string qty_text = string.Format("%1/%2", Math.Round(current).ToString(), max.ToString());
1100 progressBar.Show(false);
1101 textWidget.SetText(qty_text);
1102 textWidget.Show(true);
1103 textWidget.GetParent().Show(true);
1104 }
1105 else
1106 {
1107 progressBar.Show(false);
1108 textWidget.Show(false);
1109 textWidget.GetParent().Show(false);
1110 }
1111 break;
1113 float qty_num = Math.Round((current / max) * 100);
1114
1115 textWidget.Show(false);
1116 progressBar.SetCurrent(qty_num);
1117 progressBar.Show(true);
1118 textWidget.GetParent().Show(true);
1119 break;
1120 }
1121 widget.Show(true);
1122 }
1123 else
1124 widget.Show(false);
const int QUANTITY_PROGRESS
const int QUANTITY_HIDDEN