Closed timfel closed 8 years ago
(by erstmap) This info panel better solve world hunger or something.
(by dinky-dye-aussie) Oh shoosh you! :P
(by joris-dauphin) Disabled code compiles now, (but untested). rev. 8661
(by erstmap) It didn't work, there are still starving pygmies in Africa.
(by dinky-dye-aussie) So another question. What revision (because I've seen stratagus 2.1 in action and that version has the popup code working) of Stratagus (i.e. what trunk version) has the code still in it that makes this work? I have been looking through the freecraft 1.18 code to see how the code works, but it is completely different to the Stratagus code (obviously) and I spent some time yesterday fishing back through the trunk releases but haven't gone all the way back yet. So I will do that now and see what I can find...
I just want this to work, then I will being so persistent about it. I don't know why the BOSWars team had to get rid of it in the first place...Couldn't they of just left it with an option to disable it???
(by erstmap) The BOS guys just like ripping everything out that isn't used. I used to report bugs for disabled features and they'd remove the feature completely instead of fixing it. :/
(by dinky-dye-aussie) Well that sucks. I found that revision 6068/6069 is when the changeover occured. It'd be as simple as putting the code back in right? to make this infopanel thing work again...right? Simple as that?
(by dinky-dye-aussie) I was thinking hard again last night about this infopanel thing I've been yacking on about for what seems like an eternity...
Why not have the panels loading like an icon? Icons have frames and the lua code is quite simple to do. The only thing is that instead of using the:
Code: icon.G = CGraphic:New("tilesets/" .. wargus.tileset .. "/icons.png", 46, 38)
that loads the icon file, would I be able to do this?
Code: icon.G = CGraphic:New("ui/" .. wargus.race .. "/infopanel.png", 176, 176)
Then I just use the same lookup table that is in icons.lua, in a new file dedicated to the infopanel...problem solved!
(by erstmap) That's brilliant. Come to the chat room.
(by iddqd-mail) The infopanel code works correctly now, si I suggest this issue is solved.
(by dinky-dye-aussie) OK, so how do I get this to work, if it works? What "code" do I use to get it working?
Show me...Please.
(by iddqd-mail) An year ago Joris has uncommented the code responsible of infopanel drawing (you can see his post about that in this thread)
(by dinky-dye-aussie) Yes I know he's done that, but you created new DefinePopup code to use in doomwars. Just how do implant this code to get the graphics in infopanel.PNG to behave properly?
(by dinky-dye-aussie) In the lua files I mean
(by iddqd-mail) Well, the DefinePopup function isn't designed to show infopanel.png graphics - it shows popups with help and information for buttons. So, to show correct graphics, we need to modify Stratagus to allow access for UI.InfoPanel.G variable from Lua. In a couple of days (I'm too busy at the moment) I will upload a fix :)
(by iddqd-mail) This is fixed now, infopanel.png works like it supposed to work in original WC2 :) Pull the latest stratagus and wargus from trunk and use them. Besides, I don't like the way of current infopanel.png handling. The number of panels is limited, and they are too hardcoded, you can only change the graphics and the position.
(by erstmap) Infopanel done? Oh no, looks like we're entering the tribulation.
(by dinky-dye-aussie) Seriously? :P
I'm glad it works. Was alot simpler looking at what had to be modded to get it working right, seeing as the c++ code was already there. All it took was 3 lua code file changes.
Thanks Cybermind :)
Now to get the Icons working like they used to in Warcraft 2/Freecraft mwaahahahahaha.
OK, so I am back on this infopanel bug, and I am trying to fight the code to try and get this feature working again...I may just copy/paste code from freecraft if it ticks me off enough...Enough talk, here's the compile-error readout stating what is wrong with the code:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 2>------ Build started: Project: stratagus, Configuration: Debug Win32 ------ 3>------ Build started: Project: version-generated.h, Configuration: Debug Win32 ------ 2> mainscr.cpp 2>..\src\ui\mainscr.cpp(1087): error C2664: 'CIcon::DrawUnitIcon' : cannot convert parameter 1 from 'ButtonStyle ' to 'const ButtonStyle &' 2> Reason: cannot convert from 'ButtonStyle ' to 'const ButtonStyle' 2> No constructor could take the source type, or constructor overload resolution was ambiguous 2>..\src\ui\mainscr.cpp(1098): error C2440: '' : cannot convert from 'CFont *' to 'CLabel'
2> No constructor could take the source type, or constructor overload resolution was ambiguous
2>..\src\ui\mainscr.cpp(1098): error C2228: left of '.Draw' must have class/struct/union
4>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
4> Build all projects
5>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
========== Build: 3 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========
I changed the #if 0 to #if 1 and this error is what popped up...Like I said I am still wanting to get this working again. Any help would be great :)
Imported from Launchpad using lp2gh.