From: <geo...@us...> - 2007-01-31 04:34:50
|
Revision: 2001 http://svn.sourceforge.net/freeorion/revision/?rev=2001&view=rev Author: geoffthemedio Date: 2007-01-30 20:34:49 -0800 (Tue, 30 Jan 2007) Log Message: ----------- -Changed danish and german stringtables to be consistent with english lack of "the" and "system" around system names on SidePanel -Changed ProductionWnd into a GG::Wnd instead of a CUIWnd --Moved SidePanel on ProductionWnd so it appears in the same location as the MapWnd SidePanel, in particular so that its scrollbar is at the far right edge of the screen, increasing usability -Simplified how PlanetPanels on SidePanel display or hide contents depending on status of planets -Slightly lightened colour of bar showing meter current values on info panels -Moved dark background of SidePanel to be flush with left edge of contained PlanetPanels, rather than having a large empty dark space in line with right half of planet images. This will likely be changed further in future. Modified Paths: -------------- trunk/FreeOrion/UI/BuildDesignatorWnd.cpp trunk/FreeOrion/UI/InfoPanels.cpp trunk/FreeOrion/UI/MapWnd.cpp trunk/FreeOrion/UI/ProductionWnd.cpp trunk/FreeOrion/UI/ProductionWnd.h trunk/FreeOrion/UI/SidePanel.cpp trunk/FreeOrion/default/den_stringtable.txt trunk/FreeOrion/default/ger_stringtable.txt Modified: trunk/FreeOrion/UI/BuildDesignatorWnd.cpp =================================================================== --- trunk/FreeOrion/UI/BuildDesignatorWnd.cpp 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/BuildDesignatorWnd.cpp 2007-01-31 04:34:49 UTC (rev 2001) @@ -630,14 +630,13 @@ Wnd(0, 0, w, h, GG::CLICKABLE), m_build_location(UniverseObject::INVALID_OBJECT_ID) { - const int SIDE_PANEL_PLANET_RADIUS = SidePanel::MAX_PLANET_DIAMETER / 2; - int CHILD_WIDTHS = w - MapWnd::SIDE_PANEL_WIDTH - SIDE_PANEL_PLANET_RADIUS; + int CHILD_WIDTHS = w - MapWnd::SIDE_PANEL_WIDTH; const int DETAIL_PANEL_HEIGHT = TechTreeWnd::NAVIGATOR_AND_DETAIL_HEIGHT; const int BUILD_SELECTOR_HEIGHT = DETAIL_PANEL_HEIGHT; m_build_detail_panel = new BuildDetailPanel(CHILD_WIDTHS, DETAIL_PANEL_HEIGHT); m_build_selector = new BuildSelector(CHILD_WIDTHS, BUILD_SELECTOR_HEIGHT); m_build_selector->MoveTo(GG::Pt(0, h - BUILD_SELECTOR_HEIGHT)); - m_side_panel = new SidePanel(CHILD_WIDTHS + SIDE_PANEL_PLANET_RADIUS, 0, MapWnd::SIDE_PANEL_WIDTH, h); + m_side_panel = new SidePanel(Width() - MapWnd::SIDE_PANEL_WIDTH, 0, MapWnd::SIDE_PANEL_WIDTH, GG::GUI::GetGUI()->AppHeight()); m_side_panel->Hide(); GG::Connect(m_build_detail_panel->RequestBuildItemSignal, &BuildDesignatorWnd::BuildItemRequested, this); @@ -647,7 +646,7 @@ GG::Connect(m_side_panel->PlanetSelectedSignal, &BuildDesignatorWnd::SelectPlanet, this); GG::Connect(m_side_panel->SystemSelectedSignal, SystemSelectedSignal); - m_map_view_hole = GG::Rect(0, 0, CHILD_WIDTHS + SIDE_PANEL_PLANET_RADIUS, h); + m_map_view_hole = GG::Rect(0, 0, CHILD_WIDTHS + SidePanel::MAX_PLANET_DIAMETER, h); AttachChild(m_build_detail_panel); AttachChild(m_build_selector); Modified: trunk/FreeOrion/UI/InfoPanels.cpp =================================================================== --- trunk/FreeOrion/UI/InfoPanels.cpp 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/InfoPanels.cpp 2007-01-31 04:34:49 UTC (rev 2001) @@ -21,12 +21,6 @@ using boost::lexical_cast; -namespace { - GG::Clr METER_STATUS_BAR_COLOR(193, 193, 193, 255); - GG::Clr METER_STATUS_BAR_GROWTH_COLOR(151, 151, 151, 200); - GG::Clr METER_STATUS_BAR_SHRINK_COLOR(255, 0, 0, 255); -} - ///////////////////////////////////// // PopulationPanel // ///////////////////////////////////// @@ -355,7 +349,7 @@ AttachChild(m_primary_focus_drop); m_secondary_focus_drop = new CUIDropDownList(m_primary_focus_drop->LowerRight().x + icon_size/2, 0, - icon_size*6, icon_size*3/2, icon_size*12); + icon_size*4, icon_size*3/2, icon_size*12); texture = ClientUI::GetTexture(ClientUI::ArtDir() / "icons" / "balanced.png"); graphic = new GG::StaticGraphic(0, 0, icon_size, icon_size, texture, GG::GR_FITGRAPHIC); @@ -890,7 +884,7 @@ void MeterStatusBar2::Render() { // colours from eleazar's forum post - GG::Clr light_grey_bar(166, 166, 166, 255); // A6A6A6 100% + GG::Clr light_grey_bar(193, 193, 193, 255); // lighter than A6A6A6 100% GG::Clr red_bar(144, 38, 21, 255); // 902615 100% GG::Clr max_grey_bar(90, 90, 90, 255); // 5A5A5A 60% GG::Clr green_change(164, 244, 84, 255); // A4F454 60% Modified: trunk/FreeOrion/UI/MapWnd.cpp =================================================================== --- trunk/FreeOrion/UI/MapWnd.cpp 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/MapWnd.cpp 2007-01-31 04:34:49 UTC (rev 2001) @@ -146,7 +146,7 @@ const int MapWnd::NUM_BACKGROUNDS = 3; double MapWnd::s_min_scale_factor = 0.35; double MapWnd::s_max_scale_factor = 8.0; -const int MapWnd::SIDE_PANEL_WIDTH = 300; +const int MapWnd::SIDE_PANEL_WIDTH = 360; int MapWnd::s_nebula_size = 192; MapWnd::MapWnd() : Modified: trunk/FreeOrion/UI/ProductionWnd.cpp =================================================================== --- trunk/FreeOrion/UI/ProductionWnd.cpp 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/ProductionWnd.cpp 2007-01-31 04:34:49 UTC (rev 2001) @@ -216,7 +216,7 @@ // ProductionWnd // ////////////////////////////////////////////////// ProductionWnd::ProductionWnd(int w, int h) : -CUIWnd(UserString("PRODUCTION_WND_TITLE"), 0, 0, w, h, GG::ONTOP), + GG::Wnd(0, 0, w, h, GG::ONTOP), m_production_info_panel(0), m_queue_lb(0), m_build_designator_wnd(0) @@ -225,10 +225,12 @@ OUTER_LINE_THICKNESS, ClientUI::KnownTechFillColor(), ClientUI::KnownTechTextAndBorderColor()); m_queue_lb = new QueueListBox(2, m_production_info_panel->LowerRight().y, m_production_info_panel->Width() - 4, ClientSize().y - 4 - m_production_info_panel->Height(), this); m_queue_lb->SetStyle(GG::LB_NOSORT | GG::LB_NOSEL | GG::LB_USERDELETE); - GG::Pt buid_designator_wnd_size = ClientSize() - GG::Pt(m_production_info_panel->Width() + 6, 6); + GG::Pt buid_designator_wnd_size = ClientSize() - GG::Pt(m_production_info_panel->Width(), 6); m_build_designator_wnd = new BuildDesignatorWnd(buid_designator_wnd_size.x, buid_designator_wnd_size.y); - m_build_designator_wnd->MoveTo(GG::Pt(m_production_info_panel->Width() + 3, 3)); + m_build_designator_wnd->MoveTo(GG::Pt(m_production_info_panel->Width(), 0)); + EnableChildClipping(true); + GG::Connect(m_build_designator_wnd->AddBuildToQueueSignal, &ProductionWnd::AddBuildToQueueSlot, this); GG::Connect(m_build_designator_wnd->BuildQuantityChangedSignal, &ProductionWnd::ChangeBuildQuantitySlot, this); GG::Connect(m_build_designator_wnd->SystemSelectedSignal, SystemSelectedSignal); @@ -241,26 +243,18 @@ AttachChild(m_build_designator_wnd); } -GG::Pt ProductionWnd::ClientUpperLeft() const -{ - return UpperLeft() + GG::Pt(LeftBorder(), TopBorder()); -} -GG::Pt ProductionWnd::ClientLowerRight() const -{ - return LowerRight() - GG::Pt(RightBorder(), BottomBorder()); -} bool ProductionWnd::InWindow(const GG::Pt& pt) const { GG::Rect clip_rect = m_build_designator_wnd->MapViewHole() + m_build_designator_wnd->UpperLeft(); - return clip_rect.Contains(pt) ? m_build_designator_wnd->InWindow(pt) : CUIWnd::InWindow(pt); + return clip_rect.Contains(pt) ? m_build_designator_wnd->InWindow(pt) : GG::Wnd::InWindow(pt); } bool ProductionWnd::InClient(const GG::Pt& pt) const { GG::Rect clip_rect = m_build_designator_wnd->MapViewHole() + m_build_designator_wnd->UpperLeft(); - return clip_rect.Contains(pt) ? m_build_designator_wnd->InClient(pt) : CUIWnd::InClient(pt); + return clip_rect.Contains(pt) ? m_build_designator_wnd->InClient(pt) : GG::Wnd::InClient(pt); } void ProductionWnd::Render() @@ -268,8 +262,6 @@ GG::Rect clip_rect = m_build_designator_wnd->MapViewHole() + m_build_designator_wnd->UpperLeft(); GG::Pt ul = UpperLeft(); GG::Pt lr = LowerRight(); - GG::Pt cl_ul = ul + GG::Pt(BORDER_LEFT, BORDER_TOP); - GG::Pt cl_lr = lr - GG::Pt(BORDER_RIGHT, BORDER_BOTTOM); // use GL to draw the lines glDisable(GL_TEXTURE_2D); @@ -299,55 +291,15 @@ glBegin(GL_POLYGON); glVertex2i(ul.x, clip_rect.lr.y); glVertex2i(lr.x, clip_rect.lr.y); - glVertex2i(lr.x, lr.y - OUTER_EDGE_ANGLE_OFFSET); - glVertex2i(lr.x - OUTER_EDGE_ANGLE_OFFSET, lr.y); + glVertex2i(lr.x, lr.y); glVertex2i(ul.x, lr.y); glVertex2i(ul.x, clip_rect.lr.y); glEnd(); - // draw outer border on pixel inside of the outer edge of the window - glPolygonMode(GL_BACK, GL_LINE); - glBegin(GL_POLYGON); - glColor(ClientUI::WndOuterBorderColor()); - glVertex2i(ul.x, ul.y); - glVertex2i(lr.x, ul.y); - glVertex2i(lr.x, lr.y - OUTER_EDGE_ANGLE_OFFSET); - glVertex2i(lr.x - OUTER_EDGE_ANGLE_OFFSET, lr.y); - glVertex2i(ul.x, lr.y); - glVertex2i(ul.x, ul.y); - glEnd(); - // reset this to whatever it was initially glPolygonMode(GL_BACK, initial_modes[1]); - // draw inner border, including extra resize-tab lines - glBegin(GL_LINE_STRIP); - glColor(ClientUI::WndInnerBorderColor()); - glVertex2i(cl_ul.x, cl_ul.y); - glVertex2i(cl_lr.x, cl_ul.y); - glVertex2i(cl_lr.x, cl_lr.y - INNER_BORDER_ANGLE_OFFSET); - glVertex2i(cl_lr.x - INNER_BORDER_ANGLE_OFFSET, cl_lr.y); - glVertex2i(cl_ul.x, cl_lr.y); - glVertex2i(cl_ul.x, cl_ul.y); - glEnd(); - glBegin(GL_LINES); - // draw the extra lines of the resize tab - if (m_resizable) { - glColor(ClientUI::WndInnerBorderColor()); - } else { - glColor(GG::DisabledColor(ClientUI::WndInnerBorderColor())); - } - glVertex2i(cl_lr.x, cl_lr.y - RESIZE_HASHMARK1_OFFSET); - glVertex2i(cl_lr.x - RESIZE_HASHMARK1_OFFSET, cl_lr.y); - - glVertex2i(cl_lr.x, cl_lr.y - RESIZE_HASHMARK2_OFFSET); - glVertex2i(cl_lr.x - RESIZE_HASHMARK2_OFFSET, cl_lr.y); - glEnd(); glEnable(GL_TEXTURE_2D); - - glColor(ClientUI::TextColor()); - boost::shared_ptr<GG::Font> font = GG::GUI::GetGUI()->GetFont(ClientUI::TitleFont(), ClientUI::TitlePts()); - font->RenderText(ul.x + BORDER_LEFT, ul.y, WindowText()); } void ProductionWnd::Reset() Modified: trunk/FreeOrion/UI/ProductionWnd.h =================================================================== --- trunk/FreeOrion/UI/ProductionWnd.h 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/ProductionWnd.h 2007-01-31 04:34:49 UTC (rev 2001) @@ -12,7 +12,7 @@ class BuildDesignatorWnd; /** Contains a BuildDesignatorWnd, some stats on the empire-wide production queue, and the queue itself. */ -class ProductionWnd : public CUIWnd +class ProductionWnd : public GG::Wnd { public: /** \name Structors */ //@{ @@ -24,8 +24,6 @@ //@} /** \name Mutators */ //@{ - virtual GG::Pt ClientUpperLeft() const; - virtual GG::Pt ClientLowerRight() const; virtual bool InWindow(const GG::Pt& pt) const; virtual bool InClient(const GG::Pt& pt) const; virtual void Render(); Modified: trunk/FreeOrion/UI/SidePanel.cpp =================================================================== --- trunk/FreeOrion/UI/SidePanel.cpp 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/UI/SidePanel.cpp 2007-01-31 04:34:49 UTC (rev 2001) @@ -408,17 +408,6 @@ mutable ResizedSignalType ResizedSignal; private: - /** some of the elements at planet panel are only used if a specific - planet ownership state is present, some others are only used if - additional conditions applies. If a control is being enabled, it's - moved from the list of disabled controls (m_vec_unused_controls) to - the child list of planet panel, if the control isn't found at m_vec_unused_controls - is assumed that it is already enable. after that control->Show() is called. Disabling a - control is done in reverse. - for example: colonize btn is only enable/visible if there is a colony ship in orbit - and the planet is unowned and inhabitable*/ - void EnableControl(GG::Wnd *control, bool enable); - void DoLayout(); int PlanetDiameter() const; @@ -434,6 +423,7 @@ int m_planet_id; ///< id for the planet with is representet by this planet panel GG::TextControl* m_planet_name; ///< planet name + GG::TextControl* m_habitability; ///< indicates planet environment rating un uncolonized planets CUIButton* m_button_colonize; ///< btn which can be pressed to colonize this planet GG::DynamicGraphic* m_planet_graphic; ///< image of the planet (can be a frameset); this is now used only for asteroids RotatingPlanetControl* m_rotating_planet_graphic; ///< a realtime-rendered planet that rotates, with a textured surface mapped onto it @@ -445,13 +435,6 @@ boost::signals::connection m_connection_system_changed; ///< stores connection used to handle a system change boost::signals::connection m_connection_planet_changed; ///< stores connection used to handle a planet change - - /** planet panel is constructed without taking care of which controls - are needed by current planet ownership state. All controls which aren't - needed by current planet ownership state are stored in m_vec_unused_controls - and can be used when for instance planet ownership changes - */ - std::vector<GG::Wnd*> m_vec_unused_controls; }; class SidePanel::PlanetPanelContainer : public GG::Wnd @@ -693,6 +676,7 @@ Wnd(0, 0, w, MAX_PLANET_DIAMETER, GG::CLICKABLE), m_planet_id(planet.ID()), m_planet_name(0), + m_habitability(0), m_button_colonize(0), m_planet_graphic(0), m_rotating_planet_graphic(0), @@ -740,9 +724,25 @@ } } - m_planet_name = new GG::TextControl(MAX_PLANET_DIAMETER-15,10,planet.Name(),GG::GUI::GetGUI()->GetFont(ClientUI::Font(),ClientUI::Pts()*4/3),ClientUI::TextColor()); + m_planet_name = new GG::TextControl(MAX_PLANET_DIAMETER, 5, planet.Name(), GG::GUI::GetGUI()->GetFont(ClientUI::Font(), ClientUI::Pts()*4/3), ClientUI::TextColor()); AttachChild(m_planet_name); + std::string env_text = "!!!"; + switch (planet.Environment()) { + case PE_UNINHABITABLE: + env_text = UserString("PE_UNINHABITABLE"); break; + case PE_TERRIBLE: + env_text = UserString("PE_TERRIBLE"); break; + case PE_ADEQUATE: + env_text = UserString("PE_ADEQUATE"); break; + case PE_SUPERB: + env_text = UserString("PE_SUPERB"); break; + case PE_OPTIMAL: + env_text = UserString("PE_OPTIMAL"); break; + } + m_habitability = new GG::TextControl(MAX_PLANET_DIAMETER, m_planet_name->LowerRight().y - UpperLeft().y, env_text, GG::GUI::GetGUI()->GetFont(ClientUI::Font(), ClientUI::Pts()), ClientUI::TextColor()); + AttachChild(m_habitability); + int col_but_wid = 80; m_button_colonize = new CUIButton(Width() - col_but_wid, 10, col_but_wid, UserString("PL_COLONIZE"), GG::GUI::GetGUI()->GetFont(ClientUI::Font(), ClientUI::Pts()), @@ -778,11 +778,6 @@ m_connection_system_changed = GG::Connect(system->StateChangedSignal, &SidePanel::PlanetPanel::Refresh, this); m_connection_planet_changed = GG::Connect(plt->StateChangedSignal, &SidePanel::PlanetPanel::Refresh, this); - EnableControl(m_population_panel, true); - EnableControl(m_resource_panel, true); - EnableControl(m_buildings_panel, true); - EnableControl(m_specials_panel, true); - Refresh(); } @@ -793,25 +788,27 @@ m_connection_system_changed.disconnect(); m_connection_planet_changed.disconnect(); - for(unsigned int i=0;i<m_vec_unused_controls.size();i++) - delete m_vec_unused_controls[i]; - m_vec_unused_controls.clear(); + delete m_button_colonize; + delete m_habitability; + + delete m_population_panel; + delete m_resource_panel; + delete m_buildings_panel; + delete m_specials_panel; } Planet* SidePanel::PlanetPanel::GetPlanet() { - Planet *planet = GetUniverse().Object<Planet>(m_planet_id); - if(!planet) - throw std::runtime_error("SidePanel::PlanetPanel::GetPlanet: planet not found!"); - return planet; + Planet *planet = GetUniverse().Object<Planet>(m_planet_id); + if (!planet) throw std::runtime_error("SidePanel::PlanetPanel::GetPlanet: planet not found!"); + return planet; } const Planet* SidePanel::PlanetPanel::GetPlanet() const { - const Planet *planet = GetUniverse().Object<const Planet>(m_planet_id); - if(!planet) - throw std::runtime_error("SidePanel::PlanetPanel::GetPlanet: planet not found!"); - return planet; + const Planet *planet = GetUniverse().Object<const Planet>(m_planet_id); + if(!planet) throw std::runtime_error("SidePanel::PlanetPanel::GetPlanet: planet not found!"); + return planet; } void SidePanel::PlanetPanel::Hilite(HilitingType ht) @@ -831,28 +828,6 @@ Resize(GG::Pt(Width(), std::max(m_buildings_panel->LowerRight().y - UpperLeft().y, MAX_PLANET_DIAMETER))); ResizedSignal(); } -void SidePanel::PlanetPanel::EnableControl(GG::Wnd *control,bool enable) -{ - std::vector<GG::Wnd*>::iterator it = std::find(m_vec_unused_controls.begin(),m_vec_unused_controls.end(),control); - if(it != m_vec_unused_controls.end()) - { - if(enable) - { - m_vec_unused_controls.erase(it); - AttachChild(control); - control->Show(); - } - } - else - { - if(!enable) - { - m_vec_unused_controls.push_back(control); - DetachChild(control); - control->Hide(); - } - } -} void SidePanel::PlanetPanel::Refresh() { @@ -860,64 +835,44 @@ enum OWNERSHIP {OS_NONE, OS_FOREIGN, OS_SELF} owner = OS_NONE; - if(planet->Owners().empty() || planet->IsAboutToBeColonized()) - { //uninhabited + if(planet->Owners().empty() || planet->IsAboutToBeColonized()) { owner = OS_NONE; - } - else + } else { if(!planet->OwnedBy(HumanClientApp::GetApp()->EmpireID())) - {//inhabited owner = OS_FOREIGN; - } else - {//Owned owner = OS_SELF; - } + } if (!planet->Owners().empty()) { Empire* planet_empire = Empires().Lookup(*(planet->Owners().begin())); - m_planet_name->SetTextColor(planet_empire?planet_empire->Color():ClientUI::TextColor()); + m_planet_name->SetTextColor(planet_empire ? planet_empire->Color() : ClientUI::TextColor()); } - // visibility - if (owner==OS_NONE - && planet->MaxPop() > 0 - && !planet->IsAboutToBeColonized() - && FindColonyShip(planet->SystemID())) - { - std::vector<GG::Wnd*>::iterator it = std::find(m_vec_unused_controls.begin(),m_vec_unused_controls.end(),m_button_colonize); - if(it != m_vec_unused_controls.end()) - { - m_vec_unused_controls.erase(it); - AttachChild(m_button_colonize); - m_button_colonize->Show(); - } - m_button_colonize->SetText(UserString("PL_COLONIZE")); + if (owner == OS_NONE) { + AttachChild(m_habitability); + DetachChild(m_population_panel); + DetachChild(m_resource_panel); + } else { + DetachChild(m_habitability); + AttachChild(m_population_panel); + m_population_panel->Refresh(); + AttachChild(m_resource_panel); + m_resource_panel->Refresh(); } - else if (planet->IsAboutToBeColonized()) - { - std::vector<GG::Wnd*>::iterator it = std::find(m_vec_unused_controls.begin(),m_vec_unused_controls.end(),m_button_colonize); - if(it != m_vec_unused_controls.end()) - { - m_vec_unused_controls.erase(it); - AttachChild(m_button_colonize); - m_button_colonize->Show(); - } + + if (owner == OS_NONE && planet->MaxPop() > 0 && !planet->IsAboutToBeColonized() && FindColonyShip(planet->SystemID())) { + AttachChild(m_button_colonize); + m_button_colonize->SetText(UserString("PL_COLONIZE")); + + } else if (planet->IsAboutToBeColonized()) { + AttachChild(m_button_colonize); m_button_colonize->SetText(UserString("CANCEL")); + + } else { + DetachChild(m_button_colonize); } - else - { - std::vector<GG::Wnd*>::iterator it = std::find(m_vec_unused_controls.begin(),m_vec_unused_controls.end(),m_button_colonize); - if(it == m_vec_unused_controls.end()) - { - m_vec_unused_controls.push_back(m_button_colonize); - DetachChild(m_button_colonize); - m_button_colonize->Hide(); - } - } - m_population_panel->Refresh(); - m_resource_panel->Refresh(); m_buildings_panel->Refresh(); m_specials_panel->Update(); // BuildingsPanel::Refresh (and other panels) should emit ExpandCollapseSignal, which should be connected to SidePanel::PlanetPanel::DoLayout @@ -989,7 +944,7 @@ bool SidePanel::PlanetPanel::InPlanet(const GG::Pt& pt) const { - GG::Pt center = UpperLeft() + GG::Pt(MAX_PLANET_DIAMETER / 2, Height() / 2); + GG::Pt center = UpperLeft() + GG::Pt(MAX_PLANET_DIAMETER / 2, MAX_PLANET_DIAMETER / 2); GG::Pt diff = pt - center; int r_squared = PlanetDiameter() * PlanetDiameter() / 4; return diff.x * diff.x + diff.y * diff.y <= r_squared; @@ -1081,7 +1036,7 @@ // SidePanel::PlanetPanelContainer //////////////////////////////////////////////// SidePanel::PlanetPanelContainer::PlanetPanelContainer(int x, int y, int w, int h) : - Wnd(x-MAX_PLANET_DIAMETER/2, y, w+MAX_PLANET_DIAMETER/2, h, GG::CLICKABLE), + Wnd(x, y, w, h, GG::CLICKABLE), m_planet_panels(), m_planet_id(UniverseObject::INVALID_OBJECT_ID), m_vscroll(new CUIScroll(Width()-14,0,14,Height(),GG::VERTICAL)) @@ -1093,10 +1048,10 @@ bool SidePanel::PlanetPanelContainer::InWindow(const GG::Pt& pt) const { - if(pt.y<UpperLeft().y) + if(pt.y < UpperLeft().y) return false; - bool retval = UpperLeft()+GG::Pt(MAX_PLANET_DIAMETER/2,0) <= pt && pt < LowerRight(); + bool retval = UpperLeft() <= pt && pt < LowerRight(); for(unsigned int i = 0; i < m_planet_panels.size() && !retval; ++i) if(m_planet_panels[i]->InWindow(pt)) retval = true; @@ -1153,7 +1108,6 @@ m_vscroll->ScrolledSignal(m_vscroll->PosnRange().first, m_vscroll->PosnRange().second, 0, 0); // fake a scroll event in order to update scrollbar and panel container position if (y < container_height) { DetachChild(m_vscroll); - m_vscroll->Hide(); } else { AttachChild(m_vscroll); @@ -1369,13 +1323,13 @@ bool SidePanel::InWindow(const GG::Pt& pt) const { - return (UpperLeft() <= pt && pt < LowerRight()) || m_planet_panel_container->InWindow(pt); + return (UpperLeft() + GG::Pt(MAX_PLANET_DIAMETER, 0) <= pt && pt < LowerRight()) || m_planet_panel_container->InWindow(pt); } void SidePanel::Render() { GG::Pt ul = UpperLeft(), lr = LowerRight(); - FlatRectangle(ul.x, ul.y, lr.x, lr.y, ClientUI::SidePanelColor(), GG::CLR_ZERO, 0); + FlatRectangle(ul.x + MAX_PLANET_DIAMETER, ul.y, lr.x, lr.y, ClientUI::SidePanelColor(), GG::CLR_CYAN, 0); } void SidePanel::Refresh() Modified: trunk/FreeOrion/default/den_stringtable.txt =================================================================== --- trunk/FreeOrion/default/den_stringtable.txt 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/default/den_stringtable.txt 2007-01-31 04:34:49 UTC (rev 2001) @@ -359,7 +359,7 @@ ukendt system SP_SYSTEM_NAME -%s Systemet +%s SP_SYSTEM_PRODUCTION System Produktion Modified: trunk/FreeOrion/default/ger_stringtable.txt =================================================================== --- trunk/FreeOrion/default/ger_stringtable.txt 2007-01-25 07:04:12 UTC (rev 2000) +++ trunk/FreeOrion/default/ger_stringtable.txt 2007-01-31 04:34:49 UTC (rev 2001) @@ -1041,7 +1041,7 @@ unbekanntes System SP_SYSTEM_NAME -Das %1% System +%1% SP_RENAME_PLANET Planet umbenennen |