Saturday, 2011-07-02

*** tpb has joined #freeorion00:00
-calvino.freenode.net- [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup00:00
*** StrangerDanger has joined #freeorion00:33
*** STalKer-Y has joined #freeorion03:20
*** STalKer-X has quit IRC03:20
*** StrangerDanger has quit IRC05:52
*** VargaD has joined #freeorion06:01
*** theTroy has joined #freeorion08:06
CIA-19FreeOrion: geoffthemedio * r4013 /trunk/FreeOrion/ (30 files in 8 dirs): (log message trimmed)10:51
CIA-19FreeOrion: Bunch of related changes that snowballed:10:51
CIA-19FreeOrion: -Removed tracking of player id and host player id within MultiPlayerLobbyWnd and ClientApp. Instead, these are tracked within the ClientNetworking object.10:51
CIA-19FreeOrion: -Added a HostID event type and message that is used when the server sets or changes the host player id.10:51
CIA-19FreeOrion: -Removed LobbyHostAbort and LobbyNonHostExit events in server and client FSM and10:51
CIA-19FreeOrion: removed corresponding Message types. Instead, disconnection events convey the10:51
CIA-19FreeOrion: same information without redundancy, and the distinction between host and10:51
CIA-19FreeOrion: geoffthemedio * r4014 /trunk/FreeOrion/UI/ (5 files): (log message trimmed)11:43
CIA-19FreeOrion: -Fixed crash where players without empires sent chat messages and the lookup for the text colour assumed a valid empire was available.11:43
CIA-19FreeOrion: -Removed an abort from MapWnd::InitTurn when there is not client empire. Instead added some checks around later uses of the client empire object to handle this situation.11:43
CIA-19FreeOrion: -Added various other checks for not having a client empire in ProductionWnd, ResearchWnd and TechTreeWnd.11:43
CIA-19FreeOrion: -These changes make observers semi-functional in multiplayer games. Players can11:43
CIA-19FreeOrion: select observer mode from the multiplayer lobby, and will see the full galaxy11:43
CIA-19FreeOrion: in-game. Observers can crash the game, however, by pressing the end turn11:43
*** StrangerDanger has joined #freeorion15:45
*** neuro8 has joined #freeorion15:59
*** neuro8 has quit IRC16:45
*** neuro8 has joined #freeorion18:24
neuro8yeaaaa18:41
neuro8Happy Holidays y'all18:41
GeofftheMedioI imagine some are in countries without any thins weekend18:43
neuro8thins?18:44
neuro8Well, happy holidays to the uh, US dev's I suppose18:45
neuro8Just a weird question on the "Splitter" component18:46
GeofftheMedioalso Canada18:47
neuro8I'm trying to work on it moving up and down, which involves connecting the SignalSplit event I created18:47
neuro8Is it the FleetWnd that's meant to reposition it in DoLayout, or... like the control just repositions itself based on it's min / max coordinates18:48
neuro8i.e. void GG::SignalSplit(const Splitter& splitter, bool stopped)18:48
neuro8and18:48
neuro8void Splitter::LDrag(const GG::Pt &pt, const GG::Pt &move, GG::Flags<GG::ModKey> mod_keys)18:48
GeofftheMedioprobably your splitter shouldn't require a parent Wnd to do anything special... it should work like GG::Layout, and automatically resize its contents and move the bottom / right contained window in response to splitter movement18:49
neuro8hm18:49
neuro8Gotcha18:59
neuro8So I send out the SignalSplit event18:59
neuro8And just handle resizing in the EventFilter method18:59
neuro8I'm not even sure WHY I made a Splitter:LDrag method...18:59
neuro8Old code. Doesn't correspond to what's going on in Scroll.h / Scroll.cpp. That just uses an EventFilter method to catch and respond to events19:00
GeofftheMedioso your splitter would attach an eventfilter to the SplitterTab and handle drag events?19:02
neuro8That's what I'm thinking19:06
neuro8As the splitter is dragged, this is called19:08
neuro8bool Splitter::EventFilter(Wnd* w, const WndEvent& event)19:08
neuro8which handles             case WndEvent::LDrag: {19:08
neuro8Does it's move, and then does UpdatePosn()19:09
neuro8There's also a SignalSplit event that Wnd's can connect to to listen, but I've commented that out for FleetWnd, as I thought this class would handle it19:09
neuro8    //GG::Connect(m_fleet_splitter->SplittedSignal, FleetWndSplit);19:09
GeofftheMedioI'm not clear on what Wnd gets dragged and what is filtering...19:10
GeofftheMediois there a separate SplitterTab that has its events filtered by Splitter?19:10
GeofftheMedioAnd SplittedSignal sounds like it should be renamed SplitDragged or SplitterTabDragged or somesuch19:12
GeofftheMedioer, SplitterTabDraggedSignal19:12
neuro8Um19:12
neuro8Sorry, I was figuring out naming semantics when I initially stubbed out the class19:13
neuro8The problem is... there's several ways to do this19:14
neuro8My thought was, 1 "Splitter" class, that I stubbed out after reviewing the "Scroll" class in GG19:15
neuro8The splitter class takes an x, y position, w,h for dimensions, and 2 windows19:15
neuro8It takes a "min, max" properties to determine how low / high it can go on its dimensions (vertical or horizontal)19:17
GeofftheMedioright, but look at scroll.  Scroll has a tab button on which it installs its EventFilter...  is that what you're planning as well?  Or is your Splitter class itself the tab?19:18
neuro8And there's a Button *tab property for the user to select and drag19:18
neuro8Yes19:18
GeofftheMediook19:18
neuro8I added a Button *tab property that's hooked up to the EventFilter19:18
neuro8The idea being that the "Splitter" is in charge of 2 wnds AND a button19:18
neuro8which it inserts between them... sort of19:18
GeofftheMediommhmm19:18
neuro8That's where it gets weird. I.e. in FleetWnd, I reposition the tab in DoLayout19:19
neuro8So I was like...uh...whose in charge of the...things...19:19
GeofftheMediono; Splitter should reposition its own tab, like Scroll does19:19
neuro8Which made me think I should just... fire off a SplitterSignal for the FleetWnd to handle19:19
neuro8Cool19:19
neuro8That's what I thought initially19:19
neuro8I figured Scroll followed a pretty good pattern of handling internal content19:21
GeofftheMedioseems applicable19:22
neuro8We decided I should have a map of Wnd's to WndSplitterPositions right?19:33
neuro8    std::map<Wnd*, WndPosition>     m_wnd_positions;19:33
neuro8That's from Layout.h19:33
neuro8I created the WndSplitterPosition definition and it's compiling and displaying my Splitter. I'm working on adding the 2 wnd's now19:34
GeofftheMedioI think you can have just to Wnd* and don't need a map19:34
neuro8Or maybe just 2 wnd position objects...19:34
neuro8I have this19:35
neuro8 Wnd*              upper_left_wnd;19:35
neuro8        Wnd*              lower_right_wnd;19:35
neuro819:35
neuro8And set those values up19:35
GeofftheMediommhmm19:35
neuro8But I don't use / have WndSplitterPosition anywhere...19:35
neuro8So I'm not saving :19:35
neuro819:35
neuro8            Flags<Alignment> alignment;19:35
neuro8            Pt               original_ul;19:35
neuro8            Pt               original_size;19:35
GeofftheMedionot sure what your point is...19:36
neuro8I think I figured... it out19:44
neuro8I should save those as properties19:44
neuro8Wnd*              upper_left_wnd;19:44
neuro8        Wnd*              lower_right_wnd;19:44
neuro8        WndSplitterPosition upper_left_wnd_position;19:44
neuro8        WndSplitterPosition lower_right_wnd_position;19:44
neuro8lower_right_wnd_position = WndSplitterPosition(alignment, wnd->RelativeUpperLeft(), wnd->Size())19:45
neuro8            lower_right_wnd = wnd;19:45
GeofftheMediook19:45
neuro8Sorry, I'm sure this doesn't make sense19:46
neuro8You're seeing pieces of my code19:46
neuro8But the idea is I'm saving properties for the defined Wnd's positions in a small structure19:46
GeofftheMedioyes; we discussed it before19:51
neuro8Yes19:52
neuro8Any idea why AttemptedOverwrite is available in Layout.cpp but I can't use it in Splitter.cpp?19:53
GeofftheMedioit's an exception declared in Layout.h as a member of GG::Layout.  You'd need to declare it in Splitter as well.  Line 238 of Layout.cpp19:54
neuro8OOoo gotcha19:55
neuro8That fixed it19:55
neuro8I'm using cout to see if anything is outputting20:00
neuro8    std::cout << "GG::SignalSplit: dragging" << std::endl;20:00
neuro8It's weird, I'm seeing that the m_tab event filter was installed... but no events are firing. It's just moving the FleetWnd around20:01
GeofftheMediois m_tab constructed as INTERACTIVE and attached as a child of the splitter?20:03
GeofftheMedioand is Splitter::EventFilter executing?  If so, what do you do in it and what does it return?20:03
neuro8How do you tell if m_tab is constructed as interactive20:04
neuro8if (m_orientation == VERTICAL) {20:05
neuro8        m_tab = style->NewVScrollTabButton(X0, Y(Value(w)), w, Y(TabWidth()), "", null_font, color);20:05
neuro8    } else {20:05
neuro8        m_tab = style->NewHScrollTabButton(X(Value(h)), Y0, X(TabWidth()), h, "", null_font, color);20:05
neuro8    }20:05
neuro8AttachChild(m_tab);20:05
neuro820:05
neuro8    m_tab->InstallEventFilter(this);20:05
neuro8This happens in the Splitter constructive20:05
neuro8I can tell it happens because a) I see the tab in blue on the FleetWnd and b) I have a std::cout that's firing off and logging out20:06
GeofftheMediolook into NewVScrollTabButton20:07
GeofftheMedioif you don't specify any flags, then it uses INTERACTIVE and REPEAT_BUTTON_DOWN20:07
GeofftheMedioso that should be fine20:08
GeofftheMediodoes Splitter::EventFilter get called?  (Does Splitter have an EventFilter defined?)20:08
neuro8Actually no...20:09
neuro8It doesn't get fired20:09
neuro8bool Splitter::EventFilter(Wnd* w, const WndEvent& event)20:09
neuro8{20:09
neuro8    std::cout << "Splitter::EventFilter:" << std::endl;20:09
neuro820:09
neuro8That never fires...20:09
neuro8In the .h file, it's         virtual bool  EventFilter(Wnd* w, const WndEvent& event);20:10
GeofftheMediohmm... I'm not sure... Make sure everything's set up the same as in Scroll?20:15
neuro8hm21:00
neuro8All right I have to bounce21:00
neuro8It's weird. The Wnd's are being attached in the Splitter. I'm not sure I should be doing that21:00
neuro8I think I should just have a ref to them and then... manage their positions / widths when I update the scroll21:01
GeofftheMedioThey probably need to be child wnds to ensure things move around together and draw order is properly handled21:03
neuro8Cool, well 'll figure it out21:12
neuro8Thanks21:12
neuro8Later21:12
*** neuro8 has quit IRC21:12
*** StrangerDanger has quit IRC21:16
CIA-19FreeOrion: geoffthemedio * r4015 /trunk/FreeOrion/ (4 files in 3 dirs): Modified ErrorMessage to specify whether the error is fatal, and modified human client error handlers to abort or not according to whether the error is fatal.21:21
*** theTroy has quit IRC21:38
CIA-19FreeOrion: geoffthemedio * r4016 /trunk/FreeOrion/ (UI/MapWnd.cpp client/human/HumanClientFSM.cpp):21:56
CIA-19FreeOrion: -Made MapWnd refuse to enable order issuing if there is no local client empire available.21:56
CIA-19FreeOrion: -Made PlayingTurn state automatically post a TurnEnded event if there is no21:56
CIA-19FreeOrion: local empire available, so that Observer's FSM will be in a state receptive to21:56
CIA-19FreeOrion: later turns' update messages after the game starts, without needing to have the21:56
CIA-19FreeOrion: observer click the turn button (which is now disabled on observer clients thanks21:56
CIA-19FreeOrion: to the previous point).21:56
*** VargaD has quit IRC22:17

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!