You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(11) |
Apr
(47) |
May
(14) |
Jun
|
Jul
(73) |
Aug
(4) |
Sep
(2) |
Oct
(60) |
Nov
(48) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(1) |
Mar
(27) |
Apr
(82) |
May
(89) |
Jun
(91) |
Jul
(44) |
Aug
(53) |
Sep
(113) |
Oct
(20) |
Nov
(37) |
Dec
(10) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(21) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(76) |
Feb
(89) |
Mar
(52) |
Apr
(11) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(27) |
2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(14) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: spom_spom <spo...@us...> - 2011-12-19 13:56:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via df89731d59fad18206b850e57640a2a6f5d8239f (commit) from bdde9a7667ec7ac7948cd0060e8744abf43f34c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit df89731d59fad18206b850e57640a2a6f5d8239f Author: spom <spo...@so...> Date: Mon Dec 19 14:55:32 2011 +0100 fix some bugs ----------------------------------------------------------------------- Summary of changes: src/Sector.cpp | 11 +++- src/Sector.h | 2 +- src/SectorSkyBox.cpp | 26 +++----- src/SectorSkyBox.h | 2 +- src/sectorobjects/SectorEnvironmentObject.cpp | 39 ------------ src/state/UnDockedState.cpp | 80 ++++++++----------------- 6 files changed, 46 insertions(+), 114 deletions(-) hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-12-18 22:03:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via bdde9a7667ec7ac7948cd0060e8744abf43f34c3 (commit) from 3526ff67f406582b3956046c1f5e36cd02a5b2c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bdde9a7667ec7ac7948cd0060e8744abf43f34c3 Author: spom <spo...@so...> Date: Sun Dec 18 23:02:31 2011 +0100 minor cleanups ----------------------------------------------------------------------- Summary of changes: data | 2 +- src/Makefile.am | 2 + src/Opengate.h | 4 +- src/Sector.cpp | 132 ++-------------- src/Sector.h | 74 +--------- src/SectorSkyBox.cpp | 222 +++++++++++++++++++++++++++ src/SectorSkyBox.h | 141 +++++++++++++++++ src/blueprints/BluePrint.cpp | 4 +- src/manager/ResourceManager.cpp | 25 +--- src/objects/Radar.h | 3 + src/objects/Vessel.cpp | 1 + src/sectorobjects/SectorEnvironmentObject.h | 2 + src/sectorobjects/SectorMeshObject.cpp | 99 ------------ src/sectorobjects/SectorMeshObject.h | 43 ----- 14 files changed, 398 insertions(+), 356 deletions(-) create mode 100644 src/SectorSkyBox.cpp create mode 100644 src/SectorSkyBox.h hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-12-18 16:56:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via 3526ff67f406582b3956046c1f5e36cd02a5b2c4 (commit) via 2e4dc97012dcfed0c807dc16d4ca194905a4fa75 (commit) from 699047c02271a0551f2daca4fc0b2646124db644 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3526ff67f406582b3956046c1f5e36cd02a5b2c4 Author: spom <spo...@so...> Date: Sun Dec 18 17:54:54 2011 +0100 minors commit 2e4dc97012dcfed0c807dc16d4ca194905a4fa75 Author: spom <spo...@so...> Date: Sat Dec 17 18:50:13 2011 +0100 trans ----------------------------------------------------------------------- Summary of changes: data | 2 +- src/Sector.cpp | 142 ++++++++++++++++++------- src/Sector.h | 28 ++++-- src/sectorobjects/SectorEnvironmentObject.cpp | 8 +- src/sectorobjects/SectorMeshObject.cpp | 98 +++++++++--------- src/sectorobjects/SectorMeshObject.h | 10 +- src/state/UnDockedState.cpp | 8 +- src/state/UnDockedState.h | 2 + 8 files changed, 192 insertions(+), 106 deletions(-) hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-12-18 16:32:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via 17057f7119b5536d258050e6c6dcefa4c18ab75d (commit) from f773559a3db9d3888a989a1e193cdf74d8ee0753 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 17057f7119b5536d258050e6c6dcefa4c18ab75d Author: spom <spo...@so...> Date: Sun Dec 18 17:31:01 2011 +0100 win32 commit ----------------------------------------------------------------------- Summary of changes: gui/imagesets/opengate.imageset | 2 + misc/test.sector | 41 ++------------------------------------ 2 files changed, 5 insertions(+), 38 deletions(-) hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-12-18 16:30:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via 699047c02271a0551f2daca4fc0b2646124db644 (commit) via 205b28e7d9934c691e891dfde9398139c342007f (commit) from 86eac5f416d5f0af1dea0a303a829b1447d8ff83 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 699047c02271a0551f2daca4fc0b2646124db644 Author: spom <spo...@so...> Date: Sun Dec 18 17:23:06 2011 +0100 forgot file commit 205b28e7d9934c691e891dfde9398139c342007f Author: spom <spo...@so...> Date: Sun Dec 18 17:22:16 2011 +0100 win32 commit works in generally but very buggy ----------------------------------------------------------------------- Summary of changes: src/metaserver.cpp | 6 +- src/opengateclient.cpp | 7 ++- win32/ogsectorclient/ogreopcode.cbp | 23 ++++--- win32/ogsectorclient/ogreopcode.dll | Bin 308224 -> 857088 bytes win32/ogsectorclient/ogsectorclient.cbp | 86 ++++++++++++------------- win32/ogsectorclient/ogsectorclient.exe | Bin 1615374 -> 1985038 bytes win32/ogsectorclient/opcode.cbp | 13 ++-- win32/ogsectorclient/opcode.dll | Bin 1016832 -> 1015808 bytes win32/ogsectorclient/opengateclient.workspace | 4 +- win32/ogsectorclient/resources.cfg | 72 ++++++++++---------- 10 files changed, 106 insertions(+), 105 deletions(-) hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-12-17 17:25:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via 86eac5f416d5f0af1dea0a303a829b1447d8ff83 (commit) from f121bf6138b3c8e631d130f61d1921e19aeb6092 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 86eac5f416d5f0af1dea0a303a829b1447d8ff83 Author: spom <spo...@us...> Date: Sat Dec 17 18:18:53 2011 +0100 win32 version bump and compatibility commit (untestet) ----------------------------------------------------------------------- Summary of changes: win32/ogsectorclient/CEGUIBase.dll | Bin 3471872 -> 3482624 bytes win32/ogsectorclient/CEGUIExpatParser.dll | Bin 239616 -> 239616 bytes win32/ogsectorclient/CEGUIFalagardWRBase.dll | Bin 399360 -> 399360 bytes win32/ogsectorclient/CEGUIOgreRenderer.dll | Bin 668672 -> 662016 bytes win32/ogsectorclient/CEGUITinyXMLParser.dll | Bin 186368 -> 186368 bytes win32/ogsectorclient/OgreMain.dll | Bin 8720384 -> 11340800 bytes win32/ogsectorclient/Plugin_CgProgramManager.dll | Bin 817664 -> 309248 bytes win32/ogsectorclient/Plugin_ParticleFX.dll | Bin 714240 -> 216576 bytes win32/ogsectorclient/RenderSystem_Direct3D9.dll | Bin 1403392 -> 882176 bytes win32/ogsectorclient/RenderSystem_GL.dll | Bin 1701376 -> 1269248 bytes win32/ogsectorclient/cg.dll | Bin 5615616 -> 6371944 bytes win32/ogsectorclient/libOIS.dll | Bin 0 -> 99328 bytes ...ad-mt.dll => libboost_thread-mgw45-mt-1_44.dll} | Bin 140784 -> 140784 bytes win32/ogsectorclient/ogreopcode.dll | Bin 865280 -> 308224 bytes win32/ogsectorclient/ogsectorclient.exe | Bin 3447958 -> 1615374 bytes win32/ogsectorclient/ois.dll | Bin 542720 -> 0 bytes win32/ogsectorclient/opcode.dll | Bin 1015808 -> 1016832 bytes 17 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 win32/ogsectorclient/libOIS.dll copy win32/ogsectorclient/{libboost_thread-mt.dll => libboost_thread-mgw45-mt-1_44.dll} (75%) delete mode 100644 win32/ogsectorclient/ois.dll hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-12-17 17:15:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via f773559a3db9d3888a989a1e193cdf74d8ee0753 (commit) from d29d10d752d6028c70b860af6d216140a7656094 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f773559a3db9d3888a989a1e193cdf74d8ee0753 Author: spom <spo...@us...> Date: Sat Dec 17 18:14:37 2011 +0100 removed unused stuff ----------------------------------------------------------------------- Summary of changes: stations/octavius_core.xml | 11 ----------- stations/tauseti_core.xml | 11 ----------- 2 files changed, 0 insertions(+), 22 deletions(-) delete mode 100644 stations/octavius_core.xml delete mode 100644 stations/tauseti_core.xml hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-12-17 17:10:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via d29d10d752d6028c70b860af6d216140a7656094 (commit) from aab0e89056abd277326292ed0dc9202640c1149c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d29d10d752d6028c70b860af6d216140a7656094 Author: spom <spo...@us...> Date: Sat Dec 17 18:09:24 2011 +0100 removed unused stuff ----------------------------------------------------------------------- Summary of changes: ships/octavius/condor/condor.xml | 30 ------------------------------ ships/octavius/phoenix/phoenix.xml | 33 --------------------------------- ships/quantar/typhoon/typhoon.xml | 30 ------------------------------ 3 files changed, 0 insertions(+), 93 deletions(-) delete mode 100644 ships/octavius/condor/condor.xml delete mode 100644 ships/octavius/phoenix/phoenix.xml delete mode 100644 ships/quantar/typhoon/typhoon.xml hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-12-17 16:25:40
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via aab0e89056abd277326292ed0dc9202640c1149c (commit) via 4a0ea631e7e2d182538b0620bfd00c8a231d685a (commit) from 72d335c61a0e35aefde04bd4b7dca1d2b392c94f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit aab0e89056abd277326292ed0dc9202640c1149c Author: spom <spo...@so...> Date: Sat Dec 17 17:24:58 2011 +0100 fix some minor gui glitches commit 4a0ea631e7e2d182538b0620bfd00c8a231d685a Author: spom <spo...@so...> Date: Sat Dec 17 17:10:21 2011 +0100 trans ----------------------------------------------------------------------- Summary of changes: gui/imagesets/opengate.imageset | 1 + gui/layouts/dialogs/MarketDialog.layout | 3 --- gui/looknfeel/opengate.looknfeel | 2 +- materials/scripts/station.material | 7 ++----- stations/Station.mesh | Bin 717327 -> 834445 bytes 5 files changed, 4 insertions(+), 9 deletions(-) hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-12-17 14:05:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via 72d335c61a0e35aefde04bd4b7dca1d2b392c94f (commit) via be75ede80dc54d8a30383bfbd029eef18fa8d5a2 (commit) from 393a27fab5971199478bde491eadc5f9a8344bbd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 72d335c61a0e35aefde04bd4b7dca1d2b392c94f Merge: be75ede 393a27f Author: spom <spo...@us...> Date: Sat Dec 17 14:52:46 2011 +0100 Merge branch 'master' of ssh://opengate.git.sourceforge.net/gitroot/opengate/opengate-data commit be75ede80dc54d8a30383bfbd029eef18fa8d5a2 Author: spom <spo...@us...> Date: Sat Dec 17 14:44:59 2011 +0100 reorded ships, remove unused ----------------------------------------------------------------------- Summary of changes: ships/escape_capsule.xml | 12 ------ .../{squid_1/squid_1.mesh => squid/squid.mesh} | Bin 915975 -> 915975 bytes ships/squadrok/{squid_1 => squid}/squid_1.xml | 15 ++++---- ships/squadrok/squid_2/squid_2.mesh | Bin 915975 -> 0 bytes ships/squadrok/squid_2/squid_2.xml | 21 ----------- ships/squadrok/squid_3/squid_3.mesh | Bin 915975 -> 0 bytes ships/squadrok/squid_3/squid_3.xml | 21 ----------- ships/squadrok/thruster.png | Bin 16892 -> 0 bytes ships/tauseti/catcher/1.png | Bin 90790 -> 0 bytes ships/tauseti/intensity/intensity.material | 21 ----------- ships/tauseti/intensity/intensity.mesh | Bin 63772 -> 0 bytes ships/tauseti/intensity/intensity.png | Bin 111525 -> 0 bytes ships/tauseti/intensity/intensity.xml | 39 -------------------- ships/tauseti/lady_kickstart/premia.png | Bin 89453 -> 0 bytes ships/tauseti/pioneer/pioneer.material | 20 ---------- ships/tauseti/pioneer/pioneer.mesh | Bin 60515 -> 0 bytes ships/tauseti/pioneer/pioneer.png | Bin 95815 -> 0 bytes ships/tauseti/pioneer/pioneer.xml | 39 -------------------- 18 files changed, 8 insertions(+), 180 deletions(-) delete mode 100644 ships/escape_capsule.xml rename ships/squadrok/{squid_1/squid_1.mesh => squid/squid.mesh} (100%) rename ships/squadrok/{squid_1 => squid}/squid_1.xml (62%) delete mode 100644 ships/squadrok/squid_2/squid_2.mesh delete mode 100644 ships/squadrok/squid_2/squid_2.xml delete mode 100644 ships/squadrok/squid_3/squid_3.mesh delete mode 100644 ships/squadrok/squid_3/squid_3.xml delete mode 100644 ships/squadrok/thruster.png delete mode 100644 ships/tauseti/catcher/1.png delete mode 100644 ships/tauseti/intensity/intensity.material delete mode 100644 ships/tauseti/intensity/intensity.mesh delete mode 100644 ships/tauseti/intensity/intensity.png delete mode 100644 ships/tauseti/intensity/intensity.xml delete mode 100644 ships/tauseti/lady_kickstart/premia.png delete mode 100644 ships/tauseti/pioneer/pioneer.material delete mode 100644 ships/tauseti/pioneer/pioneer.mesh delete mode 100644 ships/tauseti/pioneer/pioneer.png delete mode 100644 ships/tauseti/pioneer/pioneer.xml hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-12-17 11:08:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via 3010193f8864f9a4425e864552aa92a4a2b2bd6b (commit) from 015fb4567c53fb20de196ef1257a7279431f00c2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3010193f8864f9a4425e864552aa92a4a2b2bd6b Author: spom <spo...@so...> Date: Sat Dec 17 12:07:27 2011 +0100 changed dynamic skybox into overlapping viewports ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/pyopengate/Makefile | 2 +- ogEditor/apps/opengate/pyopengate/build.sh | 1 + ogEditor/apps/opengate/test/planetShaderTest.py | 149 +++++++++++++++++--- .../apps/opengate/test/reflMapMedia/refl.material | 4 +- ogEditor/apps/opengate/test/reflMapTest.py | 95 +++++++++---- ogEditor/apps/opengate/test/resources.cfg | 1 + ogEditor/apps/opengate/test/testAppFrameWork.py | 55 +++++++- .../opengate/test/workTmp/apteryx-v2.0-2.57.blend | Bin 1153156 -> 1113564 bytes ogEditor/wxOgre/OgreWindowWx.py | 5 +- 9 files changed, 255 insertions(+), 57 deletions(-) hooks/post-receive -- Opengate content editor |
From: spom_spom <spo...@us...> - 2011-12-11 22:49:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via f121bf6138b3c8e631d130f61d1921e19aeb6092 (commit) via 90946f2c153a729e5794c5699f45e5f3fad0cef8 (commit) from a42488549baa74d036149b6ba84e75ac8402eb42 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f121bf6138b3c8e631d130f61d1921e19aeb6092 Merge: 90946f2 a424885 Author: spom <spo...@so...> Date: Sun Dec 11 23:49:01 2011 +0100 Merge branch 'master' of ssh://opengate.git.sourceforge.net/gitroot/opengate/opengate commit 90946f2c153a729e5794c5699f45e5f3fad0cef8 Author: spom <spo...@so...> Date: Sun Dec 11 23:46:53 2011 +0100 moved planet rendering into dynamically generated skybox ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- data | 2 +- src/Opengate.h | 4 + src/Sector.cpp | 115 ++++++++++++++++++++++--- src/Sector.h | 78 ++++++++++++++--- src/objects/Vessel.cpp | 3 +- src/sectorobjects/SectorAsteroidObject.cpp | 2 +- src/sectorobjects/SectorAsteroidObject.h | 2 +- src/sectorobjects/SectorAvatarObject.cpp | 2 +- src/sectorobjects/SectorAvatarObject.h | 2 +- src/sectorobjects/SectorBaseObject.cpp | 2 +- src/sectorobjects/SectorBaseObject.h | 6 +- src/sectorobjects/SectorBeaconObject.cpp | 2 +- src/sectorobjects/SectorBeaconObject.h | 2 +- src/sectorobjects/SectorCollisionObject.cpp | 2 +- src/sectorobjects/SectorCollisionObject.h | 2 +- src/sectorobjects/SectorEnvironmentObject.cpp | 22 +++--- src/sectorobjects/SectorEnvironmentObject.h | 17 ++-- src/sectorobjects/SectorEquipmentObject.cpp | 12 ++-- src/sectorobjects/SectorEquipmentObject.h | 8 +- src/sectorobjects/SectorExplosionObject.cpp | 2 +- src/sectorobjects/SectorExplosionObject.h | 2 +- src/sectorobjects/SectorMeshObject.cpp | 93 ++++++++++++++------ src/sectorobjects/SectorMeshObject.h | 27 +++++-- src/sectorobjects/SectorMissileObject.cpp | 2 +- src/sectorobjects/SectorMissileObject.h | 2 +- src/sectorobjects/SectorMovableObject.cpp | 2 +- src/sectorobjects/SectorMovableObject.h | 2 +- src/sectorobjects/SectorProjectileObject.cpp | 8 +- src/sectorobjects/SectorProjectileObject.h | 6 +- src/sectorobjects/SectorStationObject.cpp | 2 +- src/sectorobjects/SectorStationObject.h | 2 +- src/sectorobjects/SectorStationPadObject.cpp | 2 +- src/sectorobjects/SectorVesselObject.cpp | 4 +- src/sectorobjects/SectorVesselObject.h | 2 +- 35 files changed, 318 insertions(+), 127 deletions(-) hooks/post-receive -- Opengate sources |
From: Christoph B. <eg...@us...> - 2011-08-28 10:17:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via a42488549baa74d036149b6ba84e75ac8402eb42 (commit) from c167134a5e2171f6b5cc1ea6d6bfd9a0ec218b75 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a42488549baa74d036149b6ba84e75ac8402eb42 Author: Christoph Brill <chr...@ch...> Date: Mon Aug 1 01:19:51 2011 +0200 Remove another obsolete TODO list ----------------------------------------------------------------------- Summary of changes: TODO.cbrill | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-) delete mode 100644 TODO.cbrill hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-08-21 16:21:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via 015fb4567c53fb20de196ef1257a7279431f00c2 (commit) from ad4c413233042b26c0943166f1cf94597d436b57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 015fb4567c53fb20de196ef1257a7279431f00c2 Author: spom <spo...@so...> Date: Sun Aug 21 18:21:13 2011 +0200 add experimental ship upgrade to build a technical worklflow ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/test/ogMeshView.py | 12 ++- .../apps/opengate/test/reflMapMedia/refl.material | 101 -------------------- .../opengate/test/workTmp/apteryx-v2.0-2.57.blend | Bin 0 -> 1153156 bytes 3 files changed, 9 insertions(+), 104 deletions(-) create mode 100644 ogEditor/apps/opengate/test/workTmp/apteryx-v2.0-2.57.blend hooks/post-receive -- Opengate content editor |
From: spom_spom <spo...@us...> - 2011-08-14 21:48:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via ad4c413233042b26c0943166f1cf94597d436b57 (commit) from 6874add32f8bd6e1f194e26f1920bd8b78816032 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ad4c413233042b26c0943166f1cf94597d436b57 Author: spom <spo...@so...> Date: Sun Aug 14 23:47:41 2011 +0200 add experimental ship upgrade to build a technical worklflow ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/test/ogMeshView.py | 7 ++++--- ogEditor/apps/opengate/test/testAppFrameWork.py | 2 +- .../apps/opengate/test/workTmp/apteryx-v2.0.blend | Bin 0 -> 3185404 bytes 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 ogEditor/apps/opengate/test/workTmp/apteryx-v2.0.blend hooks/post-receive -- Opengate content editor |
From: spom_spom <spo...@us...> - 2011-08-07 23:11:39
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via 6874add32f8bd6e1f194e26f1920bd8b78816032 (commit) from 5a9aab9319739a4ca748f5949bb7ca64aa222ba0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6874add32f8bd6e1f194e26f1920bd8b78816032 Author: spom <spo...@so...> Date: Mon Aug 8 01:11:07 2011 +0200 work on at teststation, im a real blender noob :( ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/test/workTmp/Station.blend | Bin 2514892 -> 1639360 bytes 1 files changed, 0 insertions(+), 0 deletions(-) hooks/post-receive -- Opengate content editor |
From: spom_spom <spo...@us...> - 2011-08-07 13:43:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via 393a27fab5971199478bde491eadc5f9a8344bbd (commit) from c4baf054e0d1e85d761be93940c20a64d23b9ea8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 393a27fab5971199478bde491eadc5f9a8344bbd Author: spom <spo...@so...> Date: Sun Aug 7 15:42:23 2011 +0200 teststation development ----------------------------------------------------------------------- Summary of changes: .../programs/NormalSpecularReflection-frag.glsl | 3 +- materials/scripts/station.material | 47 +++++++++++++------ materials/scripts/templates.material | 3 + misc/test.sector | 8 ++-- stations/Station.mesh | Bin 754119 -> 717327 bytes stations/StationBackground.png | Bin 0 -> 260848 bytes stations/StationBackgroundNorm.png | Bin 0 -> 180355 bytes stations/StationBackgroundSpec.png | Bin 0 -> 52820 bytes stations/UVTest.png | Bin 0 -> 232045 bytes stations/window.png | Bin 0 -> 42994 bytes stations/windowNorm.png | Bin 0 -> 695 bytes stations/windowSpec.png | Bin 0 -> 679 bytes 12 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 stations/StationBackground.png create mode 100644 stations/StationBackgroundNorm.png create mode 100644 stations/StationBackgroundSpec.png create mode 100644 stations/UVTest.png create mode 100644 stations/window.png create mode 100644 stations/windowNorm.png create mode 100644 stations/windowSpec.png hooks/post-receive -- Opengate game data |
From: Christoph B. <eg...@us...> - 2011-08-07 08:12:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via c167134a5e2171f6b5cc1ea6d6bfd9a0ec218b75 (commit) from 359ad2592d916dcded91d6cf96eddb889d3f7ddd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c167134a5e2171f6b5cc1ea6d6bfd9a0ec218b75 Author: Christoph Brill <ego...@eg...> Date: Sun Jul 31 17:26:07 2011 +0200 Update submodules ----------------------------------------------------------------------- Summary of changes: data | 2 +- templates | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) create mode 160000 templates hooks/post-receive -- Opengate sources |
From: spom_spom <spo...@us...> - 2011-08-06 22:48:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via 5a9aab9319739a4ca748f5949bb7ca64aa222ba0 (commit) from 8f05b5ab080c434031309e9d18ceb79fdc386a38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5a9aab9319739a4ca748f5949bb7ca64aa222ba0 Author: spom <spo...@so...> Date: Sun Aug 7 00:47:10 2011 +0200 add blender file for the teststation ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/test/nmTest.py | 4 +- ogEditor/apps/opengate/test/ogMeshView.py | 11 ++- .../apps/opengate/test/reflMapMedia/refl.material | 111 +++++++++++++++++++- ogEditor/apps/opengate/test/reflMapTest.py | 6 +- ogEditor/apps/opengate/test/resources.cfg | 3 +- ogEditor/apps/opengate/test/testAppFrameWork.py | 2 +- ogEditor/apps/opengate/test/workTmp/Station.blend | Bin 0 -> 2514892 bytes 7 files changed, 125 insertions(+), 12 deletions(-) create mode 100644 ogEditor/apps/opengate/test/workTmp/Station.blend hooks/post-receive -- Opengate content editor |
From: spom_spom <spo...@us...> - 2011-08-06 22:44:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate game data". The branch, master has been updated via c4baf054e0d1e85d761be93940c20a64d23b9ea8 (commit) from 9ad34edce33716ff6f6195a796ae829adf45501c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c4baf054e0d1e85d761be93940c20a64d23b9ea8 Author: spom <spo...@so...> Date: Sun Aug 7 00:43:55 2011 +0200 add basic concept for a new station, just for material testing and to train my blender skills ----------------------------------------------------------------------- Summary of changes: .../programs/NormalSpecularReflection-frag.glsl | 19 +++++++++++++++++-- .../programs/NormalSpecularReflection-vert.glsl | 4 ++-- materials/scripts/station.material | 17 +++++++++++++++-- misc/test.sector | 5 ++++- ships/octavius/phoenix/phoenix.xml | 3 +++ stations/Station.mesh | Bin 0 -> 754119 bytes stations/tauseti_wake.mesh | Bin 73235 -> 73235 bytes 7 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 stations/Station.mesh hooks/post-receive -- Opengate game data |
From: spom_spom <spo...@us...> - 2011-08-06 10:22:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate content editor". The branch, master has been updated via 8f05b5ab080c434031309e9d18ceb79fdc386a38 (commit) from 5ac454b5740c5b1b6a61db88d39c1ddda891ac08 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8f05b5ab080c434031309e9d18ceb79fdc386a38 Author: spom <spo...@so...> Date: Fri Aug 5 11:53:36 2011 +0200 add missing file ----------------------------------------------------------------------- Summary of changes: ogEditor/apps/opengate/pyopengate/generate_code.py | 2 +- .../opengate/pyopengate/python_ogre_include_OGRE.h | 25 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletions(-) create mode 100644 ogEditor/apps/opengate/pyopengate/python_ogre_include_OGRE.h hooks/post-receive -- Opengate content editor |
From: Christoph B. <eg...@us...> - 2011-07-31 23:15:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Opengate sources". The branch, master has been updated via 359ad2592d916dcded91d6cf96eddb889d3f7ddd (commit) from ec1f7bc1f2424ea99290365a480a6d8a7c8145e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 359ad2592d916dcded91d6cf96eddb889d3f7ddd Author: Christoph Brill <chr...@ch...> Date: Mon Aug 1 01:15:02 2011 +0200 Drop obsolete TODO-list ----------------------------------------------------------------------- Summary of changes: TODO.gluck | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) delete mode 100644 TODO.gluck hooks/post-receive -- Opengate sources |
From: <eg...@us...> - 2010-01-02 17:04:58
|
Revision: 1179 http://opengate.svn.sourceforge.net/opengate/?rev=1179&view=rev Author: egore Date: 2010-01-02 17:04:45 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Forgot this move Added Paths: ----------- trunk/src/dialogs/MarketDialog.cpp Removed Paths: ------------- trunk/src/MarketDialog.cpp Deleted: trunk/src/MarketDialog.cpp =================================================================== --- trunk/src/MarketDialog.cpp 2010-01-02 16:45:14 UTC (rev 1178) +++ trunk/src/MarketDialog.cpp 2010-01-02 17:04:45 UTC (rev 1179) @@ -1,712 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2007 by OpenGate development team * - * spo...@us... * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include "MarketDialog.h" -#include "common.h" -#include "GameStateManager.h" -#include "EntityManager.h" -#include "Entity.h" -#include "Equipment.h" -#include "Avatar.h" -#include "Vessel.h" -#include "KeyMap.h" - -#include <OgreRenderWindow.h> -#include <CEGUI/elements/CEGUIEditbox.h> -#include <CEGUI/elements/CEGUIPushButton.h> - -namespace OpenGate{ - -MarketDialog::MarketDialog( ) - : BaseDialog( "dialogs/MarketDialog.layout" ){ - - populateItemWidget( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/ItemFrame" ), - marketItems_, marketItemWindowCol_, marketItemWindowRow_ ); - populateItemWidget( CEGUI::WindowManager::getSingleton().getWindow( "InventoryWindow/ItemFrame" ), - inventItems_, inventItemWindowCol_, inventItemWindowRow_ ); - - setupEventHandlers(); - - marketOffsetRow_ = 0; - inventOffsetRow_ = 0; - selectedCategory_ = "Commodities"; - sortAscending_ = true; - sortBy_ = Alphanumeric; - updateSortIcons(); - - updateInventView(); -} - -MarketDialog::~MarketDialog(){ -} - -void MarketDialog::setupEventHandlers(){ - - CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketDialog"), - CEGUI::PushButton::EventShown, MarketDialog::handeMainWindowShown ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieCommodities"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategoriePowerPlants"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieEngines"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieRadars"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieECM"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieCapacitors"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieShields"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieGuns"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieMissiles"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieMODx"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieAll"), - CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AlphaAscendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAlphaAscend ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AlphaDescendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAlphaDescend ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/CostButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortCost ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/SizeAscendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortSizeAscend ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/SizeDescendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortSizeDescend ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/RankButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortRank ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AmountAscendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAmountAscend ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AmountDescendButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAmountDescend ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AscendOrderButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAscend ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/DescendOrderButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortDescend ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/UpButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemWindowUpButton ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/DownButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemWindowDownButton ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow"), - CEGUI::PushButton::EventMouseWheel, MarketDialog::handleMouseWheelChanged ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/NotNowButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemViewNotNowButton ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/AcceptButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemViewAcceptButton ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase1"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase10"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase100"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease1"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease10"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease100"), - CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); - - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleInventItemWindowUpButton ); - BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton"), - CEGUI::PushButton::EventClicked, MarketDialog::handleInventItemWindowDownButton ); - - - for ( unsigned int i = 0; i < marketItems_.size(); i ++ ){ - BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseEnters, MarketDialog::handleMarketItemMouseEnters ); - BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseLeaves, MarketDialog::handleMarketItemMouseLeaves ); - BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseClick, MarketDialog::handleMarketItemClicked ); - } - - for ( unsigned int i = 0; i < inventItems_.size(); i ++ ){ - BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseEnters, MarketDialog::handleMarketItemMouseEnters ); - BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseLeaves, MarketDialog::handleMarketItemMouseLeaves ); - BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseClick, MarketDialog::handleInventItemClicked ); - } -} - -bool lesserMass( const Entity * l, const Entity * r ) { return ( l->mass() < r->mass() ); } -bool greaterMass( const Entity * l, const Entity * r ) { return ( l->mass() > r->mass() ); } - -bool lesserName( const Entity * l, const Entity * r ) { return ( strCopyToLowerCase( l->name() ) < - strCopyToLowerCase( r->name() ) ); } -bool greaterName( const Entity * l, const Entity * r ) { return ( strCopyToLowerCase( l->name() ) > - strCopyToLowerCase( r->name() ) ); } - -bool lesserSize( const Entity * l, const Entity * r ) { return ( l->size() < r->size() ); } -bool greaterSize( const Entity * l, const Entity * r ) { return ( l->size() > r->size() ); } - -bool lesserRank( const Entity * l, const Entity * r ) { return ( l->techLevel() < r->techLevel() ); } -bool greaterRank( const Entity * l, const Entity * r ) { return ( l->techLevel() > r->techLevel() ); } - -void MarketDialog::updateMarketView(){ - - marketOffsetRow_ = max( 0, marketOffsetRow_ ); - if ( marketOffsetRow_ == 0 ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/UpButton")->hide(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/UpButton")->show(); - } - - std::vector < Entity * > items; - - items = ResourceManager::getSingleton().entityManager->allByCategory( selectedCategory_ ); - - switch ( sortBy_ ){ - case Alphanumeric: - if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserName ); - else sort( items.begin(), items.end(), &OpenGate::greaterName ); - break; - case Cost: - break; - case Size: - if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserSize ); - else sort( items.begin(), items.end(), &OpenGate::greaterSize ); - break; - case Rank: - if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserRank ); - else sort( items.begin(), items.end(), &OpenGate::greaterRank ); - break; - case Amount: - break; - } - - int maxRow = (int)ceil( (double)items.size() / marketItemWindowRow_ ); - marketOffsetRow_ = min( marketOffsetRow_, maxRow ); - - if ( ( maxRow - marketOffsetRow_ ) > marketItemWindowRow_ ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/DownButton")->show(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/DownButton")->hide(); - } - - for ( int i = 0; i < marketItemWindowRow_; i ++ ){ - for ( int j = 0; j < marketItemWindowCol_; j ++ ){ - unsigned int widgetCount = i * marketItemWindowCol_ + j; - unsigned int itemCount = ( i + marketOffsetRow_ ) * marketItemWindowCol_ + j; - - if ( itemCount >= items.size() ) { - fillShortItemWindow( marketItems_[ widgetCount ] ); - } else { - fillShortItemWindow( marketItems_[ widgetCount ], items[ itemCount ], 1000, 1 ); - } - } - } -} - -void MarketDialog::updateInventView(){ - CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" ) - ->setProperty( "Text", CEGUI::String( toStr( ResourceManager::getSingleton().avatar->cargoHold() ) ) ); - CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargoMax/Text" ) - ->setProperty( "Text", CEGUI::String( toStr( ResourceManager::getSingleton().avatar->vessel()->cargoSize() ) ) ); - CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" ) - ->setProperty( "Text", toStr( ResourceManager::getSingleton().avatar->cargoHoldMax() ) ); - - - inventOffsetRow_ = max( 0, inventOffsetRow_ ); - if ( inventOffsetRow_ == 0 ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton")->hide(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton")->show(); - } - - std::list< std::deque < Entity * > > * floorCargo = ResourceManager::getSingleton().avatar->floorCargo(); - - int maxRow = (int)ceil( (double)floorCargo->size() / inventItemWindowCol_ ); - inventOffsetRow_ = min( inventOffsetRow_, maxRow ); - - if ( ( maxRow - inventOffsetRow_ ) > inventItemWindowRow_ ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton")->show(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton")->hide(); - } - - int count = 0; - int startItemCount = inventOffsetRow_ * inventItemWindowCol_; - int endItemCount = startItemCount + inventItemWindowRow_ * inventItemWindowCol_; - int widgetCount = 0; - - for ( std::list< std::deque< Entity * > >::iterator it = floorCargo->begin(); it != floorCargo->end(); it ++ ){ - count ++; - if ( count > startItemCount && count <= endItemCount ){ - int itemAmount = (*it).size(); - int itemPrice = 1; - fillShortItemWindow( inventItems_[ widgetCount ], (*it)[ 0 ], itemAmount, itemPrice ); - widgetCount++; - } - } - while ( widgetCount < inventItemWindowRow_ * inventItemWindowCol_ ){ - fillShortItemWindow( inventItems_[ widgetCount ] ); - widgetCount++; - } - -// for ( int i = 0; i < inventItemWindowRow_; i ++ ){ -// for ( int j = 0; j < inventItemWindowCol_; j ++ ){ -// int widgetCount = i * inventItemWindowCol_ + j; -// int itemCount = ( i + inventOffsetRow_ ) * inventItemWindowCol_ + j; - -// if ( itemCount >= ( (*floorCargo).size() ) ) { -// fillShortItemWindow( inventItems_[ widgetCount ] ); -// } else { -// int itemAmount = (*floorCargo)[ itemCount ].size(); -// int itemPrice = 1; -// fillShortItemWindow( inventItems_[ widgetCount ], (*floorCargo)[ itemCount ][ 0 ], itemAmount, itemPrice ); -// } -// } -// } -} - -void MarketDialog::fillShortItemWindow( CEGUI::Window * win, Entity * item, int amount, int price ){ - CEGUI::String name( "" ); - CEGUI::String textAmount( "" ); - CEGUI::String textPrice( "" ); - CEGUI::String image( "" ); - CEGUI::String icon( "" ); - CEGUI::String categoryIcon( "" ); - if ( item ){ - name = item->name(); - textAmount = CEGUI::String( toStr( amount ) ); - textPrice = CEGUI::String( "c" + toStr( price ) ); - image = item->ceguiSmallImageName(); - icon = CEGUI::String("set:opengate image:IconSize" + toStr( item->size() ) ); - categoryIcon = CEGUI::String("set:opengate image:Icon" + - ResourceManager::getSingleton().entityManager->categoryName( item->entityType() ) + - toStr( item->factionID() ) ); - } - win->setUserData( item ); - win->setProperty( "Text", name ); - CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemAmount" ) - ->setProperty( "Text", textAmount ); - CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemPrice" ) - ->setProperty( "Text", textPrice ); - CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemImage" ) - ->setProperty("Image", image ); - - if ( item ){ - std::string imageName( item->imageName() + "Small" ); - fitWindowToImage( imageName, CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemImage" ) ); - } - - CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemSizeIcon" ) - ->setProperty("Image", icon ); - CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemTypIcon" ) - ->setProperty("Image", categoryIcon ); - -} - -void MarketDialog::updateSortIcons(){ - - if ( sortAscending_ ){ - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/OrderHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AscendOrderButton" )->getPosition() ); - - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaDescendButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeDescendButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountDescendButton" )->hide(); - - } else { - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/OrderHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/DescendOrderButton" )->getPosition() ); - - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaDescendButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeDescendButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountDescendButton" )->show(); - } - switch ( sortBy_ ){ - case Alphanumeric: - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->getPosition() ); - break; - case Cost: - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CostButton" )->getPosition() ); - break; - case Size: - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->getPosition() ); - break; - case Rank: - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/RankButton" )->getPosition() ); - break; - case Amount: - CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) - ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->getPosition() ); - break; - } - - updateMarketView(); -} - -void MarketDialog::populateItemWidget( CEGUI::Window * window, std::vector < CEGUI::Window * > & vWindow, int & col, int & row){ - int itemWidth = 98; - int itemHeight = 106; - float winWidth = windowWidth( window ); - float winHeight = windowHeight( window ); - - col = (int)floor( winWidth / itemWidth ); - row = (int)floor( winHeight / itemHeight ); - - int xBound = (int)floor( ( winWidth - col * itemWidth ) / col ); - int yBound = (int)floor( ( winHeight - row * itemHeight ) / row ); - - for ( int i = 0; i < row; i ++ ){ - for ( int j = 0; j < col; j ++ ){ - CEGUI::Window * item = CEGUI::WindowManager::getSingleton().loadWindowLayout( "dialogs/MarketItemShortDialog.layout" ); - CEGUI::String basename( window->getName() + item->getName() + toStr( i * col + j ).c_str() ); - - item->rename( basename ); - renameClonedWindows( item, basename ); - - window->addChildWindow( item ); - item->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, ( xBound + itemWidth ) * j ), - CEGUI::UDim( 0.0, yBound + ( yBound + itemHeight ) * i ) ) ); - vWindow.push_back( item ); - } - } -} - -bool MarketDialog::handleCategorieChanged( const CEGUI::EventArgs & e ){ - const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); - selectedCategory_ = we.window->getText().c_str(); - - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"CategorieHighlight")->setPosition( - we.window->getPosition() ); - - marketOffsetRow_ = 0; - updateMarketView(); - return true; -} - - -bool MarketDialog::handleMarketItemMouseEnters( const CEGUI::EventArgs & e ){ - const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); - - Entity *item = (Entity *)we.window->getUserData(); -// Entity *item = dynamic_cast< Entity * >( we.window->getUserData() ); - if ( item ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Name/Text")-> - setProperty("Text", item->name() ); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Size/Text")-> - setProperty("Text", CEGUI::String( toStr( item->size() ).c_str() ) ); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Text")-> - setProperty("Text", CEGUI::String( toStr( item->mass() ).c_str() ) ); - - std::string t( item->description() ); - CEGUI::String outText; - int lineLength = 130; - for ( int i = 0; i < ceil( t.size()/lineLength )+1; i ++ ){ - int count = lineLength; - if ( i * lineLength + count > (int)t.size() ){ count = -1; } - CEGUI::String text( t, i * lineLength, count ); - outText += text; - if ( count != -1 ) outText += '\n'; - } - - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Text")-> - setProperty("Text", outText ); - - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Name/Label")->show(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Size/Label")->show(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Label")->show(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Text")->show(); - } - return true; -} - -bool MarketDialog::handleMarketItemMouseLeaves( const CEGUI::EventArgs & e ){ - if ( !CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView")->isVisible() ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Name/Label")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Size/Label")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Label")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Text")->hide(); - } - return true; -} - -bool MarketDialog::handleMarketItemClicked( const CEGUI::EventArgs & e ){ - const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); - - Entity *item = (Entity *)we.window->getUserData(); - - if ( item ){ - buyMode_ = true; - - if ( ResourceManager::getSingleton().keyMap()->globalKeyModifier() == KEY_CONTROL ){ - buyItems( item, 1 ); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow")->hide(); - showRecursive( CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView") ); - - fillMarketItemDetailedView( we.window ); - } - } - updateInventView(); - updateMarketView(); - return true; -} - -bool MarketDialog::handleInventItemClicked( const CEGUI::EventArgs & e ){ - const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); - Entity *item = (Entity *)we.window->getUserData(); - - if ( item ){ - buyMode_ = false; - - if ( ResourceManager::getSingleton().keyMap()->globalKeyModifier() == KEY_CONTROL ){ - sellItems( item, 1 ); - } else { - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow")->hide(); - showRecursive( CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView") ); - - fillMarketItemDetailedView( we.window ); - } - } - updateInventView(); - updateMarketView(); - return true; -} - -void MarketDialog::fillMarketItemDetailedView( CEGUI::Window * itemWindow ){ - CEGUI::String amountText( CEGUI::WindowManager::getSingleton().getWindow( itemWindow->getName() + "MarketShortItemAmount" )->getText() ); - - Entity * item = ( Entity * )itemWindow->getUserData(); - if ( item ){ - - int amount = 1; - if ( buyMode_ ){ - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Top/Title") - ->setProperty("Text", CEGUI::String( "Would you like to purchase this item?" ) ); - - amount = min( amount, - ( toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" )->getText( ).c_str() ) - - toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" )->getText( ).c_str() ) ) - / item->size() ); - if ( amount == 0 ){ - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton/Highlight" )->hide(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton/Highlight" )->show(); - } - - } else { - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Top/Title") - ->setProperty("Text", CEGUI::String( "Would you like to sell this item?" ) ); - } - - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView")->setUserData( itemWindow->getUserData() ); - - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Amount" ) - ->setProperty("Text", CEGUI::String( toStr( amount ) ) ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Image" ) - ->setProperty("Image", item->ceguiImageName() ); - - fitWindowToImage( item->imageName(), CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Image" ) ); - - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Name/Text" ) - ->setProperty("Text", item->name() ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Size/Text" ) - ->setProperty("Text", CEGUI::String( toStr( item->size() ) ) ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Mass/Text" ) - ->setProperty("Text", CEGUI::String( toStr( item->mass() ) ) ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Amount/Text" ) - ->setProperty("Text", amountText ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Price/Text" ) - ->setProperty("Text", CEGUI::String( "c1" ) ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Rank" ) - ->setProperty("Text", CEGUI::String("Required rank:" + toStr( item->techLevel() ) ) ); - - CEGUI::String str1a(""), str1b(""), str2a(""), str2b(""), str3a(""), str3b(""); - CEGUI::String str4a(""), str4b(""), str5a(""), str5b(""); - - switch( item->entityType() ){ - case POWERPLANT: - str1a = "Wattage:"; str1b = toStr( dynamic_cast< PowerPlant *>(item)->powerOutput()/1000 ) + "K"; - break; - case ENGINE: - str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Engine *>(item)->efficiency() ); - str2a = "Max. Thrust:"; str2b = toStr( dynamic_cast< Engine *>(item)->maxThrust() / 1000 ) + "K"; - break; - case RADAR: - str1a = "Max. range:" ; str1b = toStr( dynamic_cast< Radar *>(item)->maxRange() ); - str2a = "Power:" ; str2b = toStr( dynamic_cast< Radar *>(item)->powerConsumption()/1000 ) + "K"; - break; - case ECM: - str1a = "Power:" ; str1b = toStr( dynamic_cast< Engine *>(item)->powerConsumption()/1000 ) + "K"; - break; - case SHIELD: - str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Shield *>(item)->efficiency() ); - str2a = "Max. Damage:" ; str2b = toStr( dynamic_cast< Shield *>(item)->maxDeflection()/1000 ) + "K"; - str3a = "Recharge:" ; str3b = toStr( dynamic_cast< Shield *>(item)->regenerationRate() / 1000) + "K"; - break; - case CAPACITOR: - str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Capacitor *>( item )->efficiency() ); - str2a = "Max. Power:" ; str2b = toStr( dynamic_cast< Capacitor *>( item )->capacity()/1000 ) + "K"; - break; - case GUN: - str1a = "Damage:" ; str1b = toStr( dynamic_cast< Gun *>( item )->damage() / 1000 ) + "K"; - str2a = "Speed:" ; str2b = toStr( dynamic_cast< Gun *>( item )->speed() ); - str3a = "Life time:" ; str3b = toStr( dynamic_cast< Gun *>( item )->lifeTime() ); - str4a = "Fire delay:" ; str4b = toStr( dynamic_cast< Gun *>( item )->fireDelay() ); - str5a = "Energy:" ; str5b = toStr( dynamic_cast< Gun *>( item )->powerConsumption() / 1000) + "K"; - break; - default: - break; - } - - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs1a" )->setProperty( "Text", str1a ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs1b" )->setProperty( "Text", str1b ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs2a" )->setProperty( "Text", str2a ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs2b" )->setProperty( "Text", str2b ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs3a" )->setProperty( "Text", str3a ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs3b" )->setProperty( "Text", str3b ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs4a" )->setProperty( "Text", str4a ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs4b" )->setProperty( "Text", str4b ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs5a" )->setProperty( "Text", str5a ); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/EquipmentSpecs5b" )->setProperty( "Text", str5b ); - - } -} - -bool MarketDialog::handleMarketItemViewNotNowButton( const CEGUI::EventArgs & e ){ - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow")->show(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow")->show(); - updateInventView(); - return true; -} - -bool MarketDialog::handleMarketItemViewAcceptButton( const CEGUI::EventArgs & e ){ - - Entity *item = (Entity*)CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView")->getUserData(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketItemDetailedView")->hide(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow")->show(); - CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow")->show(); - - if ( item ){ - int amount = toInt( dynamic_cast< CEGUI::Editbox * >( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Amount" ) )->getText( ).c_str() ); - - int size = toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Size/Text" ) - ->getText( ).c_str() ); - - if ( buyMode_ ){ - amount = min( amount, (int)floor( - ( toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" )->getText( ).c_str() ) - - toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" )->getText( ).c_str() ) ) / size ) ); - } else { - amount = min( amount, toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Amount/Text" )->getText().c_str() ) ); - } - - if ( amount > 0 ){ - if ( buyMode_ ){ - buyItems( item, amount ); - } else { - sellItems( item, amount ); - } - } - } - - updateInventView(); - return true; -} - -bool MarketDialog::handleMarketItemChangeAmount( const CEGUI::EventArgs & e ){ - const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); - - int amount = toInt( dynamic_cast< CEGUI::Editbox * >( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Amount" ) )->getText( ).c_str() ); - - if ( we.window->getName() == "MarketItemDetailedView/Increase1" ) amount += 1; - else if ( we.window->getName() == "MarketItemDetailedView/Increase10" ) amount += 10; - else if ( we.window->getName() == "MarketItemDetailedView/Increase100" ) amount += 100; - else if ( we.window->getName() == "MarketItemDetailedView/Decrease1" ) amount -= 1; - else if ( we.window->getName() == "MarketItemDetailedView/Decrease10" ) amount -= 10; - else if ( we.window->getName() == "MarketItemDetailedView/Decrease100" ) amount -= 100; - - amount = max( 0, amount ); - - int size = toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Size/Text" ) - ->getText( ).c_str() ); - - if ( buyMode_ ){ - amount = min( amount, (int)floor( - ( toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" )->getText( ).c_str() ) - - toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" )->getText( ).c_str() ) ) / size ) ); - } else { - amount = min( amount, toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Amount/Text" )->getText().c_str() ) ); - } - - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Amount" ) - ->setProperty("Text", CEGUI::String( toStr( (int)amount ) ) ); - - if ( amount > 0 ){ - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton/Highlight" )->show(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton" )->show(); - } else { - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton" )->hide(); - CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton/Highlight" )->hide(); - } - return true; -} - -bool MarketDialog::buyItems( Entity * item , int amount ){ - std::vector < Entity * > items( amount, item ); - ResourceManager::getSingleton().avatar->addCargoToFloor( items ); - return true; -} - -bool MarketDialog::sellItems( Entity * item , int amount ){ - std::vector < Entity * > items( amount, item ); - ResourceManager::getSingleton().avatar->delCargoToFloor( items ); - return true; -} - -bool MarketDialog::handeMainWindowShown( const CEGUI::EventArgs & e ){ - updateMarketView(); - updateInventView(); - return true; -} - -bool MarketDialog::handleMouseWheelChanged( const CEGUI::EventArgs & e ){ - std::cout << "handleMouseWheelChanged" << std::endl; - return true; -} - - -} // namespace OpenGate Copied: trunk/src/dialogs/MarketDialog.cpp (from rev 1178, trunk/src/MarketDialog.cpp) =================================================================== --- trunk/src/dialogs/MarketDialog.cpp (rev 0) +++ trunk/src/dialogs/MarketDialog.cpp 2010-01-02 17:04:45 UTC (rev 1179) @@ -0,0 +1,712 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "MarketDialog.h" +#include "common.h" +#include "GameStateManager.h" +#include "EntityManager.h" +#include "Entity.h" +#include "Equipment.h" +#include "Avatar.h" +#include "Vessel.h" +#include "KeyMap.h" + +#include <OgreRenderWindow.h> +#include <CEGUI/elements/CEGUIEditbox.h> +#include <CEGUI/elements/CEGUIPushButton.h> + +namespace OpenGate{ + +MarketDialog::MarketDialog( ) + : BaseDialog( "dialogs/MarketDialog.layout" ){ + + populateItemWidget( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/ItemFrame" ), + marketItems_, marketItemWindowCol_, marketItemWindowRow_ ); + populateItemWidget( CEGUI::WindowManager::getSingleton().getWindow( "InventoryWindow/ItemFrame" ), + inventItems_, inventItemWindowCol_, inventItemWindowRow_ ); + + setupEventHandlers(); + + marketOffsetRow_ = 0; + inventOffsetRow_ = 0; + selectedCategory_ = "Commodities"; + sortAscending_ = true; + sortBy_ = Alphanumeric; + updateSortIcons(); + + updateInventView(); +} + +MarketDialog::~MarketDialog(){ +} + +void MarketDialog::setupEventHandlers(){ + + CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketDialog"), + CEGUI::PushButton::EventShown, MarketDialog::handeMainWindowShown ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieCommodities"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategoriePowerPlants"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieEngines"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieRadars"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieECM"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieCapacitors"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieShields"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieGuns"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieMissiles"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieMODx"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"CategorieAll"), + CEGUI::PushButton::EventClicked, MarketDialog::handleCategorieChanged ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AlphaAscendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAlphaAscend ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AlphaDescendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAlphaDescend ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/CostButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortCost ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/SizeAscendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortSizeAscend ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/SizeDescendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortSizeDescend ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/RankButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortRank ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AmountAscendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAmountAscend ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AmountDescendButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAmountDescend ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/AscendOrderButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortAscend ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/Sort/DescendOrderButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemSortDescend ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/UpButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemWindowUpButton ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow/DownButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemWindowDownButton ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketWindow"), + CEGUI::PushButton::EventMouseWheel, MarketDialog::handleMouseWheelChanged ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/NotNowButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemViewNotNowButton ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/AcceptButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemViewAcceptButton ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase1"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase10"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Increase100"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease1"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease10"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"MarketItemDetailedView/Decrease100"), + CEGUI::PushButton::EventClicked, MarketDialog::handleMarketItemChangeAmount ); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleInventItemWindowUpButton ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton"), + CEGUI::PushButton::EventClicked, MarketDialog::handleInventItemWindowDownButton ); + + + for ( unsigned int i = 0; i < marketItems_.size(); i ++ ){ + BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseEnters, MarketDialog::handleMarketItemMouseEnters ); + BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseLeaves, MarketDialog::handleMarketItemMouseLeaves ); + BIND_CEGUI_EVENT( marketItems_[ i ], CEGUI::Window::EventMouseClick, MarketDialog::handleMarketItemClicked ); + } + + for ( unsigned int i = 0; i < inventItems_.size(); i ++ ){ + BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseEnters, MarketDialog::handleMarketItemMouseEnters ); + BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseLeaves, MarketDialog::handleMarketItemMouseLeaves ); + BIND_CEGUI_EVENT( inventItems_[ i ], CEGUI::Window::EventMouseClick, MarketDialog::handleInventItemClicked ); + } +} + +bool lesserMass( const Entity * l, const Entity * r ) { return ( l->mass() < r->mass() ); } +bool greaterMass( const Entity * l, const Entity * r ) { return ( l->mass() > r->mass() ); } + +bool lesserName( const Entity * l, const Entity * r ) { return ( strCopyToLowerCase( l->name() ) < + strCopyToLowerCase( r->name() ) ); } +bool greaterName( const Entity * l, const Entity * r ) { return ( strCopyToLowerCase( l->name() ) > + strCopyToLowerCase( r->name() ) ); } + +bool lesserSize( const Entity * l, const Entity * r ) { return ( l->size() < r->size() ); } +bool greaterSize( const Entity * l, const Entity * r ) { return ( l->size() > r->size() ); } + +bool lesserRank( const Entity * l, const Entity * r ) { return ( l->techLevel() < r->techLevel() ); } +bool greaterRank( const Entity * l, const Entity * r ) { return ( l->techLevel() > r->techLevel() ); } + +void MarketDialog::updateMarketView(){ + + marketOffsetRow_ = max( 0, marketOffsetRow_ ); + if ( marketOffsetRow_ == 0 ){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/UpButton")->hide(); + } else { + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/UpButton")->show(); + } + + std::vector < Entity * > items; + + items = ResourceManager::getSingleton().entityManager->allByCategory( selectedCategory_ ); + + switch ( sortBy_ ){ + case Alphanumeric: + if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserName ); + else sort( items.begin(), items.end(), &OpenGate::greaterName ); + break; + case Cost: + break; + case Size: + if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserSize ); + else sort( items.begin(), items.end(), &OpenGate::greaterSize ); + break; + case Rank: + if ( sortAscending_ ) sort( items.begin(), items.end(), &OpenGate::lesserRank ); + else sort( items.begin(), items.end(), &OpenGate::greaterRank ); + break; + case Amount: + break; + } + + int maxRow = (int)ceil( (double)items.size() / marketItemWindowRow_ ); + marketOffsetRow_ = min( marketOffsetRow_, maxRow ); + + if ( ( maxRow - marketOffsetRow_ ) > marketItemWindowRow_ ){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/DownButton")->show(); + } else { + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow/DownButton")->hide(); + } + + for ( int i = 0; i < marketItemWindowRow_; i ++ ){ + for ( int j = 0; j < marketItemWindowCol_; j ++ ){ + unsigned int widgetCount = i * marketItemWindowCol_ + j; + unsigned int itemCount = ( i + marketOffsetRow_ ) * marketItemWindowCol_ + j; + + if ( itemCount >= items.size() ) { + fillShortItemWindow( marketItems_[ widgetCount ] ); + } else { + fillShortItemWindow( marketItems_[ widgetCount ], items[ itemCount ], 1000, 1 ); + } + } + } +} + +void MarketDialog::updateInventView(){ + CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" ) + ->setProperty( "Text", CEGUI::String( toStr( ResourceManager::getSingleton().avatar->cargoHold() ) ) ); + CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargoMax/Text" ) + ->setProperty( "Text", CEGUI::String( toStr( ResourceManager::getSingleton().avatar->vessel()->cargoSize() ) ) ); + CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" ) + ->setProperty( "Text", toStr( ResourceManager::getSingleton().avatar->cargoHoldMax() ) ); + + + inventOffsetRow_ = max( 0, inventOffsetRow_ ); + if ( inventOffsetRow_ == 0 ){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton")->hide(); + } else { + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/UpButton")->show(); + } + + std::list< std::deque < Entity * > > * floorCargo = ResourceManager::getSingleton().avatar->floorCargo(); + + int maxRow = (int)ceil( (double)floorCargo->size() / inventItemWindowCol_ ); + inventOffsetRow_ = min( inventOffsetRow_, maxRow ); + + if ( ( maxRow - inventOffsetRow_ ) > inventItemWindowRow_ ){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton")->show(); + } else { + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow/DownButton")->hide(); + } + + int count = 0; + int startItemCount = inventOffsetRow_ * inventItemWindowCol_; + int endItemCount = startItemCount + inventItemWindowRow_ * inventItemWindowCol_; + int widgetCount = 0; + + for ( std::list< std::deque< Entity * > >::iterator it = floorCargo->begin(); it != floorCargo->end(); it ++ ){ + count ++; + if ( count > startItemCount && count <= endItemCount ){ + int itemAmount = (*it).size(); + int itemPrice = 1; + fillShortItemWindow( inventItems_[ widgetCount ], (*it)[ 0 ], itemAmount, itemPrice ); + widgetCount++; + } + } + while ( widgetCount < inventItemWindowRow_ * inventItemWindowCol_ ){ + fillShortItemWindow( inventItems_[ widgetCount ] ); + widgetCount++; + } + +// for ( int i = 0; i < inventItemWindowRow_; i ++ ){ +// for ( int j = 0; j < inventItemWindowCol_; j ++ ){ +// int widgetCount = i * inventItemWindowCol_ + j; +// int itemCount = ( i + inventOffsetRow_ ) * inventItemWindowCol_ + j; + +// if ( itemCount >= ( (*floorCargo).size() ) ) { +// fillShortItemWindow( inventItems_[ widgetCount ] ); +// } else { +// int itemAmount = (*floorCargo)[ itemCount ].size(); +// int itemPrice = 1; +// fillShortItemWindow( inventItems_[ widgetCount ], (*floorCargo)[ itemCount ][ 0 ], itemAmount, itemPrice ); +// } +// } +// } +} + +void MarketDialog::fillShortItemWindow( CEGUI::Window * win, Entity * item, int amount, int price ){ + CEGUI::String name( "" ); + CEGUI::String textAmount( "" ); + CEGUI::String textPrice( "" ); + CEGUI::String image( "" ); + CEGUI::String icon( "" ); + CEGUI::String categoryIcon( "" ); + if ( item ){ + name = item->name(); + textAmount = CEGUI::String( toStr( amount ) ); + textPrice = CEGUI::String( "c" + toStr( price ) ); + image = item->ceguiSmallImageName(); + icon = CEGUI::String("set:opengate image:IconSize" + toStr( item->size() ) ); + categoryIcon = CEGUI::String("set:opengate image:Icon" + + ResourceManager::getSingleton().entityManager->categoryName( item->entityType() ) + + toStr( item->factionID() ) ); + } + win->setUserData( item ); + win->setProperty( "Text", name ); + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemAmount" ) + ->setProperty( "Text", textAmount ); + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemPrice" ) + ->setProperty( "Text", textPrice ); + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemImage" ) + ->setProperty("Image", image ); + + if ( item ){ + std::string imageName( item->imageName() + "Small" ); + fitWindowToImage( imageName, CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemImage" ) ); + } + + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemSizeIcon" ) + ->setProperty("Image", icon ); + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemTypIcon" ) + ->setProperty("Image", categoryIcon ); + +} + +void MarketDialog::updateSortIcons(){ + + if ( sortAscending_ ){ + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/OrderHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AscendOrderButton" )->getPosition() ); + + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->show(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaDescendButton" )->hide(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->show(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeDescendButton" )->hide(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->show(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountDescendButton" )->hide(); + + } else { + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/OrderHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/DescendOrderButton" )->getPosition() ); + + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->hide(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaDescendButton" )->show(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->hide(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeDescendButton" )->show(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->hide(); + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountDescendButton" )->show(); + } + switch ( sortBy_ ){ + case Alphanumeric: + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AlphaAscendButton" )->getPosition() ); + break; + case Cost: + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CostButton" )->getPosition() ); + break; + case Size: + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/SizeAscendButton" )->getPosition() ); + break; + case Rank: + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/RankButton" )->getPosition() ); + break; + case Amount: + CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/CategoryHighlightImage" ) + ->setPosition( CEGUI::WindowManager::getSingleton().getWindow( "MarketWindow/Sort/AmountAscendButton" )->getPosition() ); + break; + } + + updateMarketView(); +} + +void MarketDialog::populateItemWidget( CEGUI::Window * window, std::vector < CEGUI::Window * > & vWindow, int & col, int & row){ + int itemWidth = 98; + int itemHeight = 106; + float winWidth = windowWidth( window ); + float winHeight = windowHeight( window ); + + col = (int)floor( winWidth / itemWidth ); + row = (int)floor( winHeight / itemHeight ); + + int xBound = (int)floor( ( winWidth - col * itemWidth ) / col ); + int yBound = (int)floor( ( winHeight - row * itemHeight ) / row ); + + for ( int i = 0; i < row; i ++ ){ + for ( int j = 0; j < col; j ++ ){ + CEGUI::Window * item = CEGUI::WindowManager::getSingleton().loadWindowLayout( "dialogs/MarketItemShortDialog.layout" ); + CEGUI::String basename( window->getName() + item->getName() + toStr( i * col + j ).c_str() ); + + item->rename( basename ); + renameClonedWindows( item, basename ); + + window->addChildWindow( item ); + item->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, ( xBound + itemWidth ) * j ), + CEGUI::UDim( 0.0, yBound + ( yBound + itemHeight ) * i ) ) ); + vWindow.push_back( item ); + } + } +} + +bool MarketDialog::handleCategorieChanged( const CEGUI::EventArgs & e ){ + const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); + selectedCategory_ = we.window->getText().c_str(); + + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"CategorieHighlight")->setPosition( + we.window->getPosition() ); + + marketOffsetRow_ = 0; + updateMarketView(); + return true; +} + + +bool MarketDialog::handleMarketItemMouseEnters( const CEGUI::EventArgs & e ){ + const CEGUI::WindowEventArgs & we = static_cast< const CEGUI::WindowEventArgs & >( e ); + + Entity *item = (Entity *)we.window->getUserData(); +// Entity *item = dynamic_cast< Entity * >( we.window->getUserData() ); + if ( item ){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Name/Text")-> + setProperty("Text", item->name() ); + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Size/Text")-> + setProperty("Text", CEGUI::String( toStr( item->size() ).c_str() ) ); + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Text")-> + setProperty("Text", CEGUI::String( toStr( item->mass() ).c_str() ) ); + + std::string t( item->description() ); + CEGUI::String outText; + int lineLength = 130; + for ( int i = 0; i < ceil( t.size()/lineLength )+1; i ++ ){ + int count = lineLength; + if ( i * lineLength + count > (int)t.size() ){ count = -1; } + CEGUI::String text( t, i * lineLength, count ); + outText += text; + if ( count != -1 ) outText += '\n'; + } + + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Text")-> + setProperty("Text", outText ); + + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Name/Label")->show(); + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Size/Label")->show(); + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Label")->show(); + CEGUI::WindowManager::getSingleton().getWin... [truncated message content] |
From: <eg...@us...> - 2010-01-02 16:45:20
|
Revision: 1178 http://opengate.svn.sourceforge.net/opengate/?rev=1178&view=rev Author: egore Date: 2010-01-02 16:45:14 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Extend comment Modified Paths: -------------- trunk/src/sector/SectorVesselObject.cpp Modified: trunk/src/sector/SectorVesselObject.cpp =================================================================== --- trunk/src/sector/SectorVesselObject.cpp 2010-01-02 16:44:39 UTC (rev 1177) +++ trunk/src/sector/SectorVesselObject.cpp 2010-01-02 16:45:14 UTC (rev 1178) @@ -123,7 +123,7 @@ } /*! - * \brief this method will check if enough power is available + * \brief this method will check if enough power is available and powers the parts of a ship */ bool SectorVesselObject::updatePowerGrid( Ogre::Real elapsedTime ){ Uint32 powerLine = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2010-01-02 16:44:48
|
Revision: 1177 http://opengate.svn.sourceforge.net/opengate/?rev=1177&view=rev Author: egore Date: 2010-01-02 16:44:39 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Add comment Modified Paths: -------------- trunk/src/sector/SectorVesselObject.cpp Modified: trunk/src/sector/SectorVesselObject.cpp =================================================================== --- trunk/src/sector/SectorVesselObject.cpp 2010-01-02 16:28:18 UTC (rev 1176) +++ trunk/src/sector/SectorVesselObject.cpp 2010-01-02 16:44:39 UTC (rev 1177) @@ -122,6 +122,9 @@ SectorMovableObject::collide( object ); } +/*! + * \brief this method will check if enough power is available + */ bool SectorVesselObject::updatePowerGrid( Ogre::Real elapsedTime ){ Uint32 powerLine = 0; if ( this->vessel()->powerPlant() ) powerLine = this->vessel()->powerPlant()->powerOutput(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |