mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2025-02-16 20:39:15 +01:00
Move some initing to widget
This commit is contained in:
parent
24568dc5ed
commit
b3fffe82d9
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
OBJS=menu.oo main.oo utils.oo gui.oo dialogue_box.oo menu_messages.oo \
|
||||
timer.oo game_info.oo
|
||||
timer.oo game_info.oo widget.oo
|
||||
|
||||
all: menu
|
||||
|
||||
@ -8,6 +8,8 @@ all: menu
|
||||
|
||||
menu.oo: menu.cpp menu.hh utils.hh font.hh widget.hh Makefile
|
||||
|
||||
widget.oo: widget.cpp widget.hh
|
||||
|
||||
gui.oo: gui.cpp gui.hh Makefile font.hh menu.hh sdl_ttf_font.hh \
|
||||
dialogue_box.hh help_box.hh main_menu.cpp disc_menu.cpp \
|
||||
file_browser.hh timer.hh game_info.hh
|
||||
|
5
menu.cpp
5
menu.cpp
@ -371,7 +371,7 @@ void Menu::setText(const char **messages, int *submenu_defaults)
|
||||
this->selectOne(0);
|
||||
}
|
||||
|
||||
Menu::Menu(Font *font)
|
||||
Menu::Menu(Font *font) : Widget()
|
||||
{
|
||||
this->setTextColor((SDL_Color){0xff,0xff,0xff,0});
|
||||
this->font = font;
|
||||
@ -391,9 +391,6 @@ Menu::Menu(Font *font)
|
||||
this->cur_sel = 0;
|
||||
this->mouse_x = -1;
|
||||
this->mouse_y = -1;
|
||||
|
||||
memset(this->event_stack, 0, sizeof(this->event_stack));
|
||||
this->ev_head = this->ev_tail = 0;
|
||||
}
|
||||
|
||||
void Menu::setTextColor(SDL_Color clr)
|
||||
|
@ -1,5 +1,11 @@
|
||||
#include "widget.hh"
|
||||
|
||||
Widget::Widget()
|
||||
{
|
||||
memset(this->event_stack, 0, sizeof(this->event_stack));
|
||||
this->ev_head = this->ev_tail = 0;
|
||||
}
|
||||
|
||||
event_t Widget::popEvent()
|
||||
{
|
||||
event_t out;
|
||||
|
Loading…
x
Reference in New Issue
Block a user