Del69
Chieftain
Looks fantastic and I want to play with it. is this in BUG? What is the key strokes to bring this puppy up?
Atm its in the Strategy Overlay.xml in config, Alt F10 and Ctrl F10 was what i threw into it for a default. Would have only done 1 but I wanted to make sure it worked with a couple keys.
Just unzip that last attachment into CustomAssets and it'll be good to go. I put what the 2 files it wants to overwrite have changed in the install.txt so if you want to do manual merges its like 2 lines of code is all.
For example, the stuff in XML would need to go back into Python
Which stuff? The game text or the key config part?
Actually shouldn't need to alter MI at all, (I avoid that monstrousity like the plague unless i need to get in there). Just call CyInterface().setShowInterface( InterfaceVisibility.INTERFACE_HIDE_ALL) or maybe InterfaceVisibility.INTERFACE_HIDE (I think this is the globe view hide) when the screen is opened and the reverse when closed. Should work with one of them. Also just dawned on me I never bothered to check if the city screen is up or not when it opens/closes...
My original plan was to do a WB style tab control thing but all the WB code for building those tab controls is hidden somewhere (probably a cpp file i didn't look in), figured I'd want fairly concrete example stuff for my first mod Was kinda planning on working toward a more minimal style UI where you had one box with your main options and as you added/removed from those you got a panel with the options for that main selection to popup/remove.
One of those "text is usually easier to deal with the first time around" things
Kinda tossing around a custom class for a panels info that can do a dynamic layout for itself. Too many damn hardcoded coordinates as is. Key to doing this would be making it easy to use for most anything so it would become more a general panel utility instead of specific to this case. Probably something really simple like for building a grid of widgets X wide x Y tall with a title some hover text and sizing itself to whatever you popped into it.
I was kinda on the fence on making a right click remove style just because it allows input it doesn't eat to go through to the main ui. So if somebody had those right click popups they could use those (although come to think of it, it really should just eat everything that doesn't move the camera).
Also think I figured out a sneaky way of making the add/remove line stuff work. By making buttons named exactly the same as the ones on the world level strategy overlay and messing around with the CyGlobeLayerManager, I can activate/deactivate the add/remove/delete lines. There is also a interfacemode called GLOBE_LAYER_INPUT which does just what it sounds like no matter if the globe layer is up or not.
Did some more work on the signs too, basically the new version i'm working on interrupts any calls to the interface being set in add sign mode and brings up the add sign interface and sends the call that way whenever the screen is up. So doing that I can completely separate signs done in and out of its interface which it properly saves/restores now too. So you have 2 groups of signs, "always display" and "only show when the overlay is up". If they conflict, it shows the ones from the "overlay group" when the screen is up and puts back the "always show" group when it closes.
Also had a bunch of memory allocations and fun C++ blowups when having it up and zooming out to globe view for some reason so I made it auto-close when you zoom out that far. I think I'm pushing what they meant the interface to do a bit
By stand-alone do you mean a separate release from BUG? If so, which is totally cool, are you willing to maintain both versions? I ask because I'd like to maybe add some stuff to it, and we'll need to figure out the best way to do the coding.
Really I don't think its going to be feasible, looking at where its going there is gonna be too much reliance on BUG's utils and event manager functions for it to be less than a nightmare to maintain both. At the very least I'd be looking at either adding the custom event manager to the standalone version, and programming experience says I'll find 4597843 other things that need to be changed to make it work.
I figured there was something I was missing on the stuff added to CvUtil and how it went with BUG. If you want I can do a writeup for how to do those python popups, haven't found one for ones that actually have controls and you can get back a CvPopupReturn object to get the values out. Popups with listboxes, dropdownboxes, checkboxes, spinners, and Tables are mucho easier to build than screens from what i've done so far. I've only seen how to do ones using the CvPopupInfo style ones where you can click 1 of a number of buttons for your selection options. I'll wait till I see what you do to BUGify the code first though, I'm sure there will be a few things that are done different.
I tell ya though the further I dig into the screen building and whatnot the more i think Firaxis has a visual.net style interface builder app they are hiding up their sleeves. Usually hand coded stuff doesn't have nearly so many hard coordinates in it