protected override void RenderInternal(int x, int y, int width, Terminal terminal) { int remaining_width = width - GetText().Length; int half_remaining_width1 = remaining_width / 2; int half_remaining_width2 = remaining_width - half_remaining_width1; terminal.Raster(x, y, width, padding.Repeat(half_remaining_width1) + GetText() + padding.Repeat(half_remaining_width2)); }
public void Render() { if (terminal != null) { if (refresh_timer.Repeat()) { terminal.Raster(x, y, width, " ".Repeat(width)); RenderInternal(x, y, width, terminal); } } }
protected override void RenderInternal(int x, int y, int width, Terminal terminal) { int percent = (int)(GetProgress() * 100); string bar = ""; if (bar_width > 0) { bar = Strings.Gauge(GetProgress(), bar_width, "[", "]", '=', ' '); } terminal.Raster(x, y, width, bar + "(" + percent + "% " + GetRemainingTime() + ")"); }
protected override void RenderInternal(int x, int y, int width, Terminal terminal) { terminal.Raster(x, y, width, Strings.Gauge(lower_value, upper_value, value, bar_width, "[", "]", '=', ' ')); }
protected override void RenderInternal(int x, int y, int width, Terminal terminal) { terminal.Raster(x, y, width, text); }