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/worldview.cc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'src/client/worldview.cc') diff --git a/src/client/worldview.cc b/src/client/worldview.cc index 7f13f45..c4f932b 100644 --- a/src/client/worldview.cc +++ b/src/client/worldview.cc @@ -1,7 +1,7 @@ /* client/worldview.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 "core/application.h" @@ -10,7 +10,8 @@ #include "client/video.h" #include "ui/ui.h" -namespace client { +namespace client +{ WorldView::WorldView(ui::Widget *parent) : ui::Widget(parent) { @@ -55,29 +56,29 @@ void WorldView::resize() // reposition devinfo widget view_devinfo->set_size(font()->width()*32, font()->height()*5); view_devinfo->set_location(smallmargin, smallmargin); - + // reposition stats widget - view_statsinfo->set_size(font()->width()*12, font()->height()*5); + view_statsinfo->set_size(font()->width()*12, font()->height()*5); view_statsinfo->set_location(width() - view_statsinfo->width() - smallmargin, smallmargin); // reposition keypress widget - view_keyinfo->set_size(font()->width()*12, font()->height()*1); + view_keyinfo->set_size(font()->width()*12, font()->height()*1); view_keyinfo->set_location(width() - view_keyinfo->width() - smallmargin, - height() - view_keyinfo->height() - smallmargin); + height() - view_keyinfo->height() - smallmargin); // icons const float icon_margin = 4.0f; const float icon_size = 48.0f; const float icon_count = 6; - const float l = (width() -((icon_count +1) * icon_margin) - (icon_count * icon_size)) * 0.5f; - + const float l = (width() - ((icon_count + 1) * icon_margin) - (icon_count * icon_size)) * 0.5f; + view_menubutton->set_geometry(l, icon_margin, icon_size, icon_size); // spacer - view_dockbutton->set_geometry( l + 2.0f * (icon_margin + icon_size), icon_margin, icon_size, icon_size); - view_launchbutton->set_geometry( l + 2.0f * (icon_margin + icon_size), icon_margin, icon_size, icon_size); + view_dockbutton->set_geometry(l + 2.0f *(icon_margin + icon_size), icon_margin, icon_size, icon_size); + view_launchbutton->set_geometry(l + 2.0f *(icon_margin + icon_size), icon_margin, icon_size, icon_size); // spacer - view_chatbutton->set_geometry( l + 4.0f * (icon_margin + icon_size), icon_margin, icon_size, icon_size); - view_mapbutton->set_geometry( l + 5.0f * (icon_margin + icon_size), icon_margin, icon_size, icon_size); + view_chatbutton->set_geometry(l + 4.0f *(icon_margin + icon_size), icon_margin, icon_size, icon_size); + view_mapbutton->set_geometry(l + 5.0f *(icon_margin + icon_size), icon_margin, icon_size, icon_size); } void WorldView::clear() @@ -98,8 +99,8 @@ void WorldView::draw() view_devinfo->set_visible(draw_devinfo->value() ? true : false); view_statsinfo->set_visible(draw_stats->value() ? true : false); view_keyinfo->set_visible(draw_keypress->value() ? true : false); - - if (ui::root()->active() || !core::game()->interactive() || !core::localcontrol() || (core::localplayer()->view() && !core::localplayer()->view()->menus().size()) ) { + + if (ui::root()->active() || !core::game()->interactive() || !core::localcontrol() || (core::localplayer()->view() && !core::localplayer()->view()->menus().size())) { view_playerview->hide(); view_menubutton->hide(); view_dockbutton->hide(); -- cgit v1.2.3