From b492615fb68e5c97fce87bcc946e92f115cfc3a2 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 30 Jul 2011 13:36:45 +0000 Subject: Added support for tiled ui materials, changed default widget backgrounds to use ui materials. --- src/client/inventorywindow.cc | 4 ++-- src/client/trademenu.cc | 20 ++++++++++---------- src/client/trademenu.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/client') diff --git a/src/client/inventorywindow.cc b/src/client/inventorywindow.cc index 6698565..396c449 100644 --- a/src/client/inventorywindow.cc +++ b/src/client/inventorywindow.cc @@ -49,8 +49,8 @@ InventoryWindow::InventoryWindow(ui::Widget *parent) : ui::Window(parent) inventorywindow_listview = new ui::ListView(this); inventorywindow_listview->set_label("listview"); - inventorywindow_listview->set_background(false); - inventorywindow_listview->set_border(true); + //inventorywindow_listview->set_background(true); + //inventorywindow_listview->set_border(true); inventorywindow_inventorytext = new ui::PlainText(this); inventorywindow_inventorytext->set_label("inventorytext"); diff --git a/src/client/trademenu.cc b/src/client/trademenu.cc index f4a5653..20117c7 100644 --- a/src/client/trademenu.cc +++ b/src/client/trademenu.cc @@ -26,7 +26,7 @@ TradeMenu::TradeMenu(ui::Widget *parent, const char * label) : ui::Window(parent else set_label("trademenu"); - menu_tradewindow = new ui::Widget(this); + menu_tradewindow = new ui::Window(this); menu_tradewindow->set_label("tradewindow"); menu_tradewindow->set_border(true); menu_tradewindow->set_background(true); @@ -37,8 +37,8 @@ TradeMenu::TradeMenu(ui::Widget *parent, const char * label) : ui::Window(parent menu_modelview->set_border(false); menu_slider = new ui::Slider(menu_tradewindow); - menu_slider->set_background(false); - menu_slider->set_border(true); + //menu_slider->set_background(false); + //menu_slider->set_border(true); menu_msgtext = new ui::Label(menu_tradewindow); menu_msgtext->set_label("label"); @@ -56,8 +56,8 @@ TradeMenu::TradeMenu(ui::Widget *parent, const char * label) : ui::Window(parent menu_inventorylistview = new InventoryListView(menu_tradewindow); menu_inventorylistview->set_label("inventorylistview"); - menu_inventorylistview->set_background(false); - menu_inventorylistview->set_border(true); + //menu_inventorylistview->set_background(false); + //menu_inventorylistview->set_border(true); menu_inventorytext = new ui::PlainText(menu_tradewindow); menu_inventorytext->set_label("inventorytext"); @@ -72,8 +72,8 @@ TradeMenu::TradeMenu(ui::Widget *parent, const char * label) : ui::Window(parent menu_traderlistview = new InventoryListView(menu_tradewindow); menu_traderlistview->set_label("traderlistview"); - menu_traderlistview->set_background(false); - menu_traderlistview->set_border(true); + //menu_traderlistview->set_background(false); + //menu_traderlistview->set_border(true); menu_traderlistview->set_showempty(true); menu_tradertext = new ui::PlainText(menu_tradewindow); @@ -341,7 +341,7 @@ bool TradeMenu::on_emit(Widget *sender, const Event event, void *data) return true; } - return ui::Widget::on_emit(sender, event, data); + return ui::Window::on_emit(sender, event, data); } void TradeMenu::draw() @@ -369,7 +369,7 @@ void TradeMenu::draw() } menu_inventorytext->set_text(str.str()); - Widget::draw(); + Window::draw(); } bool TradeMenu::on_keypress(const int key, const unsigned int modifier) @@ -385,7 +385,7 @@ bool TradeMenu::on_keypress(const int key, const unsigned int modifier) break; } - return Widget::on_keypress(key, modifier); + return Window::on_keypress(key, modifier); } } // namespace client diff --git a/src/client/trademenu.h b/src/client/trademenu.h index c882287..61609e2 100644 --- a/src/client/trademenu.h +++ b/src/client/trademenu.h @@ -49,7 +49,7 @@ protected: private: void set_item(ui::ListItem *item); - ui::Widget *menu_tradewindow; + ui::Window *menu_tradewindow; ui::Label *menu_namelabel; ui::PlainText *menu_inventorytext; ui::PlainText *menu_tradertext; -- cgit v1.2.3