From c71affb777bd2f19b9521477c3630f0776604bb2 Mon Sep 17 00:00:00 2001 From: maikmerten Date: Thu, 11 Aug 2005 17:28:32 +0000 Subject: [PATCH] Wazat's menu git-svn-id: svn://svn.icculus.org/nexuiz/trunk@488 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- scmenu/creategame/basic.menu | 51 ++-- scmenu/creategame/game.menu | 174 ++++-------- scmenu/creategame/gamemodes/ctf.menu | 68 +++++ scmenu/creategame/gamemodes/domination.menu | 84 ++++++ scmenu/creategame/gamemodes/gamemisc.menu | 143 ++++++++++ scmenu/creategame/gamemodes/runematch.menu | 280 ++++++++++++++++++++ scmenu/creategame/gamemodes/teamplay.menu | 82 ++++++ scmenu/creategame/maplist.menu | 35 ++- scmenu/data.menu | 9 +- scmenu/data/gamemodes/ctf.menu | 63 +++++ scmenu/data/gamemodes/domination.menu | 76 ++++++ scmenu/data/gamemodes/gamemisc.menu | 161 +++++++++++ scmenu/data/gamemodes/runematch.menu | 250 +++++++++++++++++ scmenu/data/gamemodes/teamplay.menu | 80 ++++++ scmenu/data/server.menu | 53 ++-- scmenu/source/base/snd.qc | 6 +- scmenu/source/control/data/data.qh | 4 +- scmenu/source/control/data/fastresync.qc | 2 + scmenu/source/control/data/router.qc | 6 +- scmenu/source/custom/creategame.qm | 16 +- scmenu/source/custom/creategame/maps.qc | 101 ++++++- scmenu/templates.menu | 6 +- 22 files changed, 1562 insertions(+), 188 deletions(-) create mode 100644 scmenu/creategame/gamemodes/ctf.menu create mode 100644 scmenu/creategame/gamemodes/domination.menu create mode 100644 scmenu/creategame/gamemodes/gamemisc.menu create mode 100644 scmenu/creategame/gamemodes/runematch.menu create mode 100644 scmenu/creategame/gamemodes/teamplay.menu create mode 100644 scmenu/data/gamemodes/ctf.menu create mode 100644 scmenu/data/gamemodes/domination.menu create mode 100644 scmenu/data/gamemodes/gamemisc.menu create mode 100644 scmenu/data/gamemodes/runematch.menu create mode 100644 scmenu/data/gamemodes/teamplay.menu diff --git a/scmenu/creategame/basic.menu b/scmenu/creategame/basic.menu index 8b4e749d4..192cd8a49 100644 --- a/scmenu/creategame/basic.menu +++ b/scmenu/creategame/basic.menu @@ -7,6 +7,19 @@ Item Window Basic Item Window Map { + DeriveTemplate Nex_Composition Nex_Option_MapType + { + DeriveTemplate Nex_Automation_Option_Switch Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate SwitchButton Switch + { + size '200 12' + action Nex_MapDB_RefreshFiles + } + } + size '400 585' flag [FlagEmbedded] @@ -20,11 +33,11 @@ Item Window Basic { picture "gfx/m_white" size '350 300' - pos '20 20' + pos '20 40' } Derive MultiLabel Description { - pos '20 320' + pos '20 340' size '350 285' wrap 31 fontSize '11 11 0' @@ -32,22 +45,28 @@ Item Window Basic Derive TextButton Prev { normal "<<" - pos '20 5' + pos '20 25' action Nex_Action_MapSelector_Prev } Derive Label Name { alignment [AlignCenter] size '306 14' - pos '44 4' + pos '44 24' } Derive TextButton Next { normal ">>" - pos '348 5' + pos '348 25' action Nex_Action_MapSelector_Next } + Derive Nex_Option_MapType MapType + { + pos '50 5' + text "Filter" + target "Data::Server::MapType::Switch" + } Item Task_Job UpdateJob { update Nex_MapSelector_UpdateMap @@ -81,31 +100,21 @@ Item Window Basic text "Server Name" target "Data::Server::Hostname::Text" } + //Derive Nex_Option_Switch GameMode + //{ + // text "Game Mode" + // target "::Data::Server::GameMode::Switch" + //} Derive Nex_Option_Switch GameType { - text "Game Mode" + text "Mod" target "Data::Server::ServerProgs::Switch" } - Derive Nex_Option_Switch TeamPlay - { - text "Teamplay" - target "::Data::Server::TeamPlay::Switch" - } Derive Nex_Option_Switch PublicServer { text "Public Server" target "Data::Server::PublicServer::Switch" } - Derive Nex_Option_EditBox FragLimit - { - text "Frag Limit" - target "Data::Server::FragLimit::Text" - } - Derive Nex_Option_EditBox TimeLimit - { - text "Time Limit" - target "Data::Server::TimeLimit::Text" - } Derive Nex_Option_EditBox MaxPlayer { text "Max Players" diff --git a/scmenu/creategame/game.menu b/scmenu/creategame/game.menu index 67e191ed6..9b9fed951 100644 --- a/scmenu/creategame/game.menu +++ b/scmenu/creategame/game.menu @@ -1,138 +1,56 @@ -// Property of Alientrap/AK -// -// creategame/game.menu Item Layout Game { - direction [Nex_DefaultVertDirection] - size '900 585' - origin '450 0' - alignment [AlignFirst] + direction '20 0' - DeriveTemplate Nex_Composition Nex_Option_EditBox + Item Arrangement Menu { - DeriveTemplate Nex_Automation_Option_EditBox Automation - {} - DeriveTemplate TextButton Description - {} - DeriveTemplate EditBox EditBox + direction '0 10' + + Derive TextButton Teamplay { - size '260 12' - action Nex_Action_TestOnChange - select Nex_Action_TestOnSelect + normal "DM & Teamplay" + + init Nex_Action_JumpToPage + target "Panel::Teamplay" } - } + Derive TextButton CTF + { + normal "CTF" - Derive Nex_Option_Switch Instagib - { - text "Instagib" - target "::Data::Game::Instagib::Switch" - } - Derive Nex_Option_Switch Rocketarena - { - text "Rocket Arena" - target "::Data::Game::RocketArena::Switch" - } - Derive Nex_Option_Switch Vampire - { - text "Vampire Mode" - target "::Data::Game::Vampire::Switch" - } - Derive Nex_Option_Switch Casings - { - text "Bullet Casings" - target "::Data::Game::Casings::Switch" - } - Derive Nex_Option_EditBox HealthStart - { - text "Starting Health" - target "Data::Game::HealthStart::Text" - } - Derive Nex_Option_EditBox HealthRot - { - text "Health Rot" - target "Data::Game::HealthRot::Text" - } - Derive Nex_Option_EditBox HealthStable - { - text "Health Stable" - target "Data::Game::HealthStable::Text" - } - Derive Nex_Option_EditBox Gravity - { - text "Level Gravity" - target "Data::Game::Gravity::Text" - } - Derive Nex_Option_EditBox Maxspeed - { - text "Player Maxspeed" - target "Data::Game::MaxSpeed::Text" - } - Derive Nex_Option_EditBox Gamespeed - { - text "Game Speed" - target "Data::Game::GameSpeed::Text" - } - Derive Nex_Option_EditBox Maxairspeed - { - text "Max Air Speed" - target "Data::Game::MaxAirSpeed::Text" - } - Derive Nex_Option_EditBox JumpHeight - { - text "Jump height" - target "Data::Game::JumpHeight::Text" - } - Derive Nex_Option_EditBox HealthRegeneration - { - text "Health Regeneration Speed" - target "Data::Game::HealthRegeneration::Text" - } - Derive Nex_Option_EditBox ArmorRott - { - text "Armor Rot Speed" - target "Data::Game::ArmorRott::Text" - } - Derive Nex_Option_EditBox ArmorRegen - { - text "Armor Regeneration Speed" - target "Data::Game::ArmorRegen::Text" - } - Derive Nex_Option_EditBox ArmorStable - { - text "Armor Stable" - target "Data::Game::ArmorStable::Text" - } - Derive Nex_Option_EditBox ArmorStart - { - text "Armor Start" - target "Data::Game::ArmorStart::Text" - } - Derive Nex_Option_EditBox SelfDamagePercent - { - text "Self Damage Percent" - target "Data::Game::SelfDamagePercent::Text" - } - Derive Nex_Option_EditBox WeaponSwitchDelay - { - text "Weapon Switch Delay" - target "Data::Game::WeaponSwitchDelay::Text" - } - Derive Nex_Option_EditBox Friction - { - text "Player Friction" - target "Data::Game::Friction::Text" - } - Derive Nex_Option_EditBox Accelerate - { - text "Player Accelerate" - target "Data::Game::Accelerate::Text" + init Nex_Action_JumpToPage + target "Panel::CTF" + } + Derive TextButton Domination + { + normal "Domination" + + init Nex_Action_JumpToPage + target "Panel::Domination" + } + Derive TextButton Runematch + { + normal "Rune Match" + + init Nex_Action_JumpToPage + target "Panel::Runematch" + } + Derive TextButton GameMisc + { + normal "Misc" + + init Nex_Action_JumpToPage + target "Panel::GameMisc" + } } - Derive Nex_Line Seperator - {} - Derive TextButton Reset + Item EventWindow Panel { - normal "Reset to default" - init Nex_Action_ResetData - target "::Data::Game" + size '760 800' + reinit Nex_Action_MakeFirstVisible + + #include "menu/creategame/gamemodes/gamemisc.menu" + #include "menu/creategame/gamemodes/teamplay.menu" + #include "menu/creategame/gamemodes/ctf.menu" + #include "menu/creategame/gamemodes/domination.menu" + #include "menu/creategame/gamemodes/runematch.menu" } -} +} \ No newline at end of file diff --git a/scmenu/creategame/gamemodes/ctf.menu b/scmenu/creategame/gamemodes/ctf.menu new file mode 100644 index 000000000..ee84bfda3 --- /dev/null +++ b/scmenu/creategame/gamemodes/ctf.menu @@ -0,0 +1,68 @@ +Item Layout CTF +{ + direction [Nex_DefaultVertDirection] + size '900 585' + origin '450 0' + alignment [AlignFirst] + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + + Derive Nex_Option_EditBox CaptureLimit + { + text "CTF Point Limit Override" + target "Data::CTF::CaptureLimit::Text" + } + Derive Nex_Option_EditBox FlagReturnTime + { + text "Flag Return Time" + target "::Data::CTF::FlagReturnTime::Text" + } + Derive Nex_Option_EditBox FragsCapture + { + text "Capture Points (player)" + target "Data::CTF::FragsCapture::Text" + } + Derive Nex_Option_EditBox FragsCaptureTeam + { + text "Capture Points (team)" + target "::Data::CTF::FragsCaptureTeam::Text" + } + Derive Nex_Option_EditBox FragsPickup + { + text "Flag Pickup Points" + target "Data::CTF::FragsPickup::Text" + } + Derive Nex_Option_EditBox FragsReturn + { + text "Return Flag Points (ally)" + target "::Data::CTF::FragsReturn::Text" + } + Derive Nex_Option_EditBox FragsReturnRogue + { + text "Return Flag Points (rogue team)" + target "::Data::CTF::FragsReturnRogue::Text" + } + + + + Derive Nex_Line Seperator + {} + Derive TextButton Reset + { + normal "Reset to default" + init Nex_Action_ResetData + target "::Data::CTF" + } +} diff --git a/scmenu/creategame/gamemodes/domination.menu b/scmenu/creategame/gamemodes/domination.menu new file mode 100644 index 000000000..0acd8ee8f --- /dev/null +++ b/scmenu/creategame/gamemodes/domination.menu @@ -0,0 +1,84 @@ +Item Layout Domination +{ + direction [Nex_DefaultVertDirection] + size '900 585' + origin '450 0' + alignment [AlignFirst] + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + + //Derive Nex_Option_Switch Domination_Active + //{ + // text "Play Domination" + // target "::Data::Domination::Domination_Active::Switch" + //} + Derive Nex_Option_EditBox TimeLimit + { + text "Time Limit Override" + // use the same one from the basic menu + target "Data::Server::TimeLimit::Text" + } + Derive Nex_Option_EditBox DomFragLimit + { + text "Score Limit Override" + target "Data::Domination::DomFragLimit::Text" + } + + Derive Nex_Option_Switch DisableFrags + { + text "No Scores From Kills" + target "::Data::Domination::DisableFrags::Switch" + } + //Derive Nex_Option_Switch BalanceTeamPoints + //{ + // text "Team Size Affects Points" + // target "::Data::Domination::BalanceTeamPoints::Switch" + //} + Derive Nex_Option_EditBox PointAmt + { + text "Domination Score Amount" + target "Data::Domination::PointAmt::Text" + } + Derive Nex_Option_EditBox PointRate + { + text "Score Frequency" + target "Data::Domination::PointRate::Text" + } + Derive Nex_Option_EditBox CaptureTime + { + text "DomPoint Capture Delay" + target "::Data::Domination::CaptureTime::Text" + } + //Derive Nex_Option_EditBox DefaultNumTeams + //{ + // text "Default # of Teams on Non-Domination Maps (2-4)" + // target "::Data::Domination::DefaultNumTeams::Text" + //} + Derive Nex_Option_Switch DefaultNumTeams + { + text "Default # of teams" + target "Data::Domination::DefaultNumTeams::Switch" + } + + + Derive Nex_Line Seperator + {} + Derive TextButton Reset + { + normal "Reset to default" + init Nex_Action_ResetData + target "::Data::CTF" + } +} diff --git a/scmenu/creategame/gamemodes/gamemisc.menu b/scmenu/creategame/gamemodes/gamemisc.menu new file mode 100644 index 000000000..22d5458c4 --- /dev/null +++ b/scmenu/creategame/gamemodes/gamemisc.menu @@ -0,0 +1,143 @@ +// Property of Alientrap/AK +// +// creategame/game.menu +Item Layout GameMisc +{ + direction [Nex_DefaultVertDirection] + size '900 585' + origin '450 0' + alignment [AlignFirst] + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + + Derive Nex_Option_EditBox JoinMessageTime + { + text "Join Message Display Time" + target "Data::GameMisc::JoinMessageTime::Text" + } + Derive Nex_Option_Switch Instagib + { + text "Instagib" + target "::Data::GameMisc::Instagib::Switch" + } + Derive Nex_Option_Switch Rocketarena + { + text "Rocket Arena" + target "::Data::GameMisc::RocketArena::Switch" + } + Derive Nex_Option_Switch Vampire + { + text "Vampire Mode" + target "::Data::GameMisc::Vampire::Switch" + } + Derive Nex_Option_Switch Casings + { + text "Bullet Casings" + target "::Data::GameMisc::Casings::Switch" + } + Derive Nex_Option_EditBox HealthStart + { + text "Starting Health" + target "Data::GameMisc::HealthStart::Text" + } + Derive Nex_Option_EditBox HealthRot + { + text "Health Rot" + target "Data::GameMisc::HealthRot::Text" + } + Derive Nex_Option_EditBox HealthStable + { + text "Health Stable" + target "Data::GameMisc::HealthStable::Text" + } + Derive Nex_Option_EditBox Gravity + { + text "Level Gravity" + target "Data::GameMisc::Gravity::Text" + } + Derive Nex_Option_EditBox Maxspeed + { + text "Player Maxspeed" + target "Data::GameMisc::MaxSpeed::Text" + } + Derive Nex_Option_EditBox Gamespeed + { + text "Game Speed" + target "Data::GameMisc::GameSpeed::Text" + } + Derive Nex_Option_EditBox Maxairspeed + { + text "Max Air Speed" + target "Data::GameMisc::MaxAirSpeed::Text" + } + Derive Nex_Option_EditBox JumpHeight + { + text "Jump height" + target "Data::GameMisc::JumpHeight::Text" + } + Derive Nex_Option_EditBox HealthRegeneration + { + text "Health Regeneration Speed" + target "Data::GameMisc::HealthRegeneration::Text" + } + Derive Nex_Option_EditBox ArmorRott + { + text "Armor Rot Speed" + target "Data::GameMisc::ArmorRott::Text" + } + Derive Nex_Option_EditBox ArmorRegen + { + text "Armor Regeneration Speed" + target "Data::GameMisc::ArmorRegen::Text" + } + Derive Nex_Option_EditBox ArmorStable + { + text "Armor Stable" + target "Data::GameMisc::ArmorStable::Text" + } + Derive Nex_Option_EditBox ArmorStart + { + text "Armor Start" + target "Data::GameMisc::ArmorStart::Text" + } + Derive Nex_Option_EditBox SelfDamagePercent + { + text "Self Damage Percent" + target "Data::GameMisc::SelfDamagePercent::Text" + } + Derive Nex_Option_EditBox WeaponSwitchDelay + { + text "Weapon Switch Delay" + target "Data::GameMisc::WeaponSwitchDelay::Text" + } + Derive Nex_Option_EditBox Friction + { + text "Player Friction" + target "Data::GameMisc::Friction::Text" + } + Derive Nex_Option_EditBox Accelerate + { + text "Player Accelerate" + target "Data::GameMisc::Accelerate::Text" + } + Derive Nex_Line Seperator + {} + Derive TextButton Reset + { + normal "Reset to default" + init Nex_Action_ResetData + target "::Data::GameMisc" + } +} diff --git a/scmenu/creategame/gamemodes/runematch.menu b/scmenu/creategame/gamemodes/runematch.menu new file mode 100644 index 000000000..69aaa8ef9 --- /dev/null +++ b/scmenu/creategame/gamemodes/runematch.menu @@ -0,0 +1,280 @@ +Item Layout Runematch +{ + size '800 585' + flag [FlagEmbedded] + + Item ScrollWindow ScrollWindow + { + size '780 585' + flag [FlagEmbedded] + + Item Arrangement Arrangement + { + direction [Nex_DefaultVertDirection] + alignment [AlignFirst] + flag [FlagEmbedded] + + // hack to make the arrangement have a set width + Item Window FixWidth + { + size '800 0' + Derive Nex_Void Left + { + pos '0 0' + size '400 0' + } + Derive Nex_Void Right + { + pos '400 0' + size '400 0' + } + } + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + + + + + Derive Nex_Option_EditBox TimeLimit + { + text "Time Limit Override" + // use the same one from the basic menu + target "Data::Server::TimeLimit::Text" + } + Derive Nex_Option_EditBox RunematchFragLimit + { + text "Score Limit Override" + target "Data::Runematch::RunematchFragLimit::Text" + } + + Derive Nex_Option_EditBox PointAmt + { + text "Score per Rune" + target "Data::Runematch::PointAmt::Text" + } + Derive Nex_Option_EditBox PointRate + { + text "Rune Score Frequency" + target "Data::Runematch::PointRate::Text" + } + Derive Nex_Option_EditBox RuneRespawnTime + { + text "Rune Respawn Timer After Dropped" + target "Data::Runematch::RuneRespawnTime::Text" + } + Derive Nex_Option_EditBox RuneShuffleTime + { + text "Rune Position Change Timer" + target "Data::Runematch::RuneShuffleTime::Text" + } + Derive Nex_Option_EditBox FragsKilledbyRuneholder + { + text "Frags When Holding Runes" + target "Data::Runematch::FragsKilledbyRuneholder::Text" + } + Derive Nex_Option_EditBox FragsKilledRuneholder + { + text "Frags for Killing Rune Holders" + target "Data::Runematch::FragsKilledRuneholder::Text" + } + Derive Nex_Option_EditBox FragsKillNoRunes + { + text "Other Frags (for non-rune kills)" + target "Data::Runematch::FragsKillNoRunes::Text" + } + Derive Nex_Option_EditBox MaxRunesToDrop + { + text "Max Runes to Drop on Death" + target "Data::Runematch::MaxRunesToDrop::Text" + } + + Derive Nex_Line SeperatorStrength + {} + Derive Nex_Option_EditBox StrengthDamage + { + text "Strength Damage" + target "Data::Runematch::StrengthDamage::Text" + } + Derive Nex_Option_EditBox StrengthForce + { + text "Strength Force" + target "Data::Runematch::StrengthForce::Text" + } + Derive Nex_Option_EditBox WeaknessDamage + { + text "Weakness Damage" + target "Data::Runematch::WeaknessDamage::Text" + } + Derive Nex_Option_EditBox WeaknessForce + { + text "Weakness Force" + target "Data::Runematch::WeaknessForce::Text" + } + Derive Nex_Option_EditBox StrengthComboDamage + { + text "Combined Damage" + target "Data::Runematch::StrengthComboDamage::Text" + } + Derive Nex_Option_EditBox StrengthComboForce + { + text "Combined Force" + target "Data::Runematch::StrengthComboForce::Text" + } + + + Derive Nex_Line SeperatorDefense + {} + Derive Nex_Option_EditBox DefenseDamage + { + text "Defense TakeDamage" + target "Data::Runematch::DefenseDamage::Text" + } + Derive Nex_Option_EditBox VulnerDamage + { + text "Vulnerability TakeDamage" + target "Data::Runematch::VulnerDamage::Text" + } + Derive Nex_Option_EditBox DefenseComboDamage + { + text "Combined TakeDamage" + target "Data::Runematch::DefenseComboDamage::Text" + } + + + Derive Nex_Line SeperatorVampire + {} + Derive Nex_Option_EditBox VampireDamage + { + text "Vampire Damage Absorb" + target "Data::Runematch::VampireDamage::Text" + } + Derive Nex_Option_EditBox EmpathyDamage + { + text "Empathy Damage Take" + target "Data::Runematch::EmpathyDamage::Text" + } + Derive Nex_Option_EditBox VampireComboDamage + { + text "Combined Absorb or Take" + target "Data::Runematch::VampireComboDamage::Text" + } + + + Derive Nex_Line SeperatorRegen + {} + Derive Nex_Option_EditBox RegenHP + { + text "Vitality Health" + target "Data::Runematch::RegenHP::Text" + } + Derive Nex_Option_EditBox VenomHP + { + text "Venom Health" + target "Data::Runematch::VenomHP::Text" + } + Derive Nex_Option_EditBox RegenComboHP + { + text "Combined Health" + target "Data::Runematch::RegenComboHP::Text" + } + Derive Nex_Option_EditBox RegenSpeed + { + text "Vitality Regenerate Speed" + target "Data::Runematch::RegenSpeed::Text" + } + Derive Nex_Option_EditBox VenomSpeed + { + text "Venom Degenerate Speed" + target "Data::Runematch::VenomSpeed::Text" + } + Derive Nex_Option_EditBox RegenComboRegenSpeed + { + text "Combined Regenerate Speed" + target "Data::Runematch::RegenComboRegenSpeed::Text" + } + Derive Nex_Option_EditBox RegenComboDegenSpeed + { + text "Combined Degenerate Speed" + target "Data::Runematch::RegenComboDegenSpeed::Text" + } + + + Derive Nex_Line SeperatorSpeed + {} + Derive Nex_Option_EditBox SpeedMoverate + { + text "Speed Move Rate" + target "Data::Runematch::SpeedMoverate::Text" + } + Derive Nex_Option_EditBox SlowMoverate + { + text "Slow Move Rate" + target "Data::Runematch::SlowMoverate::Text" + } + Derive Nex_Option_EditBox SpeedComboMoverate + { + text "Combined Move Rate" + target "Data::Runematch::SpeedComboMoverate::Text" + } + Derive Nex_Option_EditBox SpeedAtkrate + { + text "Speed Attack Rate" + target "Data::Runematch::SpeedAtkrate::Text" + } + Derive Nex_Option_EditBox SlowAtkrate + { + text "Slow Attack Rate" + target "Data::Runematch::SlowAtkrate::Text" + } + Derive Nex_Option_EditBox SpeedComboAtkrate + { + text "Combined Attack Rate" + target "Data::Runematch::SpeedComboAtkrate::Text" + } + Derive Nex_Option_EditBox SpeedJumpHeight + { + text "Speed Jump Height" + target "Data::Runematch::SpeedJumpHeight::Text" + } + Derive Nex_Option_EditBox SlowJumpHeight + { + text "Slow Jump Height" + target "Data::Runematch::SlowJumpHeight::Text" + } + Derive Nex_Option_EditBox SpeedComboJumpHeight + { + text "Combined Jump Height" + target "Data::Runematch::SpeedComboJumpHeight::Text" + } + + + + Derive Nex_Line Seperator + {} + Derive TextButton Reset + { + normal "Reset to default" + init Nex_Action_ResetData + target "::Data::Runematch" + } + } + } + Item VScrollBar Scroller + { + pos '780 0' + size '20 100' + target "##prev" + } +} diff --git a/scmenu/creategame/gamemodes/teamplay.menu b/scmenu/creategame/gamemodes/teamplay.menu new file mode 100644 index 000000000..b3ed07106 --- /dev/null +++ b/scmenu/creategame/gamemodes/teamplay.menu @@ -0,0 +1,82 @@ +Item Layout Teamplay +{ + direction [Nex_DefaultVertDirection] + size '900 585' + origin '450 0' + alignment [AlignFirst] + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + + Derive Nex_Option_EditBox FragLimit + { + text "Frag Limit Override" + target "Data::Server::FragLimit::Text" + } + Derive Nex_Option_EditBox TimeLimit + { + text "Time Limit Override" + target "Data::Server::TimeLimit::Text" + } + Derive Nex_Option_Switch DMForceTeamplay + { + text "Force Teamplay (TDM) in Deathmatch maps" + target "::Data::Teamplay::DMForceTeamplay::Switch" + } + Derive Nex_Option_Switch TeamPlay + { + text "Teamplay Friendly Fire" + target "::Data::Teamplay::TeamPlay::Switch" + } + Derive Nex_Option_Switch BalanceTeams + { + text "Auto-Balance Teams on Join" + target "::Data::Teamplay::BalanceTeams::Switch" + } + Derive Nex_Option_Switch ForceBalanceTeams + { + text "Force Balanced Teams" + target "::Data::Teamplay::ForceBalanceTeams::Switch" + } + Derive Nex_Option_Switch PreventTeamImbalance + { + text "Prevent Team-Imbalancing Switch" + target "::Data::Teamplay::PreventTeamImbalance::Switch" + } + Derive Nex_Option_Switch BanChangeTeams + { + text "Changing team not allowed" + target "::Data::Teamplay::BanChangeTeams::Switch" + } + Derive Nex_Option_Switch TDM_NumTeams + { + text "Team Deathmatch (TDM) # of teams" + target "Data::Teamplay::TDM_NumTeams::Switch" + } + Derive Nex_Option_EditBox ChangeTeamFragTransfer + { + text "Score Transfer % on Change Team" + target "Data::Teamplay::ChangeTeamFragTransfer::Text" + } + + + Derive Nex_Line Seperator + {} + Derive TextButton Reset + { + normal "Reset to default" + init Nex_Action_ResetData + target "::Data::Teamplay" + } +} diff --git a/scmenu/creategame/maplist.menu b/scmenu/creategame/maplist.menu index 220ba1342..06a6fdf76 100644 --- a/scmenu/creategame/maplist.menu +++ b/scmenu/creategame/maplist.menu @@ -7,12 +7,12 @@ Item Window MapList Derive Label MapsLabel { - pos '0 0' + pos '0 20' text "Map List:" } Derive List Maps { - pos '0 20' + pos '0 40' size '425 500' target "::Data::Server::Map::List" @@ -20,17 +20,44 @@ Item Window MapList } Derive Label CycleLabel { - pos '475 0' + pos '475 20' text "Cycle List:" } Derive List Cycle { - pos '475 20' + pos '475 40' size '425 450' target "::Data::Server::Map::Cycle" action Nex_Action_Cycle_Remove } + Item Layout MapOptions + { + pos '0 0' + size '900 20' + flag [FlagEmbedded] + direction '50 0' + + DeriveTemplate Nex_Composition Nex_Option_EditBox + { + DeriveTemplate Nex_Automation_Option_EditBox Automation + {} + DeriveTemplate TextButton Description + {} + DeriveTemplate EditBox EditBox + { + size '260 12' + action Nex_Action_TestOnChange + select Nex_Action_TestOnSelect + } + } + Derive Nex_Option_EditBox MapType + { + text "Map Type" + target "Data::Server::MapType::Switch" + } + } + Item Layout Panel { pos '475 470' diff --git a/scmenu/data.menu b/scmenu/data.menu index 78878af9d..7f23061e7 100644 --- a/scmenu/data.menu +++ b/scmenu/data.menu @@ -19,7 +19,14 @@ Item DataContainer Data #include "menu/data/serverlist.menu" #include "menu/data/server.menu" - #include "menu/data/game.menu" + + // game modes + #include "menu/data/gamemodes/gamemisc.menu" + #include "menu/data/gamemodes/teamplay.menu" + #include "menu/data/gamemodes/ctf.menu" + #include "menu/data/gamemodes/domination.menu" + #include "menu/data/gamemodes/runematch.menu" + #include "menu/data/weapon.menu" #include "menu/data/management.menu" } diff --git a/scmenu/data/gamemodes/ctf.menu b/scmenu/data/gamemodes/ctf.menu new file mode 100644 index 000000000..77b1c41a8 --- /dev/null +++ b/scmenu/data/gamemodes/ctf.menu @@ -0,0 +1,63 @@ +// Property of Alientrap +// +// data/ctf.menu + +Item DataContainer CTF +{ + //Item Data_Cvar CTF_Active + //{ + // cvarName "g_ctf" + // defValue 0 + // [DataLink_OnOffSwitch] + //} + Item Data_Cvar CaptureLimit + { + cvarName "g_ctf_capture_limit" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar FlagReturnTime + { + cvarName "g_ctf_flag_returntime" + defValue 20 + + [DataLink_Setting] + } + Item Data_Cvar FragsCapture + { + cvarName "g_ctf_flagscore_capture" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar FragsCaptureTeam + { + cvarName "g_ctf_flagscore_capture_team" + defValue 20 + + [DataLink_Setting] + } + Item Data_Cvar FragsPickup + { + cvarName "g_ctf_flagscore_pickup" + defValue 1 + + [DataLink_Setting] + } + Item Data_Cvar FragsReturn + { + cvarName "g_ctf_flagscore_return" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar FragsReturnRogue + { + cvarName "g_ctf_flagscore_return_rogue" + defValue 10 + + [DataLink_Setting] + } + +} diff --git a/scmenu/data/gamemodes/domination.menu b/scmenu/data/gamemodes/domination.menu new file mode 100644 index 000000000..53d175911 --- /dev/null +++ b/scmenu/data/gamemodes/domination.menu @@ -0,0 +1,76 @@ +// Property of Alientrap +// +// data/ctf.menu + +Item DataContainer Domination +{ + //Item Data_Cvar Domination_Active + //{ + // cvarName "g_domination" + // defValue 0 + // [DataLink_OnOffSwitch] + //} + Item Data_Cvar DomFragLimit + { + cvarName "g_domination_point_limit" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar DisableFrags + { + cvarName "g_domination_disable_frags" + defValue 0 + + [DataLink_OnOffSwitch] + } + //Item Data_Cvar BalanceTeamPoints + //{ + // cvarName "g_domination_balance_team_points" + // defValue 0 + + // [DataLink_OnOffSwitch] + //} + Item Data_Cvar PointAmt + { + cvarName "g_domination_point_amt" + defValue 1 + + [DataLink_Setting] + } + Item Data_Cvar PointRate + { + cvarName "g_domination_point_rate" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar CaptureTime + { + cvarName "g_domination_point_capturetime" + defValue 0.1 + + [DataLink_Setting] + } + //Item Data_Cvar DefaultNumTeams + //{ + // cvarName "g_domination_default_teams" + // defValue 2 + // [DataLink_Setting] + //} + Item Data_Cvar DefaultNumTeams + { + cvarName "g_domination_default_teams" + defValue 2 + + Item DataLink_ValueSwitch Switch + { + minValue 2 + stepValue 1 + maxValue 4 + descList "'Two''Three''Four'" + + link "##up" + } + } +} diff --git a/scmenu/data/gamemodes/gamemisc.menu b/scmenu/data/gamemodes/gamemisc.menu new file mode 100644 index 000000000..24fb139b8 --- /dev/null +++ b/scmenu/data/gamemodes/gamemisc.menu @@ -0,0 +1,161 @@ +// Property of Alientrap +// +// data/gamemisc.menu + +Item DataContainer GameMisc +{ + Item Data_Cvar JoinMessageTime + { + cvarName "welcome_message_time" + defValue 8 + + [DataLink_Setting] + } + Item Data_Cvar Instagib + { + cvarName "g_instagib" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar RocketArena + { + cvarName "g_rocketarena" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar Vampire + { + cvarName "g_vampire" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar Casings + { + cvarName "g_casings" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar HealthStart + { + cvarName "g_balance_health_start" + defValue 150 + + [DataLink_Setting] + } + Item Data_Cvar HealthRot + { + cvarName "g_balance_health_rot" + defValue 0.1 + + [DataLink_Setting] + } + Item Data_Cvar HealthStable + { + cvarName "g_balance_health_stable" + defValue 100 + + [DataLink_Setting] + } + Item Data_Cvar Gravity + { + cvarName "sv_gravity" + defValue 800 + + [DataLink_Setting] + } + Item Data_Cvar MaxSpeed + { + cvarName "sv_maxspeed" + defValue 400 + + [DataLink_Setting] + } + Item Data_Cvar GameSpeed + { + cvarName "slowmo" + defValue 1 + + [DataLink_Setting] + } + Item Data_Cvar MaxAirSpeed + { + cvarName "sv_maxairspeed" + defValue 50 + + [DataLink_Setting] + } + Item Data_Cvar JumpHeight + { + cvarName "g_balance_jumpheight" + defValue 300 + + [DataLink_Setting] + } + Item Data_Cvar HealthRegeneration + { + cvarName "g_balance_health_regen" + defValue 0.1 + + [DataLink_Setting] + } + Item Data_Cvar ArmorRott + { + cvarName "g_balance_armor_rot" + defValue 0.1 + + [DataLink_Setting] + } + Item Data_Cvar ArmorRegen + { + cvarName "g_balance_armor_regen" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar ArmorStable + { + cvarName "g_balance_armor_stable" + defValue 100 + + [DataLink_Setting] + } + Item Data_Cvar ArmorStart + { + cvarName "g_balance_armor_start" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar SelfDamagePercent + { + cvarName "g_balance_selfdamagepercent" + defValue 0.6 + + [DataLink_Setting] + } + Item Data_Cvar WeaponSwitchDelay + { + cvarName "g_balance_weaponswitchdelay" + defValue 0.3 + + [DataLink_Setting] + } + Item Data_Cvar Friction + { + cvarName "sv_friction" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar Accelerate + { + cvarName "sv_accelerate" + defValue 5.5 + + [DataLink_Setting] + } +} diff --git a/scmenu/data/gamemodes/runematch.menu b/scmenu/data/gamemodes/runematch.menu new file mode 100644 index 000000000..3eedd63ed --- /dev/null +++ b/scmenu/data/gamemodes/runematch.menu @@ -0,0 +1,250 @@ +// Property of Alientrap +// +// data/ctf.menu + +Item DataContainer Runematch +{ + Item Data_Cvar RunematchFragLimit + { + cvarName "g_runematch_point_limit" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar PointAmt + { + cvarName "g_runematch_pointamt" + defValue 1 + + [DataLink_Setting] + } + Item Data_Cvar PointRate + { + cvarName "g_runematch_pointrate" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar RuneRespawnTime + { + cvarName "g_runematch_respawntime" + defValue 15 + + [DataLink_Setting] + } + Item Data_Cvar RuneShuffleTime + { + cvarName "g_runematch_shuffletime" + defValue 30 + + [DataLink_Setting] + } + + Item Data_Cvar FragsKilledbyRuneholder + { + cvarName "g_runematch_frags_killedby_runeholder" + defValue 4 + + [DataLink_Setting] + } + Item Data_Cvar FragsKilledRuneholder + { + cvarName "g_runematch_frags_killed_runeholder" + defValue 5 + + [DataLink_Setting] + } + Item Data_Cvar FragsKillNoRunes + { + cvarName "g_runematch_frags_norune" + defValue 0 + + [DataLink_Setting] + } + Item Data_Cvar MaxRunesToDrop + { + cvarName "g_runematch_drop_runes_max" + defValue 2 + + [DataLink_Setting] + } + + + Item Data_Cvar StrengthDamage + { + cvarName "g_balance_rune_strength_damage" + defValue 2.0 + [DataLink_Setting] + } + Item Data_Cvar StrengthForce + { + cvarName "g_balance_rune_strength_force" + defValue 1.5 + [DataLink_Setting] + } + Item Data_Cvar WeaknessDamage + { + cvarName "g_balance_curse_weak_damage" + defValue 0.5 + [DataLink_Setting] + } + Item Data_Cvar WeaknessForce + { + cvarName "g_balance_curse_weak_force" + defValue 0.5 + [DataLink_Setting] + } + Item Data_Cvar StrengthComboDamage + { + cvarName "g_balance_rune_strength_combo_damage" + defValue 0.9 + [DataLink_Setting] + } + Item Data_Cvar StrengthComboForce + { + cvarName "g_balance_rune_strength_combo_force" + defValue 1.0 + [DataLink_Setting] + } + + + Item Data_Cvar DefenseDamage + { + cvarName "g_balance_rune_defense_takedamage" + defValue 0.5 + [DataLink_Setting] + } + Item Data_Cvar VulnerDamage + { + cvarName "g_balance_curse_vulner_takedamage" + defValue 2.0 + [DataLink_Setting] + } + Item Data_Cvar DefenseComboDamage + { + cvarName "g_balance_rune_defense_combo_takedamage" + defValue 1.0 + [DataLink_Setting] + } + + + Item Data_Cvar VampireDamage + { + cvarName "g_balance_rune_vampire_absorb" + defValue 0.5 + [DataLink_Setting] + } + Item Data_Cvar EmpathyDamage + { + cvarName "g_balance_curse_empathy_takedamage" + defValue -0.6 + [DataLink_Setting] + } + Item Data_Cvar VampireComboDamage + { + cvarName "g_balance_rune_vampire_combo_absorb" + defValue -0.2 + [DataLink_Setting] + } + + + Item Data_Cvar RegenHP + { + cvarName "g_balance_rune_regen_hpmod" + defValue 1.75 + [DataLink_Setting] + } + Item Data_Cvar VenomHP + { + cvarName "g_balance_curse_venom_hpmod" + defValue 0.6 + [DataLink_Setting] + } + Item Data_Cvar RegenComboHP + { + cvarName "g_balance_rune_regen_combo_hpmod" + defValue 0.9 + [DataLink_Setting] + } + Item Data_Cvar RegenSpeed + { + cvarName "g_balance_rune_regen_regenrate" + defValue 3.0 + [DataLink_Setting] + } + Item Data_Cvar VenomSpeed + { + cvarName "g_balance_curse_venom_rotrate" + defValue 3.0 + [DataLink_Setting] + } + Item Data_Cvar RegenComboRegenSpeed + { + cvarName "g_balance_rune_regen_combo_regenrate" + defValue 0.5 + [DataLink_Setting] + } + Item Data_Cvar RegenComboDegenSpeed + { + cvarName "g_balance_rune_regen_combo_rotrate" + defValue 1.5 + [DataLink_Setting] + } + + + Item Data_Cvar SpeedMoverate + { + cvarName "g_balance_rune_speed_moverate" + defValue 1.5 + [DataLink_Setting] + } + Item Data_Cvar SlowMoverate + { + cvarName "g_balance_curse_slow_moverate" + defValue 0.6 + [DataLink_Setting] + } + Item Data_Cvar SpeedComboMoverate + { + cvarName "g_balance_rune_speed_combo_moverate" + defValue 0.9 + [DataLink_Setting] + } + Item Data_Cvar SpeedAtkrate + { + cvarName "g_balance_rune_speed_atkrate" + defValue 0.6 + [DataLink_Setting] + } + Item Data_Cvar SlowAtkrate + { + cvarName "g_balance_curse_slow_atkrate" + defValue 1.75 + [DataLink_Setting] + } + Item Data_Cvar SpeedComboAtkrate + { + cvarName "g_balance_rune_speed_combo_atkrate" + defValue 1.2 + [DataLink_Setting] + } + Item Data_Cvar SpeedJumpHeight + { + cvarName "g_balance_rune_speed_jumpheight" + defValue 2.5 + [DataLink_Setting] + } + Item Data_Cvar SlowJumpHeight + { + cvarName "g_balance_curse_slow_jumpheight" + defValue 1.0 + [DataLink_Setting] + } + Item Data_Cvar SpeedComboJumpHeight + { + cvarName "g_balance_rune_speed_combo_jumpheight" + defValue 1.0 + [DataLink_Setting] + } + +} diff --git a/scmenu/data/gamemodes/teamplay.menu b/scmenu/data/gamemodes/teamplay.menu new file mode 100644 index 000000000..6f4bf4273 --- /dev/null +++ b/scmenu/data/gamemodes/teamplay.menu @@ -0,0 +1,80 @@ +// Property of Alientrap +// +// data/teamplay.menu + +Item DataContainer Teamplay +{ + Item Data_Cvar DMForceTeamplay + { + cvarName "deathmatch_force_teamplay" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar TeamPlay + { + cvarName "teamplay_default" + defValue 1 + + Item DataLink_ValueSwitch Switch + { + minValue 1 + stepValue 1 + maxValue 3 + descList "'Self Fire, No Friendly' 'Friendly Fire' 'No Friendly Fire'" + + link "##up" + } + } + Item Data_Cvar BalanceTeams + { + cvarName "g_balance_teams" + defValue 1 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar ForceBalanceTeams + { + cvarName "g_balance_teams_force" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar PreventTeamImbalance + { + cvarName "g_balance_teams_prevent_imbalance" + defValue 0 + + [DataLink_OnOffSwitch] + } + Item Data_Cvar BanChangeTeams + { + cvarName "g_changeteam_banned" + defValue 0 + + [DataLink_OnOffSwitch] + } + + Item Data_Cvar TDM_NumTeams + { + cvarName "g_tdm_teams" + defValue 2 + + Item DataLink_ValueSwitch Switch + { + minValue 2 + stepValue 1 + maxValue 4 + descList "'Two''Three''Four'" + + link "##up" + } + } + Item Data_Cvar ChangeTeamFragTransfer + { + cvarName "g_changeteam_fragtransfer" + defValue 80 + + [DataLink_Setting] + } +} diff --git a/scmenu/data/server.menu b/scmenu/data/server.menu index eea172956..7edef002b 100644 --- a/scmenu/data/server.menu +++ b/scmenu/data/server.menu @@ -62,7 +62,7 @@ Item DataContainer Server } Item Data_Cvar TimeLimit { - cvarName "timelimit" + cvarName "timelimit_override" defValue 0 Item DataLink_Value Value @@ -83,7 +83,7 @@ Item DataContainer Server } Item Data_Cvar FragLimit { - cvarName "fraglimit" + cvarName "fraglimit_override" defValue 20 [DataLink_Setting] @@ -98,6 +98,22 @@ Item DataContainer Server link "##up" } } + Item Data_Cvar GameMode + { + cvarName "gamecfg" + // from 1 to 4 + defValue 1 + + Item DataLink_ValueSwitch Switch + { + minValue 1 + stepValue 1 + maxValue 4 + descList "'Classic Deathmatch''Team Deathmatch''Domination''Capture The Flag'" + + link "##up" + } + } Item Data_CvarCreateSave NumBots { cvarName "bot_number" @@ -152,21 +168,6 @@ Item DataContainer Server link "##up" } } - Item Data_Cvar TeamPlay - { - cvarName "teamplay" - defValue 0 - - Item DataLink_ValueSwitch Switch - { - minValue 0 - stepValue 1 - maxValue 3 - descList "'Off' 'No Friendly/Self Fire' 'Friendly Fire' 'No Friendly Fire'" - - link "##up" - } - } Item Data_Cvar ServerFrameTime { cvarName "sys_ticrate" @@ -214,4 +215,22 @@ Item DataContainer Server } } } + + + Item Data_Cvar MapType + { + cvarName "menu_map_type" + defValue 1 + + Item DataLink_ValueSwitch Switch + { + minValue 1 + stepValue 1 + maxValue 6 + descList "'List All''Classic Deathmatch''Team Deathmatch''Domination''Capture The Flag''Rune Match'" + + link "##up" + } + } + } diff --git a/scmenu/source/base/snd.qc b/scmenu/source/base/snd.qc index 7fb08715c..737fa8e70 100644 --- a/scmenu/source/base/snd.qc +++ b/scmenu/source/base/snd.qc @@ -24,9 +24,7 @@ void( string pSnd ) Sound_Free = void( string pSnd) Sound_Play = { - if( pSnd ) { - _Sound_DPrint( strcat( "Playing sound '", pSnd, "'\n" ) ); - localsound( pSnd ); - } + _Sound_DPrint( strcat( "Playing sound '", pSnd, "'\n" ) ); + localsound( pSnd ); }; diff --git a/scmenu/source/control/data/data.qh b/scmenu/source/control/data/data.qh index 9e8fa07c2..7d3ed4104 100644 --- a/scmenu/source/control/data/data.qh +++ b/scmenu/source/control/data/data.qh @@ -132,6 +132,6 @@ void() Item_DataLink_TextTime_Spawn; void() Item_DataLink_AltString_Spawn; -// Item_DataLink_Router [Item_DataLink] +// Item_DataLink_Splitter [Item_DataLink] // sets value and _realValue of all children to the float value of self._realValue -void() Item_DataLink_Router_Spawn; +void() Item_DataLink_Splitter_Spawn; diff --git a/scmenu/source/control/data/fastresync.qc b/scmenu/source/control/data/fastresync.qc index 0f2af9967..e4aaf2587 100644 --- a/scmenu/source/control/data/fastresync.qc +++ b/scmenu/source/control/data/fastresync.qc @@ -14,9 +14,11 @@ void( float pEvent ) Item_DataLink_FastResync_DataEvent = } Raise_DataEvent( self._link, ITEM_DATALINK_GET ); String_EntitySet( self, value, self._link.value ); + self._realValue = self._link._realValue; } else if( pEvent == ITEM_DATALINK_SET ) { if( self._link ) { String_EntitySet( self._link, value, self.value ); + self._link._realValue = self._realValue; Raise_DataEvent( self._link, ITEM_DATALINK_SET ); } } else diff --git a/scmenu/source/control/data/router.qc b/scmenu/source/control/data/router.qc index 125f32280..67174048f 100644 --- a/scmenu/source/control/data/router.qc +++ b/scmenu/source/control/data/router.qc @@ -1,7 +1,7 @@ // DP/Nex Menu // control/data/router.qc -void( float pEvent ) Item_DataLink_Router_DataEvent = +void( float pEvent ) Item_DataLink_Splitter_DataEvent = { local entity lChild; @@ -24,9 +24,9 @@ void( float pEvent ) Item_DataLink_Router_DataEvent = } }; -void() Item_DataLink_Router_Spawn = +void() Item_DataLink_Splitter_Spawn = { Item_DataLink_Init(); - self._dataEvent = Item_DataLink_Router_DataEvent; + self._dataEvent = Item_DataLink_Splitter_DataEvent; }; diff --git a/scmenu/source/custom/creategame.qm b/scmenu/source/custom/creategame.qm index 805f0ba8d..b651b244c 100644 --- a/scmenu/source/custom/creategame.qm +++ b/scmenu/source/custom/creategame.qm @@ -85,6 +85,7 @@ void() Nex_Action_MapSelector_Prev = void() Nex_Action_Map_Start = { local entity lItem; + local string exit_cfg; // Set maxplayers lItem = Menu_GetItem( "::Data::Server::MaxPlayers" ); @@ -93,9 +94,20 @@ void() Nex_Action_Map_Start = cmd( "\"\n" ); lItem = Menu_GetItem( "::Data::Server::Map::Cycle" ); - cmd( "map \"" ); + + // if an old exit cfg file was set up, exec it + // to reset old values before starting the server + exit_cfg = cvar_string("exit_cfg"); + if(exit_cfg) + { + cmd( "exec "); + cmd( exit_cfg ); + cmd( "\n" ); + } + // exec the game reset cfg and then the mapcfg + cmd( "exec game_reset.cfg \nwait \nexec \"maps/" ); cmd( String_Normal( Util_GetAltStringItem( lItem.valueList, 0 ) ) ); - cmd( "\"\n"); + cmd( ".mapcfg\"\n"); Raise_DataEvent( lItem, ITEM_DATA_SEND ); diff --git a/scmenu/source/custom/creategame/maps.qc b/scmenu/source/custom/creategame/maps.qc index e07772f64..1587aedad 100644 --- a/scmenu/source/custom/creategame/maps.qc +++ b/scmenu/source/custom/creategame/maps.qc @@ -46,6 +46,65 @@ string _Nex_MapList_FullPath; string _Nex_MapList_Name; entity _Nex_MapList_Root; + + + +/* +=================== +Nex_MapDB_RefreshFiles +=================== +*/ + + /* fixme: + + use a switch for gametypes + and just set the action field to Nex_MapDB_RefreshFiles + + Better to write a new action function though.. + And call Nex_Action_TestOnChange to set the Data value + then set up the filter and then call RefreshFiles + or if you put the filter handling into RefrehFiles just call TestOnChange and then RefreshFiles + */ + + +void() Nex_MapDB_RefreshFiles = +{ + local entity oldself; + oldself = self; + + Nex_Action_TestOnChange(); + + Menu_EmptyWindow( _Nex_MapList_Root ); + + String_Free( _Nex_MapList_FullPath ); + String_Free( _Nex_MapList_Name ); + _Nex_MapList_FullPath = String_Create(); + _Nex_MapList_Name = String_Create(); + + self = _Nex_MapList_Root; + Item_Nex_MapDB_EnumFiles(); + + + self = Menu_GetItem( "::Data::Server::Map::Selector" ); + Item_DataLink_Nex_MapList_InitWithMapList(); + //DataLink_Nex_MapList_UpdateRange(self); + //Item_DataLink_Nex_MapList_Load(); + + + // fixme: need to change which map the map selector is pointing to right now + + Raise_DataEvent( self, ITEM_DATALINK_GET ); + if(self._realValue > self.maxValue) + self._realValue = self.maxValue; + Raise_DataEvent( self, ITEM_DATALINK_SET ); + + //Nex_MapSelector_UpdateMap(); + //Nex_MapSelector_Synchronize(); + + + self = oldself; +}; + /* =================== Item_Nex_MapDB_EnumFiles @@ -59,9 +118,39 @@ void() Item_Nex_MapDB_EnumFiles = local float lSearchHandle; local float lSearchSize; local float lSearchCounter; - local entity lMap; + local entity lMap;//, lMapType; + local string map_query; + local float lMapType; + + lMapType = cvar("menu_map_type"); + //lMapType = Menu_GetItem( "::Data::Server::MapType" ); + if(lMapType == 6)//.value == "Rune Match") + { + map_query = "maps/rune_*.mapcfg"; + } + else if(lMapType == 5)//.value == "CTF") + { + map_query = "maps/ctf_*.mapcfg"; + } + else if(lMapType == 4)//.value == "Domination") + { + map_query = "maps/dom_*.mapcfg"; + } + else if(lMapType == 3)//.value == "Team Deathmatch") + { + map_query = "maps/tdm_*.mapcfg"; + } + else if(lMapType == 2)//.value == "Classic Deathmatch") + { + map_query = "maps/dm_*.mapcfg"; + } + else // list all + { + map_query = "maps/*.mapcfg"; + } + - lSearchHandle = search_begin( "maps/*.bsp", true, true ); + lSearchHandle = search_begin( map_query, true, true ); // "maps/*.mapcfg" if( lSearchHandle < 0 ) return; for( lSearchSize = search_getsize( lSearchHandle ), lSearchCounter = 0; @@ -70,12 +159,13 @@ void() Item_Nex_MapDB_EnumFiles = local string lFilename; local string lStripped; + local string lPic; local string lName; local string lDescription; local string lTitle; lFilename = search_getfilename( lSearchHandle, lSearchCounter ); - lStripped = String_Zone( substring( lFilename, 0, strlen( lFilename ) - 4 ) ); + lStripped = String_Zone( substring( lFilename, 0, strlen( lFilename ) - 7 ) ); // - 4 lName = String_Zone( substring( lStripped, 5, 100000 ) ); lHandle = fopen( strcat( lStripped, ".txt" ), FILE_READ ); @@ -86,6 +176,11 @@ void() Item_Nex_MapDB_EnumFiles = // uncomment this line and comment the other if you have the old map info files //lTitle = String_Zone( lName ); lTitle = String_Zone( fgets( lHandle ) ); + lPic = fgets( lHandle ); // also get picture + if(lPic) + { + lStripped = String_Zone( lPic ); + } lDescription = String_Create(); do { diff --git a/scmenu/templates.menu b/scmenu/templates.menu index df4a83b17..10db8da27 100644 --- a/scmenu/templates.menu +++ b/scmenu/templates.menu @@ -37,7 +37,7 @@ Template Button TextButton drawFlags_x [DefaultTextDrawFlag] drawFlags_y [DefaultSelTextDrawFlag] drawFlags_z [DefaultPreTextDrawFlag] - //soundSelected [DefaultSelectSound] + soundSelected [DefaultSelectSound] soundPressed [DefaultPressSound] } Template Button PictureButton @@ -63,7 +63,7 @@ Template Slider Slider alphas_y [DefaultSelPicAlpha] drawFlags_x [DefaultPicDrawFlag] drawFlags_y [DefaultSelPicDrawFlag] - //soundSelected [DefaultSelectSound] + soundSelected [DefaultSelectSound] soundIncrease [DefaultIncreaseSound] soundDecrease [DefaultDecreaseSound] picture [DefaultSliderBar] @@ -93,7 +93,7 @@ Template EditBox EditBox drawFlagsCursor_y [DefaultSelTextDrawFlag] sizeCursor [DefaultCursorSize] sizeCursorFlash [DefaultCursorFlashSize] - //soundSelected [DefaultSelectSound] + soundSelected [DefaultSelectSound] soundMove [DefaultIncreaseSound] soundKey [DefaultDecreaseSound] } -- 2.39.2