FleetWnd: Adding divider between data panels
Moderator: Committer
Re: FleetWnd: Adding divider between data panels
Thanks, good to know.
Re: FleetWnd: Adding divider between data panels
Hi pm,
I've been incredibly busy working on my company, and March + April + May have been hectic, just making sure it's stable.
All the groundwork has been discussed with Tyreth and myself, but unfortunately, I haven't had much free time to work on it. I spoke with Geoff, and think I can carve out time starting June 1st - June 18th to make actual progress on it.
It's been itching me, and I told G I personally felt bad that there hasn't been any progress made, especially since I worked hard to earn the trust of the community. Plus, one of my personal New Year's Resolutions is to contribute to an Open Source project.
So that's the status, been discussed, code has been stubbed out, just haven't sat down, done it, and tested.
neuro8
I've been incredibly busy working on my company, and March + April + May have been hectic, just making sure it's stable.
All the groundwork has been discussed with Tyreth and myself, but unfortunately, I haven't had much free time to work on it. I spoke with Geoff, and think I can carve out time starting June 1st - June 18th to make actual progress on it.
It's been itching me, and I told G I personally felt bad that there hasn't been any progress made, especially since I worked hard to earn the trust of the community. Plus, one of my personal New Year's Resolutions is to contribute to an Open Source project.
So that's the status, been discussed, code has been stubbed out, just haven't sat down, done it, and tested.
neuro8
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: FleetWnd: Adding divider between data panels
Tyreth, or tzlaine?neuro wrote:All the groundwork has been discussed with Tyreth and myself...
Re: FleetWnd: Adding divider between data panels
Sorry, tzlaine, on his GG library and the best way to make the new class. I posted some of our notes in an earlier post.
If there's a developer interested in tackling it earlier, I wouldn't mind coaching them... though point of pride is in me finishing it. Until then, I'm working with my team to get our apps / sites out prior to my quasi-vaca June 1st.
If there's a developer interested in tackling it earlier, I wouldn't mind coaching them... though point of pride is in me finishing it. Until then, I'm working with my team to get our apps / sites out prior to my quasi-vaca June 1st.
Re: FleetWnd: Adding divider between data panels
Hey All,
This is a GG question for integrating the new Splitter class.
Basically, I'm working on the Splitter.cpp class for integration into FreeOrion.
What I'm trying to do:
Understand GG better by running through the tutorials in the "tutorials" folder of GG. By understanding GG, I think it'll help me understand the Splitter integration.
What I'm having issues with:
Building / seeing the output for the tutorials: minimal, controls, serialization, adam, and eve. I use cmake-gui to Configure + Generate the XCode project to try this.
My process:
I downloaded the GG including the "tutorial" files. I ran cmake-gui to Configure the classes so they can build a project in XCode. I've been having a bit of trouble generating them. When I try to Configure, after setting the "BOOST_INCLUDE_DIR" to this "/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/GG/tutorial/src/boost", I get this error:
-- Configuring Tutorials
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:522 (FILE):
file Internal CMake error when trying to open file:
/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/GG/tutorial/src/boost/boost/version.hpp
for reading.
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:535 (MATH):
math cannot parse the expression: " / 100000": syntax error, unexpected
exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:536 (MATH):
math cannot parse the expression: " / 100 % 1000": syntax error, unexpected
exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:537 (MATH):
math cannot parse the expression: " % 100": syntax error, unexpected
exp_MOD, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
Could NOT find Boost
Configuring incomplete, errors occurred!
Ok, so that's coming from this in CMakeLists.txt:
I can't find the locations for the serialization library files (I suspect because it wasn't built / used in FO):
Boost_SERIALIZATION_LIBRARY_DEBUG
Boost_SERIALIZATION_LIBRARY_RELEASE
So after testing / scratching my head, scrapping, rebuilding, testing, etc...
I comment out the cmake line looking for boost, since it seems to only be used for Serialization.
Re-run cmake-gui and it Configures and Generates an XCode project for me!
But when I try to build, there's no real output for me to test the "minimal" or any other project, just the CMakeLists.txt in the folder.
My Questions on Process:
Am I missing something in my cmake-gui configure / XCode generate settings?
Is there a command in the command-line I can use to generate the minimal (et al) output?
Should I just abandon running through the tutorials on GG for another day, and focus on running / testing Splitter?
I'm finally able to put some time on this, so any help or advice would be...er helpful.
Thanks!
Neuro8
This is a GG question for integrating the new Splitter class.
Basically, I'm working on the Splitter.cpp class for integration into FreeOrion.
What I'm trying to do:
Understand GG better by running through the tutorials in the "tutorials" folder of GG. By understanding GG, I think it'll help me understand the Splitter integration.
What I'm having issues with:
Building / seeing the output for the tutorials: minimal, controls, serialization, adam, and eve. I use cmake-gui to Configure + Generate the XCode project to try this.
My process:
I downloaded the GG including the "tutorial" files. I ran cmake-gui to Configure the classes so they can build a project in XCode. I've been having a bit of trouble generating them. When I try to Configure, after setting the "BOOST_INCLUDE_DIR" to this "/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/GG/tutorial/src/boost", I get this error:
-- Configuring Tutorials
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:522 (FILE):
file Internal CMake error when trying to open file:
/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/GG/tutorial/src/boost/boost/version.hpp
for reading.
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:535 (MATH):
math cannot parse the expression: " / 100000": syntax error, unexpected
exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:536 (MATH):
math cannot parse the expression: " / 100 % 1000": syntax error, unexpected
exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at /Applications/CMake 2.8-1.app/Contents/share/cmake-2.8/Modules/FindBoost.cmake:537 (MATH):
math cannot parse the expression: " % 100": syntax error, unexpected
exp_MOD, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
Could NOT find Boost
Configuring incomplete, errors occurred!
Ok, so that's coming from this in CMakeLists.txt:
Code: Select all
find_package(Boost ${MINIMUM_BOOST_VERSION} COMPONENTS serialization)
Boost_SERIALIZATION_LIBRARY_DEBUG
Boost_SERIALIZATION_LIBRARY_RELEASE
So after testing / scratching my head, scrapping, rebuilding, testing, etc...
I comment out the cmake line looking for boost, since it seems to only be used for Serialization.
Re-run cmake-gui and it Configures and Generates an XCode project for me!
But when I try to build, there's no real output for me to test the "minimal" or any other project, just the CMakeLists.txt in the folder.
My Questions on Process:
Am I missing something in my cmake-gui configure / XCode generate settings?
Is there a command in the command-line I can use to generate the minimal (et al) output?
Should I just abandon running through the tutorials on GG for another day, and focus on running / testing Splitter?
I'm finally able to put some time on this, so any help or advice would be...er helpful.
Thanks!
Neuro8
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: FleetWnd: Adding divider between data panels
I don't know how up-to-date and complete the GG tutorial stuff is, but I suspect not very, and I wouldn't spend much time looking at it. There are many more examples of GG in use in the FreeOrion code.neuro wrote:What I'm trying to do:
Understand GG better by running through the tutorials in the "tutorials" folder of GG. By understanding GG, I think it'll help me understand the Splitter integration.
You don't need to be using serialization of GG controls, adam or eve stuff for FreeOrion purposes.What I'm having issues with:
Building / seeing the output for the tutorials: minimal, controls, serialization, adam, and eve.
My FreeOrion directory tree doesn't have a src directory under GG/tutorial. And even if it did, I wouldn't expect the whole Boost library include tree would be stuck under the GG tutorial directory for some reason... The BOOST_INCLUDE_DIR needs to point to the actual full Boost include directory, which is not a subdirectory of FreeOrion or GG, but is probably a separate directory. In the Windows SDK, it's located in FreeOrion_SDK/Boost/include . I'm not sure how the MacOSX SDK is set up, but I'd guess something similar.My process:When I try to Configure, after setting the "BOOST_INCLUDE_DIR" to this "/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/GG/tutorial/src/boost"
My Questions on Process:Should I just abandon running through the tutorials on GG for another day, and focus on running / testing Splitter?[/quote]
Even if you didn't have any CMake issues, I'd suggest not bothering with GG tutorials, and just diving into FreeOrion code that uses GG, and looking at the GG source and header and asking questions when necessary.
You also probably don't need to use CMake, as there is a MacOSX SDK that's almost up to date, which contains an XCode project. (I think two files need to be added that didn't exist the last time it was updated). tzlaine likes CMake for its ability to work on all system and only require one update of build files, but issues like this, where it doesn't "just work" make me less fond, as long as there is someone to actually keep the per-OS build files updated...
Re: FleetWnd: Adding divider between data panels
Geoff the Medio wrote: I don't know how up-to-date and complete the GG tutorial stuff is, but I suspect not very, and I wouldn't spend much time looking at it. There are many more examples of GG in use in the FreeOrion code.
Ok! Sounds good then.
Right I was just trying to get it to build so I can see GG in action on its ownGeoff the Medio wrote:You don't need to be using serialization of GG controls, adam or eve stuff for FreeOrion purposes.
Right, my bad, initially I was using the boost lib in the following location:My FreeOrion directory tree doesn't have a src directory under GG/tutorial. And even if it did, I wouldn't expect the whole Boost library include tree would be stuck under the GG tutorial directory for some reason... The BOOST_INCLUDE_DIR needs to point to the actual full Boost include directory, which is not a subdirectory of FreeOrion or GG, but is probably a separate directory. In the Windows SDK, it's located in FreeOrion_SDK/Boost/include . I'm not sure how the MacOSX SDK is set up, but I'd guess something similar.
/Users/dominictancredi/Documents/freeorion-sdk/FreeOrion/Xcode/dep/local/include
But it wasn't working for same issue described above. I tried downloading a fresh install of boost but now I'm thinking I just spent waaay too much time trying to solve this whole build thing out.
I was using the MacOSX XCode project to generate my FreeOrion builds. But there wasn't one for GG hence the attempt to build one. Don't let me influence either camp, I think my experience using CMake resulted in a faulty process.You also probably don't need to use CMake, as there is a MacOSX SDK that's almost up to date, which contains an XCode project. (I think two files need to be added that didn't exist the last time it was updated). tzlaine likes CMake for its ability to work on all system and only require one update of build files, but issues like this, where it doesn't "just work" make me less fond, as long as there is someone to actually keep the per-OS build files updated...
I'll just try to integrate the Splitter class directly and see how it goes.
Thanks for the quick response!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: FleetWnd: Adding divider between data panels
How does the FreeOrion OSX XCode project handle GG stuff then?neuro wrote:I was using the MacOSX XCode project to generate my FreeOrion builds. But there wasn't one for GG hence the attempt to build one.
On Windows, the solution file contains projects for freeorion (human client), freeorionca (AI client), freeoriond (server), and GG, GG-Ogre and the GG-Ogre OIS input plugin. This results in DLLs for the three GG projects, which are dependencies of the FreeOrion project, but which should also be usable independently, as if they were built on their own.
Re: FleetWnd: Adding divider between data panels
5 months later...
Hi All!
I've finished my Splitter class, and it's ready for me to test out, play with styles, etc. However, I can't seem to get the build to work. I've been able to (finally) compile without error (lotta property/method reviewing), but when I build I get a linking error.
Here's the code:
FleetWnd.h: line 7
FleetWnd.h: line 174
FleetWnd.cpp: lines 2259 - 2271
Here's the error:
ld: warning: directory '/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib/graphviz' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib/bullet"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/lib"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/Frameworks"' following -F not found
Undefined symbols:
"GG::Splitter::Splitter(GG::X, GG::Y, GG::X, GG::Y)", referenced from:
FleetWnd::Init(int) in FleetWnd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
My class lives in FreeOrion/GG/GG/Splitter.h and FreeOrion/GG/src/Splitter.cpp respectively and is attached. It's not yet tweaked but should be able to work... I've commented out the attaching code in FleetWnd just to try to get an instantiation of it.
I don't know if I need to recompile the GG build to include this or not... I've had issues with recompiling GG before (see earlier posts in this thread) so any thoughts from the community would help.
Here's hoping I get this done by the end of the year. It'd be nice to have contributed 2 fixes to the game.
B,
neuro
Hi All!
I've finished my Splitter class, and it's ready for me to test out, play with styles, etc. However, I can't seem to get the build to work. I've been able to (finally) compile without error (lotta property/method reviewing), but when I build I get a linking error.
Here's the code:
FleetWnd.h: line 7
Code: Select all
#include <GG/Splitter.h>
Code: Select all
GG::Splitter* m_fleet_splitter;
Code: Select all
/* NEW CODE BY DT */
// create splitter and attach between list box and detail panel
// divide fleet windows
m_fleet_splitter = new GG::Splitter(GG::X0, GG::Y0, GG::X(300), GG::Y(14));
// m_fleet_splitter = new GG::Splitter(GG::X0, GG::Y0, GG::X(300), GG::Y(14), GG::VERTICAL, GG::CLR_GRAY, GG::INTERACTIVE);
//GG::Connect(m_fleet_splitter->SignalSplit)
//AttachChild(m_fleet_splitter);
/* END NEW CODE BY DT */
ld: warning: directory '/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib/graphviz' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/local/lib/bullet"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/lib"' following -L not found
ld: warning: directory '"/Users/dominictancredi/Desktop/Games/freeorion-sdk/FreeOrion/Xcode/dep/Frameworks"' following -F not found
Undefined symbols:
"GG::Splitter::Splitter(GG::X, GG::Y, GG::X, GG::Y)", referenced from:
FleetWnd::Init(int) in FleetWnd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
My class lives in FreeOrion/GG/GG/Splitter.h and FreeOrion/GG/src/Splitter.cpp respectively and is attached. It's not yet tweaked but should be able to work... I've commented out the attaching code in FleetWnd just to try to get an instantiation of it.
I don't know if I need to recompile the GG build to include this or not... I've had issues with recompiling GG before (see earlier posts in this thread) so any thoughts from the community would help.
Here's hoping I get this done by the end of the year. It'd be nice to have contributed 2 fixes to the game.
B,
neuro
- Attachments
-
- Splitter.h
- (6.75 KiB) Downloaded 65 times
-
- Splitter.cpp
- (8 KiB) Downloaded 66 times
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: FleetWnd: Adding divider between data panels
If you've added a new .cpp file, you're going to need to compile that file to use the code in it. If you're getting linker errors about undefined symbols of the class in question, it's probably because the file isn't being compiled, or isn't being linked into a library (such as GG) where it can be accessed later. Since the new file is an addition to GG, it would make most sense to add the file to your build of GG, but it might also work to add the Splitter.cpp file to FreeOrion's build just for testing purposes.neuro wrote:I don't know if I need to recompile the GG build to include this or not... I've had issues with recompiling GG before (see earlier posts in this thread) so any thoughts from the community would help.
Re: FleetWnd: Adding divider between data panels
Good call. I drag-dropped the Splitter.cpp file into my Target/GG/Compile Sources area in XCode and ran build...got a whole bunch of new errors / issues but none linking, which is great!Since the new file is an addition to GG, it would make most sense to add the file to your build of GG, but it might also work to add the Splitter.cpp file to FreeOrion's build just for testing purposes.
Turns out I had a LOT more work to do... fixing properties, method definitions, Signal event hookups...the works.
But I finally got it to show up on the FleetWnd! That's exciting.
Now I'm working on actually POSITIONING it properly. Then the left-click-and-drop signaling... but at least I'm able to see the results and test it out.
Thanks! You should hear more progress on it.
Re: FleetWnd: Adding divider between data panels
Hey All!
So 9 months later I think I have this new GG::Splitter ready to demo.
You check out screenshots of it here:
http://domandtom.com/freeorion/_splitter/splitter_9.png
http://domandtom.com/freeorion/_splitte ... ter_10.png
http://domandtom.com/freeorion/_splitte ... ter_11.png
I might need artwork since it's using default background and tab for selection.
But it splits both windows in the FleetWnd, is draggable, and looks great if you resize the window.
Still debugging it a bit but it should be coming soon (er than another 9 months...)
Just wanted to post progress! And looking forward to my next task.
So 9 months later I think I have this new GG::Splitter ready to demo.
You check out screenshots of it here:
http://domandtom.com/freeorion/_splitter/splitter_9.png
http://domandtom.com/freeorion/_splitte ... ter_10.png
http://domandtom.com/freeorion/_splitte ... ter_11.png
I might need artwork since it's using default background and tab for selection.
But it splits both windows in the FleetWnd, is draggable, and looks great if you resize the window.
Still debugging it a bit but it should be coming soon (er than another 9 months...)
Just wanted to post progress! And looking forward to my next task.
Re: FleetWnd: Adding divider between data panels
Excellent! Could you clarify what you need exactly? What resolution?
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: FleetWnd: Adding divider between data panels
Cool.
I'd slim the divider down a little, and style it like this:
Most of these window bits are vectors created by the game right?
I'd slim the divider down a little, and style it like this:
Most of these window bits are vectors created by the game right?
- Attachments
-
- window slider.png (34.84 KiB) Viewed 1312 times
Re: FleetWnd: Adding divider between data panels
Not sure what I need... It's 14 px in height right now. I can change that.
The background is black and the tab itself is "GG::Grey".
Remember that 3 dot png you proposed a while back? If you send me a private message with a link to it I can download it and replace the tab with that.
Geoff said make everything in GL but I'm not sure what that means.
Give me a pixel width and any artwork you want. Just remember it's a GG component so it'll be used in a variety of windows and meant to handle vertical as well as horizontal splitting. I'm hoping, if it proves popular, it can be used in other ux/ui views. The 3 dots version should work...
EDIT:
Just reread the above post. I think I'll have to make the dots dynamically. Yes, most of the view code I've read is meant to draw elements dynamically (eg vector) for border, background, lines, etc. I'll see about doing that and centering them. Might have to find an example somewhere that draws dots.
The background is black and the tab itself is "GG::Grey".
Remember that 3 dot png you proposed a while back? If you send me a private message with a link to it I can download it and replace the tab with that.
Geoff said make everything in GL but I'm not sure what that means.
Give me a pixel width and any artwork you want. Just remember it's a GG component so it'll be used in a variety of windows and meant to handle vertical as well as horizontal splitting. I'm hoping, if it proves popular, it can be used in other ux/ui views. The 3 dots version should work...
EDIT:
Just reread the above post. I think I'll have to make the dots dynamically. Yes, most of the view code I've read is meant to draw elements dynamically (eg vector) for border, background, lines, etc. I'll see about doing that and centering them. Might have to find an example somewhere that draws dots.