public int CompareTo(object obj) { GraphicsResolution resolution = obj as GraphicsResolution; if (resolution == null) { return(1); } if (this.x < resolution.x) { return(-1); } if (this.x > resolution.x) { return(1); } if (this.y < resolution.y) { return(-1); } if (this.y > resolution.y) { return(1); } return(0); }
private GraphicsResolution GetCurrentGraphicsResolution() { int @int = Options.Get().GetInt(Option.GFX_WIDTH, Screen.currentResolution.width); int height = Options.Get().GetInt(Option.GFX_HEIGHT, Screen.currentResolution.height); return(GraphicsResolution.create(@int, height)); }
private static bool add(int width, int height) { GraphicsResolution item = new GraphicsResolution(width, height); if (resolutions_.BinarySearch(item) >= 0) { return(false); } resolutions_.Add(item); resolutions_.Sort(); return(true); }
public override bool Equals(object obj) { if (obj == null) { return(false); } GraphicsResolution resolution = obj as GraphicsResolution; if (resolution == null) { return(false); } return((this.x == resolution.x) && (this.y == resolution.y)); }
private string OnGraphicsResolutionDropdownText(object val) { GraphicsResolution resolution = (GraphicsResolution)val; return(string.Format("{0} x {1}", resolution.x, resolution.y)); }