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