*** tpb has joined #freeorion | 00:00 | |
-calvino.freenode.net- [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup | 00:00 | |
*** StrangerDanger has joined #freeorion | 00:33 | |
*** STalKer-Y has joined #freeorion | 03:20 | |
*** STalKer-X has quit IRC | 03:20 | |
*** StrangerDanger has quit IRC | 05:52 | |
*** VargaD has joined #freeorion | 06:01 | |
*** theTroy has joined #freeorion | 08:06 | |
CIA-19 | FreeOrion: geoffthemedio * r4013 /trunk/FreeOrion/ (30 files in 8 dirs): (log message trimmed) | 10:51 |
---|---|---|
CIA-19 | FreeOrion: Bunch of related changes that snowballed: | 10:51 |
CIA-19 | FreeOrion: -Removed tracking of player id and host player id within MultiPlayerLobbyWnd and ClientApp. Instead, these are tracked within the ClientNetworking object. | 10:51 |
CIA-19 | FreeOrion: -Added a HostID event type and message that is used when the server sets or changes the host player id. | 10:51 |
CIA-19 | FreeOrion: -Removed LobbyHostAbort and LobbyNonHostExit events in server and client FSM and | 10:51 |
CIA-19 | FreeOrion: removed corresponding Message types. Instead, disconnection events convey the | 10:51 |
CIA-19 | FreeOrion: same information without redundancy, and the distinction between host and | 10:51 |
CIA-19 | FreeOrion: geoffthemedio * r4014 /trunk/FreeOrion/UI/ (5 files): (log message trimmed) | 11:43 |
CIA-19 | FreeOrion: -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-19 | FreeOrion: -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-19 | FreeOrion: -Added various other checks for not having a client empire in ProductionWnd, ResearchWnd and TechTreeWnd. | 11:43 |
CIA-19 | FreeOrion: -These changes make observers semi-functional in multiplayer games. Players can | 11:43 |
CIA-19 | FreeOrion: select observer mode from the multiplayer lobby, and will see the full galaxy | 11:43 |
CIA-19 | FreeOrion: in-game. Observers can crash the game, however, by pressing the end turn | 11:43 |
*** StrangerDanger has joined #freeorion | 15:45 | |
*** neuro8 has joined #freeorion | 15:59 | |
*** neuro8 has quit IRC | 16:45 | |
*** neuro8 has joined #freeorion | 18:24 | |
neuro8 | yeaaaa | 18:41 |
neuro8 | Happy Holidays y'all | 18:41 |
GeofftheMedio | I imagine some are in countries without any thins weekend | 18:43 |
neuro8 | thins? | 18:44 |
neuro8 | Well, happy holidays to the uh, US dev's I suppose | 18:45 |
neuro8 | Just a weird question on the "Splitter" component | 18:46 |
GeofftheMedio | also Canada | 18:47 |
neuro8 | I'm trying to work on it moving up and down, which involves connecting the SignalSplit event I created | 18:47 |
neuro8 | Is it the FleetWnd that's meant to reposition it in DoLayout, or... like the control just repositions itself based on it's min / max coordinates | 18:48 |
neuro8 | i.e. void GG::SignalSplit(const Splitter& splitter, bool stopped) | 18:48 |
neuro8 | and | 18:48 |
neuro8 | void Splitter::LDrag(const GG::Pt &pt, const GG::Pt &move, GG::Flags<GG::ModKey> mod_keys) | 18:48 |
GeofftheMedio | probably 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 movement | 18:49 |
neuro8 | hm | 18:49 |
neuro8 | Gotcha | 18:59 |
neuro8 | So I send out the SignalSplit event | 18:59 |
neuro8 | And just handle resizing in the EventFilter method | 18:59 |
neuro8 | I'm not even sure WHY I made a Splitter:LDrag method... | 18:59 |
neuro8 | Old 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 events | 19:00 |
GeofftheMedio | so your splitter would attach an eventfilter to the SplitterTab and handle drag events? | 19:02 |
neuro8 | That's what I'm thinking | 19:06 |
neuro8 | As the splitter is dragged, this is called | 19:08 |
neuro8 | bool Splitter::EventFilter(Wnd* w, const WndEvent& event) | 19:08 |
neuro8 | which handles case WndEvent::LDrag: { | 19:08 |
neuro8 | Does it's move, and then does UpdatePosn() | 19:09 |
neuro8 | There'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 it | 19:09 |
neuro8 | //GG::Connect(m_fleet_splitter->SplittedSignal, FleetWndSplit); | 19:09 |
GeofftheMedio | I'm not clear on what Wnd gets dragged and what is filtering... | 19:10 |
GeofftheMedio | is there a separate SplitterTab that has its events filtered by Splitter? | 19:10 |
GeofftheMedio | And SplittedSignal sounds like it should be renamed SplitDragged or SplitterTabDragged or somesuch | 19:12 |
GeofftheMedio | er, SplitterTabDraggedSignal | 19:12 |
neuro8 | Um | 19:12 |
neuro8 | Sorry, I was figuring out naming semantics when I initially stubbed out the class | 19:13 |
neuro8 | The problem is... there's several ways to do this | 19:14 |
neuro8 | My thought was, 1 "Splitter" class, that I stubbed out after reviewing the "Scroll" class in GG | 19:15 |
neuro8 | The splitter class takes an x, y position, w,h for dimensions, and 2 windows | 19:15 |
neuro8 | It takes a "min, max" properties to determine how low / high it can go on its dimensions (vertical or horizontal) | 19:17 |
GeofftheMedio | right, 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 |
neuro8 | And there's a Button *tab property for the user to select and drag | 19:18 |
neuro8 | Yes | 19:18 |
GeofftheMedio | ok | 19:18 |
neuro8 | I added a Button *tab property that's hooked up to the EventFilter | 19:18 |
neuro8 | The idea being that the "Splitter" is in charge of 2 wnds AND a button | 19:18 |
neuro8 | which it inserts between them... sort of | 19:18 |
GeofftheMedio | mmhmm | 19:18 |
neuro8 | That's where it gets weird. I.e. in FleetWnd, I reposition the tab in DoLayout | 19:19 |
neuro8 | So I was like...uh...whose in charge of the...things... | 19:19 |
GeofftheMedio | no; Splitter should reposition its own tab, like Scroll does | 19:19 |
neuro8 | Which made me think I should just... fire off a SplitterSignal for the FleetWnd to handle | 19:19 |
neuro8 | Cool | 19:19 |
neuro8 | That's what I thought initially | 19:19 |
neuro8 | I figured Scroll followed a pretty good pattern of handling internal content | 19:21 |
GeofftheMedio | seems applicable | 19:22 |
neuro8 | We decided I should have a map of Wnd's to WndSplitterPositions right? | 19:33 |
neuro8 | std::map<Wnd*, WndPosition> m_wnd_positions; | 19:33 |
neuro8 | That's from Layout.h | 19:33 |
neuro8 | I created the WndSplitterPosition definition and it's compiling and displaying my Splitter. I'm working on adding the 2 wnd's now | 19:34 |
GeofftheMedio | I think you can have just to Wnd* and don't need a map | 19:34 |
neuro8 | Or maybe just 2 wnd position objects... | 19:34 |
neuro8 | I have this | 19:35 |
neuro8 | Wnd* upper_left_wnd; | 19:35 |
neuro8 | Wnd* lower_right_wnd; | 19:35 |
neuro8 | 19:35 | |
neuro8 | And set those values up | 19:35 |
GeofftheMedio | mmhmm | 19:35 |
neuro8 | But I don't use / have WndSplitterPosition anywhere... | 19:35 |
neuro8 | So I'm not saving : | 19:35 |
neuro8 | 19:35 | |
neuro8 | Flags<Alignment> alignment; | 19:35 |
neuro8 | Pt original_ul; | 19:35 |
neuro8 | Pt original_size; | 19:35 |
GeofftheMedio | not sure what your point is... | 19:36 |
neuro8 | I think I figured... it out | 19:44 |
neuro8 | I should save those as properties | 19:44 |
neuro8 | Wnd* 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 |
neuro8 | lower_right_wnd_position = WndSplitterPosition(alignment, wnd->RelativeUpperLeft(), wnd->Size()) | 19:45 |
neuro8 | lower_right_wnd = wnd; | 19:45 |
GeofftheMedio | ok | 19:45 |
neuro8 | Sorry, I'm sure this doesn't make sense | 19:46 |
neuro8 | You're seeing pieces of my code | 19:46 |
neuro8 | But the idea is I'm saving properties for the defined Wnd's positions in a small structure | 19:46 |
GeofftheMedio | yes; we discussed it before | 19:51 |
neuro8 | Yes | 19:52 |
neuro8 | Any idea why AttemptedOverwrite is available in Layout.cpp but I can't use it in Splitter.cpp? | 19:53 |
GeofftheMedio | it'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.cpp | 19:54 |
neuro8 | OOoo gotcha | 19:55 |
neuro8 | That fixed it | 19:55 |
neuro8 | I'm using cout to see if anything is outputting | 20:00 |
neuro8 | std::cout << "GG::SignalSplit: dragging" << std::endl; | 20:00 |
neuro8 | It's weird, I'm seeing that the m_tab event filter was installed... but no events are firing. It's just moving the FleetWnd around | 20:01 |
GeofftheMedio | is m_tab constructed as INTERACTIVE and attached as a child of the splitter? | 20:03 |
GeofftheMedio | and is Splitter::EventFilter executing? If so, what do you do in it and what does it return? | 20:03 |
neuro8 | How do you tell if m_tab is constructed as interactive | 20:04 |
neuro8 | if (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 |
neuro8 | AttachChild(m_tab); | 20:05 |
neuro8 | 20:05 | |
neuro8 | m_tab->InstallEventFilter(this); | 20:05 |
neuro8 | This happens in the Splitter constructive | 20:05 |
neuro8 | I 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 out | 20:06 |
GeofftheMedio | look into NewVScrollTabButton | 20:07 |
GeofftheMedio | if you don't specify any flags, then it uses INTERACTIVE and REPEAT_BUTTON_DOWN | 20:07 |
GeofftheMedio | so that should be fine | 20:08 |
GeofftheMedio | does Splitter::EventFilter get called? (Does Splitter have an EventFilter defined?) | 20:08 |
neuro8 | Actually no... | 20:09 |
neuro8 | It doesn't get fired | 20:09 |
neuro8 | bool Splitter::EventFilter(Wnd* w, const WndEvent& event) | 20:09 |
neuro8 | { | 20:09 |
neuro8 | std::cout << "Splitter::EventFilter:" << std::endl; | 20:09 |
neuro8 | 20:09 | |
neuro8 | That never fires... | 20:09 |
neuro8 | In the .h file, it's virtual bool EventFilter(Wnd* w, const WndEvent& event); | 20:10 |
GeofftheMedio | hmm... I'm not sure... Make sure everything's set up the same as in Scroll? | 20:15 |
neuro8 | hm | 21:00 |
neuro8 | All right I have to bounce | 21:00 |
neuro8 | It's weird. The Wnd's are being attached in the Splitter. I'm not sure I should be doing that | 21:00 |
neuro8 | I think I should just have a ref to them and then... manage their positions / widths when I update the scroll | 21:01 |
GeofftheMedio | They probably need to be child wnds to ensure things move around together and draw order is properly handled | 21:03 |
neuro8 | Cool, well 'll figure it out | 21:12 |
neuro8 | Thanks | 21:12 |
neuro8 | Later | 21:12 |
*** neuro8 has quit IRC | 21:12 | |
*** StrangerDanger has quit IRC | 21:16 | |
CIA-19 | FreeOrion: 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 IRC | 21:38 | |
CIA-19 | FreeOrion: geoffthemedio * r4016 /trunk/FreeOrion/ (UI/MapWnd.cpp client/human/HumanClientFSM.cpp): | 21:56 |
CIA-19 | FreeOrion: -Made MapWnd refuse to enable order issuing if there is no local client empire available. | 21:56 |
CIA-19 | FreeOrion: -Made PlayingTurn state automatically post a TurnEnded event if there is no | 21:56 |
CIA-19 | FreeOrion: local empire available, so that Observer's FSM will be in a state receptive to | 21:56 |
CIA-19 | FreeOrion: later turns' update messages after the game starts, without needing to have the | 21:56 |
CIA-19 | FreeOrion: observer click the turn button (which is now disabled on observer clients thanks | 21:56 |
CIA-19 | FreeOrion: to the previous point). | 21:56 |
*** VargaD has quit IRC | 22:17 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!