From 261f8d98e8151e0c54e85fdcf9549a629f2bb4fd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 11 Feb 2023 00:28:36 +0200 Subject: [PATCH 16/16] sdl2: Drop obsolete draw_ibutton() and draw_tibutton() See osdn #46393 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/widget_button.c | 46 --------------------------------- client/gui-sdl2/widget_button.h | 9 +++---- 2 files changed, 3 insertions(+), 52 deletions(-) diff --git a/client/gui-sdl2/widget_button.c b/client/gui-sdl2/widget_button.c index 6848ed4b36..80a76a7bcb 100644 --- a/client/gui-sdl2/widget_button.c +++ b/client/gui-sdl2/widget_button.c @@ -357,49 +357,3 @@ struct widget *create_themeicon_button(SDL_Surface *icon_theme, return button; } - -/**********************************************************************//** - Create Button image with text and Icon. Then blit to Main.screen on - position start_x, start_y. - - Text with atributes is taken from button->string_utf8 parameter. - - Graphic for button is taken from button->theme surface and blit to new - created image. - - Graphic for Icon theme is taken from button->theme2 surface and blit to - new created image. - - @return 0 on success, 1 when there is no icon nor text, - or negative SDL error -**************************************************************************/ -int draw_tibutton(struct widget *button, Sint16 start_x, Sint16 start_y) -{ - button->size.x = start_x; - button->size.y = start_y; - - return redraw_tibutton(button); -} - -/**********************************************************************//** - Create Button image with text and Icon. - Then blit to Main.screen on position start_x, start_y. - - Text with atributes is taken from button->string_utf8 parameter. - - Graphic for button is taken from button->theme surface - and blit to new created image. - - Graphic for Icon is taken from button->theme2 surface - and blit to new created image. - - @return 0 on success, 1 when there is no icon nor text, - or negative SDL error -**************************************************************************/ -int draw_ibutton(struct widget *button, Sint16 start_x, Sint16 start_y) -{ - button->size.x = start_x; - button->size.y = start_y; - - return redraw_ibutton(button); -} diff --git a/client/gui-sdl2/widget_button.h b/client/gui-sdl2/widget_button.h index 0710996e9a..8d23c8d027 100644 --- a/client/gui-sdl2/widget_button.h +++ b/client/gui-sdl2/widget_button.h @@ -15,13 +15,13 @@ #define FC__WIDGET_BUTTON_H #define create_icon_button_from_chars(icon, pdest, char_string, ptsize, flags) \ - create_icon_button(icon, pdest, \ - create_utf8_from_char(char_string, ptsize), \ + create_icon_button(icon, pdest, \ + create_utf8_from_char(char_string, ptsize), \ flags) #define create_themeicon_button_from_chars(icon_theme, pdest, char_string, ptsize, flags) \ create_themeicon_button(icon_theme, pdest, \ - create_utf8_from_char(char_string, \ + create_utf8_from_char(char_string, \ ptsize), \ flags) @@ -33,7 +33,4 @@ struct widget *create_themeicon_button(SDL_Surface *icon_theme, struct gui_layer *pdest, utf8_str *pstr, Uint32 flags); -int draw_tibutton(struct widget *button, Sint16 start_x, Sint16 start_y); -int draw_ibutton(struct widget *button, Sint16 start_x, Sint16 start_y); - #endif /* FC__WIDGET_BUTTON_H */ -- 2.39.1