public void init(SimGroup qualityGroup) { // Clear the existing content first. this.clear(); // Fill it. int select = -1; for (uint i = 0; i < qualityGroup.getCount(); i++) { GraphicsQualityLevel level = qualityGroup.getObject(i); if (level.isCurrent()) { select = (int)i; } this.add(level.getInternalName(), (int)i); } // Setup a default selection. if (select == -1) { this.setText("Custom"); } else { this.setSelected(select); } //this.setText(select.AsString()); }
public bool apply(SimGroup qualityGroup, bool testNeedApply) { string quality = getText(); int index = findText(quality); if (index == -1) { return(false); } GraphicsQualityLevel level = qualityGroup.getObject((uint)index); if (level.isObject() && !level.isCurrent()) { if (testNeedApply) { return(true); } level.apply(); } return(false); }
/// <summary> /// Set Quality of Graphics /// </summary> /// <param name="quality"></param> /// <returns></returns> public static bool SetGraphicsQuality(GraphicsQualityLevel quality) { return(true); }