From 89b8ce67be176c6222860ec2e6abe4cf78c4da81 Mon Sep 17 00:00:00 2001 From: fendrin Date: Thu, 28 Mar 2013 00:27:26 +0100 Subject: [PATCH] Render the palette scroll buttons inactive when appropriate. --- src/editor/palette/editor_palettes.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/editor/palette/editor_palettes.cpp b/src/editor/palette/editor_palettes.cpp index 8b8f4fc7d3f..667be26227e 100644 --- a/src/editor/palette/editor_palettes.cpp +++ b/src/editor/palette/editor_palettes.cpp @@ -255,6 +255,12 @@ void editor_palette::draw(bool) if(ending > num_items() ){ ending = num_items(); } + + gui::button* upscroll_button = gui_.find_button("upscroll-button-editor"); + upscroll_button->enable(starting != 0); + gui::button* downscroll_button = gui_.find_button("downscroll-button-editor"); + downscroll_button->enable(ending != num_items()); + for(unsigned int counter = starting; counter < ending; counter++){ const int counter_from_zero = counter - starting;