From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/client/playerview.cc | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/client/playerview.cc') diff --git a/src/client/playerview.cc b/src/client/playerview.cc index 889e4d4..7ec8031 100644 --- a/src/client/playerview.cc +++ b/src/client/playerview.cc @@ -1,7 +1,7 @@ /* client/playerview.cc - This file is part of the Osirion project and is distributed under - the terms and conditions of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 */ #include @@ -11,7 +11,8 @@ #include "client/playerview.h" #include "ui/ui.h" -namespace client { +namespace client +{ PlayerView::PlayerView(ui::Widget *parent) : ui::Widget(parent) { @@ -60,9 +61,9 @@ void PlayerView::event_text(const std::string & text) void PlayerView::toggle_map() { - + if (!map()->visible()) { - if(chat()->visible() && !chat()->small_view()) + if (chat()->visible() && !chat()->small_view()) chat()->hide(); if (view_entitymenu->visible()) @@ -80,9 +81,9 @@ void PlayerView::toggle_map() void PlayerView::toggle_chat() { if (!chat()->visible()) { - if(map()->visible()) + if (map()->visible()) map()->hide(); - + if (view_entitymenu->visible()) view_entitymenu->hide(); } @@ -132,7 +133,7 @@ void PlayerView::show_menu(const std::string & args) } else if (label.compare("hide") == 0) { view_buymenu->hide(); view_entitymenu->hide(); - + } else { view_entitymenu->generate(core::localplayer()->view(), label.c_str()); view_entitymenu->show(); @@ -154,7 +155,7 @@ void PlayerView::resize() view_buymenu->event_resize(); // set hud geometry - view_hud->set_geometry(0,0, width(), height()); + view_hud->set_geometry(0, 0, width(), height()); view_hud->event_resize(); // reposition map @@ -167,7 +168,7 @@ void PlayerView::resize() // reposition labels //label_viewname->set_size(ui::UI::elementsize.width() * 1.5f, ui::UI::elementsize.height()); //label_viewname->set_location(smallmargin, smallmargin * 0.5f); - + label_viewname->set_size(ui::UI::elementsize.width() * 1.5f, ui::UI::elementsize.height()); label_viewname->set_location(width() - label_viewname->width() - smallmargin, height() - label_viewname->height() - smallmargin * 0.5f); } @@ -185,10 +186,10 @@ void PlayerView::draw() if (core::localplayer()->view()->menus().size()) { // entity with menus - + if (map()->visible()) { label_viewname->set_text(core::localplayer()->zone()->name()); - } else { + } else { label_viewname->set_text(core::localplayer()->view()->name()); } @@ -200,9 +201,9 @@ void PlayerView::draw() map()->hide(); chat()->hide(); audio::play("ui/menu"); - - } else if (!view_entitymenu->visible() && !view_buymenu->visible() && - !map()->visible() && (!chat()->visible() || chat()->small_view()) ) { + + } else if (!view_entitymenu->visible() && !view_buymenu->visible() && + !map()->visible() && (!chat()->visible() || chat()->small_view())) { // show the menu if there's no other window open view_entitymenu->show(); @@ -226,7 +227,7 @@ void PlayerView::draw() } if (view_entitymenu->generated_entity()) { - view_entitymenu->generate(0,0); + view_entitymenu->generate(0, 0); } if (view_buymenu->visible()) { @@ -247,7 +248,7 @@ void PlayerView::draw() view_hud->show(); } - // reposition chat widget + // reposition chat widget if (view_chat->small_view()) { view_chat->set_size(width() - smallmargin * 2, font()->height() * 2); view_chat->set_location(smallmargin, height() - smallmargin *2 - view_chat->height()); -- cgit v1.2.3