Home » MODDING HQ 1.13 » v1.13 Coding Talk » My popup widget (again) along with a demo
Re: My popup widget (again) along with a demo[message #300392] Mon, 27 February 2012 02:16 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Update:
http://www.fileden.com/files/2008/7/29/2025585/morePopups.png

popup class:

Fixed subpopups (broke in previous release)
Fixed subpopup relative positioning (now they align nicely)
Added proper popup width estimating
Fixed some sanity checks
Subpopups now display shaded if they are empty
Subpopups can now have fancy colors

Inventory pocket popups:
Added popups for:
- LBE slots (combat pack, back pack, thigh rigs, vest)
- Knife pocket
- Face items
- Armor slots
- Hand and gun sling slots (don't work well with a lot of items yet)
Added grenade selector to LBE pocket popups (above ammo selector)
Added ctrl-click menu with all of the above, for any slot.
When picking items, the best ones are selected by default. Picking the best stack is kinda sketchy, but picking the best out of the first stack works.

Additionally, I've made a bunch of useful functions for getting stuff out of sector inventory and making other popups related to inv pockets, in case anyone else is playing with this stuff right now.

updated exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release_27-02-2012.7z
updated, old version exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release_old_27-02-2012.7z
source: http://www.fileden.com/files/2008/7/29/2025585/src_27-02-2012.7z

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #300395] Mon, 27 February 2012 02:33 Go to previous messageGo to next message
Gambigobilla

 
Messages:693
Registered:July 2008
Sir, you deserve a huge bag of gummy bears.

Report message to a moderator

First Sergeant
Re: My popup widget (again) along with a demo[message #300413] Mon, 27 February 2012 11:06 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1410
Registered:July 2006
Location: People riding polar bears...
Bear hug!

Report message to a moderator

Sergeant Major
Re: My popup widget (again) along with a demo[message #300449] Tue, 28 February 2012 00:54 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
minor update:
http://www.fileden.com/files/2008/7/29/2025585/morePopups2.png
Popups can display quite a lot of stuff without crashing Smile

popup class:

Made subPopups highlight yellow when selected
Made subPopups clean up the screen after closing (force redraw, only in strategic for now)
Added a function to estimate popup height (needs some tweaking)


Inventory pocket popups:
Fixed and simplified the selection of best available items
Fixed positioning of long lists of stuff


updated exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release_27-02-2012_2.7z
updated, old version exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release_old_27-02-2012_2.7z
source: http://www.fileden.com/files/2008/7/29/2025585/src_27-02-2012_2.7z

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #300879] Sat, 03 March 2012 22:10 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
update:
http://www.fileden.com/files/2008/7/29/2025585/itemPopups2.png

popup class:
- fixed code to add a previously created subpopup to a popup box
- fixed code that changed popup option names

new - popup definitions:
- added runtime popup definition class

The popup definitions allow coders to store popup box templates and then apply them to existing boxes. The definitions may contain options with simple callbacks, submenus and generators.
The generators, in the simplest sense, are functions that take a pointer to a popup menu and add options to it. At this time, the generators are taken from a fixed index and can take no parameters.
While limited, popup definitions might help organizing static popup boxes.

The code is currently specialized for the inventory popups, but could be easily adapted for other purposes.

For details, see:
Build\Utils\popup_definition.cpp
Build\Utils\popup_definition.h

new - popup boxes defined in xml:

While not quite ready yet for general use, I've written a parser that converts xml code into popup definitions.
It reads in "PocketPopups.xml" and maps popup definitions to inventory pocket types, specialising the inventory popups for each pocket.
The xml syntax is very simple and its possibilities equally limited. While fun to work with, xml popup definitions don't offer much flexibility beyond rearranging static popus.

For details, see:
Build\Tactical\XML_LBEPocketPopup.cpp
GameDir\Data-AIM\TableData\PocketPopups.xml ( for AIMNAS21 )
GameDir\Data-1.13\TableData\PocketPopups.xml ( for 1.13 unstable )

inventory popups:
- fixed magazine counts for ammo-list generator
- added item counts for non-ammo slots
- non-ammo items are now stacked to full pocket capacity
- made pocketTypeInSlot() return -1 for all LBE slots
- divided weapon list submenu between weapon types
- separated grenades, rifle grenades and rpg rockets
- separated one-shot launchers from grenade launchers/reloadable rocket launchers
- added generators for misc items and kits
- specialised pocket popups for 1.13
- specialised pocket popups for AIMNAS21

note that my code is now [color:#CC0000]outdated[/color], I've yet to update it to latest SVN.


gamedir files: http://www.fileden.com/files/2008/7/29/2025585/GameDir-03_03_2012.7z
updated exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release-03_03_2012.7z
updated, old version exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_PO_Release_old-03_03_2012.7z
source: http://www.fileden.com/files/2008/7/29/2025585/Build-03_03_2012.7z

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #300923] Sun, 04 March 2012 12:23 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1410
Registered:July 2006
Location: People riding polar bears...
Feeling lazy so I'll just ask instead of testing.
This thing got any ini options? You know, varying levels of complexity and all that.

Report message to a moderator

Sergeant Major
Re: My popup widget (again) along with a demo[message #300924] Sun, 04 March 2012 12:46 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Planned but not yet implemented. What kind of options would you like anyway?

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #300926] Sun, 04 March 2012 12:58 Go to previous messageGo to next message
Randok is currently offline Randok

 
Messages:323
Registered:March 2004
Are you could do this function?
I go to the shop BR. I choose a weapon. I see a list of attachments to this weapon. From this list, I would immediately choose things to buy (no additional finding attachments to the weapon). It would be faster and more efficiently.

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #300980] Mon, 05 March 2012 04:24 Go to previous messageGo to next message
cdudau
I like that idea Randok.

Report message to a moderator

Re: My popup widget (again) along with a demo[message #301008] Mon, 05 March 2012 14:03 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1410
Registered:July 2006
Location: People riding polar bears...
The_Bob
Planned but not yet implemented. What kind of options would you like anyway?

Pretty sure I had something in mind but it slipped away. Disregard my comment. :crazy:

Report message to a moderator

Sergeant Major
Re: My popup widget (again) along with a demo[message #301015] Mon, 05 March 2012 15:14 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
how about these options:
global enable/disable
switches for where popups appear (on/off):
-LBE slots (vest, combat pack, back pack, thigh rigs)
-body slots (armor,head hear)
-hands, knife, gun sling
-LBE pockets

menus for body and LBE slots will likely be hardcoded, the rest will reside in two xml files, one for specific LBE pockets, other for default popup for pockets and popups for hand/gun sling/knife slots

[Updated on: Mon, 05 March 2012 15:16] by Moderator

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #301029] Mon, 05 March 2012 18:36 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3717
Registered:February 2006
Location: Scotland
Those look good , and Randoks suggestion could be a winner if possible ?

Report message to a moderator

Captain

Re: My popup widget (again) along with a demo[message #301953] Sun, 18 March 2012 22:13 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
This is great stuff. I've been using it in my own dev build for a while now. Not sure how much externalization is required, as it's one of those features that stays out of sight until you want to use it.

Anyone have any objections to adding these popups to the dev trunk?

Report message to a moderator

First Sergeant

Re: My popup widget (again) along with a demo[message #301973] Mon, 19 March 2012 15:29 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
The project is on hold due to coffee maker malfunction.

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #301974] Mon, 19 March 2012 15:49 Go to previous messageGo to next message
Sam Hotte

 
Messages:1965
Registered:March 2009
Location: Middle of Germany
Holy Crap! Failure of the HTCPCP Server?
Look at RFC 2324 for help!

May the caffeine be with you!
Smile

Report message to a moderator

Sergeant Major
Re: My popup widget (again) along with a demo[message #304423] Sun, 06 May 2012 00:36 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
update:
inventory popups:
- added option (opt. screen and .ini) to disable the popups
- added full translation support

quick attachment popup:
- added search for least damaged attachment in sector (this needs some testing...)

Also...
- Translated my popups' and other option screen options into Polish

updated exe: http://www.fileden.com/files/2008/7/29/2025585/JA2_EN_Release_5-5-2012.7z
patch file: http://www.fileden.com/files/2008/7/29/2025585/popups_5-5-2012.patch
source (SVN 5262): http://www.fileden.com/files/2008/7/29/2025585/code_5-5-2012.7z

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #304502] Tue, 08 May 2012 17:04 Go to previous messageGo to next message
Nixou is currently offline Nixou

 
Messages:56
Registered:January 2008
Location: France
Sorry for dumb question, but did RoWA integrate it to the trunk?

Report message to a moderator

Corporal
Re: My popup widget (again) along with a demo[message #304503] Tue, 08 May 2012 17:44 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Not sure about the last update but some version is already in the latest SCI.

[Updated on: Tue, 08 May 2012 17:45] by Moderator

Report message to a moderator

Master Sergeant
Re: My popup widget (again) along with a demo[message #307981] Mon, 23 July 2012 15:50 Go to previous message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
@all: I have just merged the latest popup code.

Report message to a moderator

Sergeant Major

Previous Topic: New BR Misc Filters
Next Topic: STOMP ( v1.2 )
Goto Forum:
  


Current Time: Wed Nov 27 04:24:48 GMT+2 2024

Total time taken to generate the page: 0.01561 seconds