reist Posted October 8, 2005 Report Share Posted October 8, 2005 (edited) I'm going to do this, but I want to know something first: what is the difference between a screen and a dialog?edit: Another question: Were the events and states for statistics just missed/not added, or should it not have them at all? Edited October 8, 2005 by reist Link to comment Share on other sites More sharing options...
SupSuper Posted October 8, 2005 Report Share Posted October 8, 2005 I'm going to do this, but I want to know something first: what is the difference between a screen and a dialog?Ummm... a screen takes up the whole screen while a dialog is just a window. Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 8, 2005 Report Share Posted October 8, 2005 (edited) SupSuper, options is a screen Edited October 8, 2005 by UnFleshed One Link to comment Share on other sites More sharing options...
reist Posted October 8, 2005 Author Report Share Posted October 8, 2005 Yep, I'm not asking about conceptual difference. I'm asking about the classes.For now I'm deriving from UIScreen and ModalDialog, like options, but I want to know if this is the correct way or am I supposed to do something else. Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 8, 2005 Report Share Posted October 8, 2005 I thought a bit and decided that screen is something that has a state in fsm. Dialog is... just dialog. A screen can be a dialog. Correct me if something. Link to comment Share on other sites More sharing options...
reist Posted October 10, 2005 Author Report Share Posted October 10, 2005 There's an iconset for statistics and a png file that has all the concept graphics ready to be used, but there is no schema file for it. Is anyone in charge of creating them? Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 10, 2005 Report Share Posted October 10, 2005 (edited) That png was made way before Falaguard. This graphics is already used in Xenolook . Edited October 10, 2005 by UnFleshed One Link to comment Share on other sites More sharing options...
reist Posted October 10, 2005 Author Report Share Posted October 10, 2005 (edited) Yes, everything is in XenoLook...except for one graphic that looks like a part of a drop down - exactly what is needed in the concept. It's kind of like a radio button. Looks like a Button/Left without the square on the right side.I can't use buttons there - they don't stay lighted up. Edited October 10, 2005 by reist Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 10, 2005 Report Share Posted October 10, 2005 I suggest you use regular combobox instead. No matter what is in concept. SupSuper, can you make combo's drop list to look like that? Link to comment Share on other sites More sharing options...
reist Posted October 12, 2005 Author Report Share Posted October 12, 2005 (edited) To put the graph into the window I used a convertion to texture to imageset (it stays dynamic). I used Ogre's Gui example for that (the only one I found of inserting a dynamic image into a window).Here's a link to crazy eddie's response to a very similar issue:http://www.cegui.org.uk/modules/newbb/view...=1056&forum=2#3 The graph image is behind the globe far enough and small enough not to be seen from the Statistics window no matter the scene's rotation (I hope). It's deleted when closing the window. Three question about what I'm doing:1. Does anyone know a better way to connect the graph to the window?2. Is there a way to calculate exactly what area will be seen so that setting up the camera/viewport could be done automatically and not by trying.3. Is there some way to improve the quality of the lines? The line quality is higher at higher resolutions, but this image is taken at 1024x768 and it still looks pretty bad. I also couldn't use the DynamicLines in the misc directory. The lines just weren't drawn. Line3D from Ogre's code snippets did work and that is what I used. (And yes, there are stars from the SkyBox in the graph's background )(edit: New image. The previous was small, but the lines in the graph could not be seen) Edited October 12, 2005 by reist Link to comment Share on other sites More sharing options...
reist Posted October 12, 2005 Author Report Share Posted October 12, 2005 ...I also couldn't use the DynamicLines in the misc directory. The lines just weren't drawn. Line3D from Ogre's code snippets did work and that is what I used.Scratch that. It was only the different material used in DynamicLines. Now that I added color to the lines via materials, I can use DynamicLines.Can DynamicLines' constructor be change to receive a material name? The current material name could be the default, so that current code won't change. Otherwise each time someone will want to make another line, they would have to do this:DynamicLine line;line.setMaterial(materialName); Link to comment Share on other sites More sharing options...
SupSuper Posted October 12, 2005 Report Share Posted October 12, 2005 SupSuper, can you make combo's drop list to look like that?I don't think it's possible, though I'll look into it. Link to comment Share on other sites More sharing options...
reist Posted October 15, 2005 Author Report Share Posted October 15, 2005 SupSuper, can you make combo's drop list to look like that?I don't think it's possible, though I'll look into it.Can you make a radio button to look like that instead? A combo box is not the best thing there - too many differences between it and the dropdown's behaviour. Link to comment Share on other sites More sharing options...
SupSuper Posted October 15, 2005 Report Share Posted October 15, 2005 SupSuper, can you make combo's drop list to look like that?I don't think it's possible, though I'll look into it.Can you make a radio button to look like that instead? A combo box is not the best thing there - too many differences between it and the dropdown's behaviour.Sure, added XenoLook/Button/StatsRadio. For now it's just a radio-button version of XenoLook/Button/Left, when I have time I'll fix its look Link to comment Share on other sites More sharing options...
reist Posted October 15, 2005 Author Report Share Posted October 15, 2005 Great. Thanks Link to comment Share on other sites More sharing options...
reist Posted October 17, 2005 Author Report Share Posted October 17, 2005 I'm splitting my code into a couple of classes for better control.I also have four function which don't need anything except for two or three different includes from CEGUI/Ogre.Because I split the code, the three first functions have to be somewhere else. They're included by a couple of these files.Where can I put such functions? Here's what the functions do:Clone a CEGUI widget based on an example in the layout. Only basic cloning, nothing deep like cloning windows with their components. It's really making it easier for me to construct dropdowns, coordinate text and the key map on the fly. Create a single color material. I don't know if it can be used for anything but lines...There are two functions like this - one takes an Ogre::ColourValue, and the other four floats for rgba. A texture creation function. That's part of what I use to make the graph pane show something from Ogre. I can connect the rest of the functionality together, but it's still all managed by Ogre and CEGUI. No reason to make a full class. Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 17, 2005 Report Share Posted October 17, 2005 I think those functions can go into client/misc/ (misc.cpp ) Link to comment Share on other sites More sharing options...
reist Posted October 18, 2005 Author Report Share Posted October 18, 2005 I think those functions can go into client/misc/ (misc.cpp )I put all but one into a ogreceguiservices.cpp I don't think the widget cloner can go there. It has two include from CEGUI and nothing else. It compiles in a _really_ short time The other file includes uirequisites and is as slow to compile as the rest of the code. What the functions do is also just too different. I posted a patch to the task tracker. This is how the window works:It always open to the first graph. Both dropdowns apply immediately (without closing). They are semi-transparent so they don't really interfere with seeing what's below. graph names and data sets have a long and short version. Graphs have dropdown name and title, data sets(like countries, regions...) have a short version in case there are to many sets to fit with the long version inside the key map. The long version will be used in the dropdown anyway.You can see the last screenshot for example of this. The name of elements are the same as the long text version, so you can have only one of each. That means that if two graphs use the same data set (like "US"), there'll really be only one checkbox for both graphs with the same state. Because the state of each line is taken from CEGUI windows and I never destroy them myself, state of graphs is saved when changing graphs or exiting the window. Link to comment Share on other sites More sharing options...
mikker Posted October 18, 2005 Report Share Posted October 18, 2005 I don't know much about this stuff, but... Can you use AA with DynamicLines? There appear to be quite big holes in them sometimes... Link to comment Share on other sites More sharing options...
reist Posted October 18, 2005 Author Report Share Posted October 18, 2005 The holes are because it's a texture. No aliasing possible. The graph itself (hidden out of sight) is being anti-aliased and looks great.For textures it's either that or making the lines pretty thick and broken.If any programmer knows a better way to capture a scene onto a cegui window than texturizing it, that'll be great. Link to comment Share on other sites More sharing options...
Vaaish Posted October 18, 2005 Report Share Posted October 18, 2005 is the art you have intere just placeholder until you get the functionality in because it has only passing resemblance to the concept I gave you folks. Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 18, 2005 Report Share Posted October 18, 2005 (edited) It is functionality mostly. To make it beautiful go nag SupSuper . (After I check and commit the patch, that is ). Edit:Commited. Edit2:While we at that ,.. we need a second kind of frame window (without reserved space for scroll bar). I think it is possible to make two kinds of windows with different imagesets (helI, there are at least a dozen buttons ). Edited October 18, 2005 by UnFleshed One Link to comment Share on other sites More sharing options...
red knight Posted October 19, 2005 Report Share Posted October 19, 2005 Make it work, and then make it nice, and only then make it fast (if we ever need to ). BTW, stop at the make it work step for that. GreetingsRed Knight Link to comment Share on other sites More sharing options...
SupSuper Posted October 19, 2005 Report Share Posted October 19, 2005 It is functionality mostly. To make it beautiful go nag SupSuper . (After I check and commit the patch, that is ). Edit:Commited. Edit2:While we at that ,.. we need a second kind of frame window (without reserved space for scroll bar). I think it is possible to make two kinds of windows with different imagesets (helI, there are at least a dozen buttons ).I'll work on all that after I get over a nasty hit on the head. Got 8 stitches so the doc recommends I take it easy for a while, don't want to pop my stitches from over-working Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 19, 2005 Report Share Posted October 19, 2005 SupSuper, Maybe doctor meant don't go unload cargo trains? red knight,It works now, so two phases to go . Link to comment Share on other sites More sharing options...
SupSuper Posted October 21, 2005 Report Share Posted October 21, 2005 SupSuper, Maybe doctor meant don't go unload cargo trains? Shush, let me enjoy my break from school Anyways, created a XenoLook/FrameWindow/NoScroll so you can quit bugging me about it Also, how am I supposed to tidy up the Statistics panel look? I wanted to add proper backgrounds to the graph and key, but whatever goes behind them "disappears". Like holes in the window. Link to comment Share on other sites More sharing options...
reist Posted October 21, 2005 Author Report Share Posted October 21, 2005 (edited) ...Anyways, created a XenoLook/FrameWindow/NoScroll so you can quit bugging me about it Also, how am I supposed to tidy up the Statistics panel look? I wanted to add proper backgrounds to the graph and key, but whatever goes behind them "disappears". Like holes in the window.Well, for the keys, change Statistics/ColorMap to DefaultWindow and remove the background options.The graph is more of a problem. There's no background there, just a view rendered into a rectangle. If you want something to go behind the graph, it'll have to be loaded in code and drawn behind the graph. It's possible to give the graph an alpha value, but I don't think it's a good idea. By the way, I'm going through Ogre's docs and forums. If I can't find anything to make the lines look better, I'll post a question on Ogre's forums about it. Edit: More space in the new window! AND no need to worry about what % of the window the scroll starts at Edited October 21, 2005 by reist Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 22, 2005 Report Share Posted October 22, 2005 Can one create a texture with a transparency key? Link to comment Share on other sites More sharing options...
red knight Posted October 22, 2005 Report Share Posted October 22, 2005 Unfleshed, explain to our artists exactly what you need; and they will be able to do it. GreetingsRed Knight Link to comment Share on other sites More sharing options...
UnFleshed One Posted October 22, 2005 Report Share Posted October 22, 2005 I'm not sure myself . And I think it should be done on programming level. The question is, can ogre combine two bitmaps assuming one color transparent. On the other hand, to think about that, it has to be loaded in code as well... Link to comment Share on other sites More sharing options...
reist Posted October 22, 2005 Author Report Share Posted October 22, 2005 I'm not sure myself . And I think it should be done on programming level. The question is, can ogre combine two bitmaps assuming one color transparent. On the other hand, to think about that, it has to be loaded in code as well...If it's anything 2d or 3d, Ogre can. The problem is finding out how. Link to comment Share on other sites More sharing options...
red knight Posted October 29, 2005 Report Share Posted October 29, 2005 Look for texture blending states GreetingsRed Knight Link to comment Share on other sites More sharing options...
Beetle Posted January 4, 2006 Report Share Posted January 4, 2006 Currently in statistics view there is something like leading point. I mean first point which is added to graph is not inlcuded in x axis. (check the picture) Don't know if this is a problem or is it suppose to be like that, what do You think? For me is not any problem at all, just pull out one more value from history, so this is rather stylistic question Beetle Link to comment Share on other sites More sharing options...
reist Posted January 5, 2006 Author Report Share Posted January 5, 2006 (edited) That's because I've used line3d to draw the graph. I don't think it works for single dots. You need at least two.This way there'll always be a need for a "before" point. At the start of the game, we can just put 0 there. The moment a month/day/whatever passes, the lines will start showing. Edited January 5, 2006 by reist Link to comment Share on other sites More sharing options...
UnFleshed One Posted January 7, 2006 Report Share Posted January 7, 2006 Take a look at that:http://bugs.projectxenocide.com/view_bug.php?bug_id=201 http://bugs.projectxenocide.com/files/90457147.png Link to comment Share on other sites More sharing options...
UnFleshed One Posted January 8, 2006 Report Share Posted January 8, 2006 Ok, can somebody confirm the bug? I'm starting to suspect my system... Link to comment Share on other sites More sharing options...
red knight Posted January 8, 2006 Report Share Posted January 8, 2006 That looks like a driver problem, I have seen stuff like that before. GreetingsRed Knight Link to comment Share on other sites More sharing options...
Darkhomb Posted January 8, 2006 Report Share Posted January 8, 2006 It displays that in both modes or just one and which? Link to comment Share on other sites More sharing options...
UnFleshed One Posted January 8, 2006 Report Share Posted January 8, 2006 (edited) Only OpenGL. Also, Statistics graph is scaled wrong in OGL. I can fix the earth by doingrttViewport->setOverlaysEnabled(false);andrttViewport->setOverlaysEnabled(true);in publishImpl() and unpublishImpl(). (vewport is the one that is used to make a texture for graph). But the graph itself is still scaled wrong, so that's not a solution... I updated drivers yesterday, and everything is still the same. Does anybody with GeForce FX 5200 sees the same thing? Edited January 8, 2006 by UnFleshed One Link to comment Share on other sites More sharing options...
Darkhomb Posted January 10, 2006 Report Share Posted January 10, 2006 Has it always been like that or when did it start, Did you change anything when it did (Video drivers etc) what version of forceware drivers are you running. I would say to reinstall directx but as its open gl That seems weird. Is it just that build of xenocide? Or the other have always done this to you? Link to comment Share on other sites More sharing options...
UnFleshed One Posted January 11, 2006 Report Share Posted January 11, 2006 (edited) I noticed it just recently, so the build is one of the latest (it was current when I filed the bug ). It seems it wasn't there when statistics was first implemented. (I did the testing and commiting, and that's pretty noticable aftereffect, even for me ). Updated drivers a couple of days ago, so that's current too. I haven't buld xenocide for a while, so I'm not sure when it started... and also that's a second bug only I have. So I guess that's my system (which wasn't reinstalled, as all windows must, for quite a while). Edit:Yeah, that was my problem only. I guess when I tried to update dependencies (unsuccessfully) I didn't quite manage to revert them back . With branches merged and dependencies updated all went away. Edited January 11, 2006 by UnFleshed One Link to comment Share on other sites More sharing options...
Recommended Posts