From 5ce04649fd973e761632d3748d60520da7e38b77 Mon Sep 17 00:00:00 2001 From: WidovV Date: Sat, 6 Apr 2024 13:43:38 +0200 Subject: [PATCH] Add CenterHtmlMenu button colors (#398) --- .../CompatibilitySuppressions.xml | 1120 +---------------- .../Modules/Menu/BaseMenu.cs | 1 + .../Modules/Menu/CenterHtmlMenu.cs | 29 +- .../Modules/Menu/ChatMenu.cs | 23 +- 4 files changed, 49 insertions(+), 1124 deletions(-) diff --git a/managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml b/managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml index 9ca328c4..46fdfdc2 100644 --- a/managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml +++ b/managed/CounterStrikeSharp.API/CompatibilitySuppressions.xml @@ -1,1120 +1,22 @@  - + - CP0001 - T:CounterStrikeSharp.API.Core.AnimationUpdateListHandle_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.AnimVrBoneTransformSource_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.AnimVRFinger_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.AnimVrFingerSplay_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.AnimVRHand_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.AnimVRHandMotionRange_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.CAI_ChangeTarget - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.CCSGameModeRules_Scripted - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.CNetworkedSequenceOperation - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Core.CPointScript - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0001 - T:CounterStrikeSharp.API.Modules.Utils.CommandUtils - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.AnimParamType_t.ANIMPARAM_STRINGTOKEN - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.DebugOverlayBits_t.OVERLAY_NPC_NEAREST_NODE_BIT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.DebugOverlayBits_t.OVERLAY_NPC_TRIANGULATE_BIT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.DebugOverlayBits_t.OVERLAY_NPC_ZAP_BIT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_BODYGROUP_SET_VALUE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_SV_BODYGROUP_SET_VALUE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_STEP - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.ObjectTypeFlags_t.OBJECT_TYPE_DECAL - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.ObjectTypeFlags_t.OBJECT_TYPE_GEOMETRY_LOD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.ObjectTypeFlags_t.OBJECT_TYPE_IMAGE_LOD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_BOOL - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_INVAL_EHANDLE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_INVAL_SNDEVT_GUID - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_STR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_LIT_VEC3 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.TARGET_INVOKE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Modules.Memory.VirtualFunctions.CCSPlayerPawn_Respawn - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - F:CounterStrikeSharp.API.Modules.Memory.VirtualFunctions.CCSPlayerPawn_RespawnFunc - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.Application.#ctor(Microsoft.Extensions.Logging.ILoggerFactory,CounterStrikeSharp.API.Core.Hosting.IScriptHostConfiguration,CounterStrikeSharp.API.Core.GameDataProvider,CounterStrikeSharp.API.Core.CoreConfig,CounterStrikeSharp.API.Core.Plugin.Host.IPluginManager,CounterStrikeSharp.API.Core.Plugin.Host.IPluginContextQueryHandler,CounterStrikeSharp.API.Core.Translations.IPlayerLanguageManager) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraph.get_AnimGraphDirty - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraph.get_ShouldAnimateDuringGameplayPause - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_AnimationUpdate - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_BaseLayer - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_ClientSideAnimation - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_LastEventAnimTime - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_LastEventCycle - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_NewSequenceParity - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_PrevAnimTime - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseAnimGraphController.get_ResetEventsParity - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseCombatCharacter.get_NavMeshID - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBaseEntity.get_SimulatedEveryTick - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBasePlayerController.get_UsecTimestampLastUserCmdReceived - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBasePlayerWeaponVData.get_IsFullAuto - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CBasePlayerWeaponVData.get_NumBullets - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CCSGameModeRules_Deathmatch.get_FirstThink - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CCSGameModeRules_Deathmatch.get_FirstThinkAfterConnected - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CCSPlayer_MovementServices.get_PreviouslyPredictedOrigin - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CCSPlayerPawn.Respawn - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CDynamicProp.get_AnimateOnServer - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CDynamicProp.get_DefaultAnim - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CDynamicProp.get_DefaultAnimLoopMode - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CDynamicProp.get_ScriptedMovement - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CDynamicProp.set_DefaultAnim(System.String) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CFuncRotating.get_MoveAng - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CoreConfig.#ctor(CounterStrikeSharp.API.Core.Hosting.IScriptHostConfiguration,Microsoft.Extensions.Logging.ILogger{CounterStrikeSharp.API.Core.CoreConfig}) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPlayer_WeaponServices.get_AllowSwitchToNoWeapon - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.get_NameFixupLocal - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.get_NameFixupParent - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.get_NameFixupStaticPrefix - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.set_NameFixupLocal(System.String) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.set_NameFixupParent(System.String) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CPointPulse.set_NameFixupStaticPrefix(System.String) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CScriptedSequence.get_Delay - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CScriptedSequence.get_ForcedAnimatedEveryTick - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CScriptedSequence.get_PrevAnimatedEveryTick - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CScriptedSequence.get_TargetWasAsleep - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CTriggerPush.get_AlternateTicksFix - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.CTriggerPush.get_PushSpeed - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.FunctionReference.Create(System.Delegate) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.FunctionReference.Get(System.Int32) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.NativeAPI.GetGameFrameTime - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.NativeAPI.QueueTaskForNextFrame(System.IntPtr) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.NativeAPI.QueueTaskForNextWorldUpdate(System.IntPtr) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.#ctor(CounterStrikeSharp.API.Core.Hosting.IScriptHostConfiguration,Microsoft.Extensions.Logging.ILogger{CounterStrikeSharp.API.Core.Plugin.Host.PluginManager},System.IServiceProvider) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.Plugin.PluginContext.#ctor(System.IServiceProvider,CounterStrikeSharp.API.Core.Hosting.IScriptHostConfiguration,System.String,System.Int32) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Core.Translations.JsonStringLocalizerFactory.#ctor(CounterStrikeSharp.API.Core.Plugin.IPluginContext) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Modules.Memory.DynamicFunctions.DynamicHook.GetReturn``1(System.Int32) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0002 - M:CounterStrikeSharp.API.Server.get_GameFrameTime - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll + CP0005 + M:CounterStrikeSharp.API.Modules.Menu.BaseMenu.Open(CounterStrikeSharp.API.Core.CCSPlayerController) + .\ApiCompat\v202.dll + obj\Release\net8.0\CounterStrikeSharp.API.dll CP0006 - M:CounterStrikeSharp.API.Core.IPlugin.OnAllPluginsLoaded(System.Boolean) - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll + M:CounterStrikeSharp.API.Modules.Menu.IMenu.Open(CounterStrikeSharp.API.Core.CCSPlayerController) + .\ApiCompat\v202.dll + obj\Release\net8.0\CounterStrikeSharp.API.dll CP0006 - P:CounterStrikeSharp.API.Core.Hosting.IScriptHostConfiguration.SharedPath - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0006 - P:CounterStrikeSharp.API.Core.IPlugin.CommandManager - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0006 - P:CounterStrikeSharp.API.Modules.Menu.IMenu.ExitButton - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0010 - T:CounterStrikeSharp.API.Core.RenderMultisampleType_t - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.ActionType_t.SOS_ACTION_SET_SOUNDEVENT_PARAM - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.fieldtype_t.FIELD_TYPECOUNT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_BODYGROUP_SET_TO_CLIP - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_BODYGROUP_SET_TO_NEXTCLIP - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_BODYGROUP_SET_VALUE_CMODEL_WPN - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_C4_SCREEN_TEXT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_CLOTH_ATTR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_CLOTH_EFFECT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_CLOTH_GROUND_OFFSET - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_CLOTH_STIFFEN - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_CREATE_ANIM_SCOPE_PROP - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_EJECT_MAG - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_CL_WEAPON_TRANSITION_INTO_HAND - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_FIRE_INPUT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_GRENADE_THROW_COMPLETE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_SV_ATTACH_SILENCER_COMPLETE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_SV_DETACH_SILENCER_COMPLETE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_SV_HIDE_SILENCER - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_SV_SHOW_SILENCER - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_WEAPON_PERFORM_ATTACK - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_WPN_COMPLETE_RELOAD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.GameAnimEventIndex_t.AE_WPN_HEALTHSHOT_INJECT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_CUSTOM - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_FLY - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_FLYGRAVITY - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_LADDER - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_LAST - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_NOCLIP - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_OBSERVER - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_PUSH - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.MoveType_t.MOVETYPE_VPHYSICS - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.ADD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.ADD_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.ADD_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.ADD_STRING - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.AND - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.CONVERT_VALUE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.COPY - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.DIV - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.DIV_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.DIV_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.EQ - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.EQ_BOOL - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.EQ_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.EQ_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.EQ_STRING - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.GET_VAR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LAST_SERIALIZED_CODE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LT_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LT_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LTE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LTE_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.LTE_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MOD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MOD_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MOD_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MUL - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MUL_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.MUL_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NE_BOOL - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NE_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NE_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NE_STRING - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NEGATE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NEGATE_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NEGATE_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.NOT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.OR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_REGISTER_DOMAIN_VALUE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SET_VAR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SUB - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SUB_FLOAT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseInstructionCode_t.SUB_INT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_ANY - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_COUNT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_CURSOR_FLOW - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_EHANDLE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_RESOURCE - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_SCHEMA_PTR - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.PulseValueType_t.PVAL_SNDEVT_GUID - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.SurroundingBoundsType_t.USE_COLLISION_BOUNDS_NEVER_VPHYSICS - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.SurroundingBoundsType_t.USE_ROTATION_EXPANDED_SEQUENCE_BOUNDS - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_IMPACT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_MELEE_HIT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_MELEE_HIT_NPC - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_MELEE_HIT_PLAYER - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_MELEE_HIT_WORLD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_MELEE_MISS - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_NEARLYEMPTY - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_REFLECT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_RELOAD - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_SECONDARY_IMPACT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_SECONDARY_REFLECT - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_SPECIAL1 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_SPECIAL2 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP0011 - F:CounterStrikeSharp.API.Core.WeaponSound_t.WEAPON_SOUND_SPECIAL3 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP1002 - Microsoft.Extensions.Localization.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll - - - CP1002 - Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10 - .\ApiCompat\v151.dll - obj\Debug\net7.0\CounterStrikeSharp.API.dll + M:CounterStrikeSharp.API.Modules.Menu.IMenu.OpenToAll + .\ApiCompat\v202.dll + obj\Release\net8.0\CounterStrikeSharp.API.dll \ No newline at end of file diff --git a/managed/CounterStrikeSharp.API/Modules/Menu/BaseMenu.cs b/managed/CounterStrikeSharp.API/Modules/Menu/BaseMenu.cs index a313691e..dd20213a 100644 --- a/managed/CounterStrikeSharp.API/Modules/Menu/BaseMenu.cs +++ b/managed/CounterStrikeSharp.API/Modules/Menu/BaseMenu.cs @@ -28,6 +28,7 @@ public enum PostSelectAction public abstract class BaseMenu : IMenu { public string Title { get; set; } + public List MenuOptions { get; } = new(); public PostSelectAction PostSelectAction { get; set; } = PostSelectAction.Reset; public bool ExitButton { get; set; } = true; diff --git a/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs b/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs index 0338ed16..9dc3e63b 100644 --- a/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs +++ b/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs @@ -22,6 +22,12 @@ namespace CounterStrikeSharp.API.Modules.Menu; public class CenterHtmlMenu : BaseMenu { private readonly BasePlugin? _plugin; + public string TitleColor { get; set; } = "yellow"; + public string EnabledColor { get; set; } = "green"; + public string DisabledColor { get; set; } = "grey"; + public string PrevPageColor { get; set; } = "yellow"; + public string NextPageColor { get; set; } = "yellow"; + public string CloseColor { get; set; } = "red"; public CenterHtmlMenu(string title, BasePlugin plugin) : base(ModifyTitle(title)) { @@ -32,7 +38,7 @@ public class CenterHtmlMenu : BaseMenu public CenterHtmlMenu(string title) : base(ModifyTitle(title)) { } - + public override void Open(CCSPlayerController player) { if (_plugin == null) @@ -96,35 +102,40 @@ public class CenterHtmlMenuInstance : BaseMenuInstance return; } + if (Menu is not CenterHtmlMenu centerHtmlMenu) + { + return; + } + var builder = new StringBuilder(); - builder.Append($"{Menu.Title}"); + builder.Append($"{centerHtmlMenu.Title}"); builder.AppendLine("
"); var keyOffset = 1; - for (var i = CurrentOffset; i < Math.Min(CurrentOffset + MenuItemsPerPage, Menu.MenuOptions.Count); i++) + for (var i = CurrentOffset; i < Math.Min(CurrentOffset + MenuItemsPerPage, centerHtmlMenu.MenuOptions.Count); i++) { - var option = Menu.MenuOptions[i]; - string color = option.Disabled ? "grey" : "green"; + var option = centerHtmlMenu.MenuOptions[i]; + string color = option.Disabled ? centerHtmlMenu.DisabledColor : centerHtmlMenu.EnabledColor; builder.Append($"!{keyOffset++} {option.Text}"); builder.AppendLine("
"); } if (HasPrevButton) { - builder.AppendFormat("!7 <- Prev"); + builder.AppendFormat($"!7 <- Prev"); builder.AppendLine("
"); } if (HasNextButton) { - builder.AppendFormat("!8 -> Next"); + builder.AppendFormat($"!8 -> Next"); builder.AppendLine("
"); } - if (Menu.ExitButton) + if (centerHtmlMenu.ExitButton) { - builder.AppendFormat("!9 -> Close"); + builder.AppendFormat($"!9 -> Close"); builder.AppendLine("
"); } diff --git a/managed/CounterStrikeSharp.API/Modules/Menu/ChatMenu.cs b/managed/CounterStrikeSharp.API/Modules/Menu/ChatMenu.cs index c9118eaf..7d8e4e77 100644 --- a/managed/CounterStrikeSharp.API/Modules/Menu/ChatMenu.cs +++ b/managed/CounterStrikeSharp.API/Modules/Menu/ChatMenu.cs @@ -20,6 +20,12 @@ namespace CounterStrikeSharp.API.Modules.Menu; public class ChatMenu : BaseMenu { + public char TitleColor { get; set; } = ChatColors.Yellow; + public char EnabledColor { get; set; } = ChatColors.Green; + public char DisabledColor { get; set; } = ChatColors.Grey; + public char PrevPageColor { get; set; } = ChatColors.Yellow; + public char NextPageColor { get; set; } = ChatColors.Yellow; + public char CloseColor { get; set; } = ChatColors.Red; public ChatMenu(string title) : base(title) { ExitButton = false; @@ -39,30 +45,35 @@ public class ChatMenuInstance : BaseMenuInstance public override void Display() { - Player.PrintToChat(Menu.Title); + if (Menu is not ChatMenu chatMenu) + { + return; + } + + Player.PrintToChat($" {chatMenu.TitleColor} {chatMenu.Title}"); Player.PrintToChat("---"); var keyOffset = 1; for (var i = CurrentOffset; i < Math.Min(CurrentOffset + MenuItemsPerPage, Menu.MenuOptions.Count); i++) { var option = Menu.MenuOptions[i]; - - Player.PrintToChat($" {(option.Disabled ? ChatColors.Grey : ChatColors.Green)} !{keyOffset++} {ChatColors.Default}{option.Text}"); + char color = option.Disabled ? chatMenu.DisabledColor : chatMenu.EnabledColor; + Player.PrintToChat($" {color} !{keyOffset++} {ChatColors.Default}{option.Text}"); } if (HasPrevButton) { - Player.PrintToChat($" {ChatColors.Yellow}!7 {ChatColors.Default}-> Prev"); + Player.PrintToChat($" {chatMenu.PrevPageColor}!7 {ChatColors.Default}-> Prev"); } if (HasNextButton) { - Player.PrintToChat($" {ChatColors.Yellow}!8 {ChatColors.Default}-> Next"); + Player.PrintToChat($" {chatMenu.NextPageColor}!8 {ChatColors.Default}-> Next"); } if (Menu.ExitButton) { - Player.PrintToChat($" {ChatColors.Red}!9 {ChatColors.Default}-> Close"); + Player.PrintToChat($" {chatMenu.CloseColor}!9 {ChatColors.Default}-> Close"); } } }