DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnClick()

override bool ScriptConsoleGeneralTab::OnClick ( Widget w,
int x,
int y,
int button )
inlineprotected

См. определение в файле ScriptConsoleGeneralTab.c строка 717

718 {
719 super.OnClick(w, x, y, button);
720
721 int i;
722 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
723
724 PluginDeveloper module_dev = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
725
726 if (w == m_PositionsListbox)
727 {
728
730
732 {
734 }
735
736 return true;
737 }
738 else if (w == m_TeleportButton)
739 {
740 ProcessTeleportText(player);
741 return true;
742 }
743 else if (w == m_ButtonCopyPos)
744 {
745 if (m_IsShiftDown)
746 {
747 g_Game.CopyToClipboard(GetMapPos().ToString(false));
748 return true;
749 }
750
751
752 g_Game.CopyToClipboard(GetMapPos().ToString() + " " + g_Game.GetPlayer().GetDirection().ToString());
753 return true;
754 }
755 else if (w == m_LogsEnabled)
756 {
757 //Log("m_LogsEnabled: "+ToString(m_LogsEnabled.IsChecked()));
758
760 {
761 m_ConfigDebugProfile.SetLogsEnabled(m_LogsEnabled.IsChecked());
762 LogManager.SetLogsEnabled(m_LogsEnabled.IsChecked());
763 }
764
765 return true;
766 }
767 else if (w == m_HudDCharStats)
768 {
770 {
771 m_ConfigDebugProfile.SetCharacterStatsVisible(m_HudDCharStats.IsChecked());
772 }
773
774 // Refresh UI by new settings
775 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
776
777 return true;
778 }
779 else if (w == m_HudDCharLevels)
780 {
782 {
783 m_ConfigDebugProfile.SetCharacterLevelsVisible(m_HudDCharLevels.IsChecked());
784 }
785
786 // Refresh UI by new settings
787 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
788
789 return true;
790 }
791 else if (w == m_HudDCharStomach)
792 {
794 {
795 m_ConfigDebugProfile.SetCharacterStomachVisible(m_HudDCharStomach.IsChecked());
796 }
797
798 // Refresh UI by new settings
799 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
800
801 return true;
802 }
803 else if (w == m_HudDVersion)
804 {
806 {
807 m_ConfigDebugProfile.SetVersionVisible(m_HudDVersion.IsChecked());
808 }
809
810 // Refresh UI by new settings
811 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
812
813 return true;
814 }
815 else if (w == m_HudDTemperature)
816 {
818 {
819 m_ConfigDebugProfile.SetTempVisible(m_HudDTemperature.IsChecked());
820 }
821
822 // Refresh UI by new settings
823 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
824
825 return true;
826 }
827 else if (w == m_HudDHealth)
828 {
830 {
831 m_ConfigDebugProfile.SetHealthVisible(m_HudDHealth.IsChecked());
832 }
833
834 // Refresh UI by new settings
835 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
836
837 return true;
838 }
839 else if (w == m_HudDHorticulture)
840 {
842 {
843 m_ConfigDebugProfile.SetHorticultureVisible(m_HudDHorticulture.IsChecked());
844 }
845
846 // Refresh UI by new settings
847 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
848
849 return true;
850 }
851 else if (w == m_HudDCharModifiers)
852 {
854 {
855 m_ConfigDebugProfile.SetCharacterModifiersVisible(m_HudDCharModifiers.IsChecked());
856 }
857
858 // Refresh UI by new settings
859 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
860
861 return true;
862 }
863 else if (w == m_HudDCharAgents)
864 {
866 {
867 m_ConfigDebugProfile.SetCharacterAgentsVisible(m_HudDCharAgents.IsChecked());
868 }
869
870 // Refresh UI by new settings
871 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
872
873 return true;
874 }
875 else if (w == m_HudDCharDebug)
876 {
878 {
879 m_ConfigDebugProfile.SetCharacterDebugVisible(m_HudDCharDebug.IsChecked());
880 }
881
882 // Refresh UI by new settings
883 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
884
885 return true;
886 }
887 else if (w == m_HudDFreeCamCross)
888 {
890 {
891 m_ConfigDebugProfile.SetFreeCameraCrosshairVisible(m_HudDFreeCamCross.IsChecked());
892 }
893
894 // Refresh UI by new settings
895 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
896
897 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.GetMission().RefreshCrosshairVisibility);
898
899 return true;
900 }
901
902 else if (w == m_DiagToggleButton)
903 {
904 int toggle_row_index = m_DiagToggleTextListbox.GetSelectedRow();
905 bool toggle_state = g_Game.GetDiagModeEnable(toggle_row_index);
906 g_Game.SetDiagModeEnable(toggle_row_index, !toggle_state);
907 return true;
908 }
909 else if (w == m_DiagDrawButton)
910 {
911 int draw_row_index = m_DiagDrawmodeTextListbox.GetSelectedRow();
912 g_Game.SetDiagDrawMode(draw_row_index);
913 return true;
914 }
915 // TOUCHED THIS
916 else if (w == m_LocationAddButton)
917 {
918 ScriptConsoleAddLocation menu = ScriptConsoleAddLocation.Cast(g_Game.GetUIManager().EnterScriptedMenu(MENU_LOC_ADD, m_ScriptConsole));
919 menu.SetPosition(GetMapPos());
920 return true;
921 }
922 else if (w == m_LocationRemoveButton)
923 {
924 m_ConfigDebugProfile.CustomLocationsRemove(GetCurrentLocationName());
926 return true;
927 }
928 return false;
929 }
DayZGame g_Game
Определения DayZGame.c:4074
vector position
Определения DustKickupEffects.c:20
proto string ToString()
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:326
CheckBoxWidget m_HudDHorticulture
Определения ScriptConsoleGeneralTab.c:55
CheckBoxWidget m_HudDCharLevels
Определения ScriptConsoleGeneralTab.c:47
CheckBoxWidget m_HudDCharModifiers
Определения ScriptConsoleGeneralTab.c:49
ButtonWidget m_ButtonCopyPos
Определения ScriptConsoleGeneralTab.c:41
TextListboxWidget m_DiagDrawmodeTextListbox
Определения ScriptConsoleGeneralTab.c:71
int GetCurrentPositionIndex()
Определения ScriptConsoleGeneralTab.c:444
TextListboxWidget m_DiagToggleTextListbox
Определения ScriptConsoleGeneralTab.c:69
TextListboxWidget m_PositionsListbox
Определения ScriptConsoleGeneralTab.c:70
CheckBoxWidget m_HudDCharStomach
Определения ScriptConsoleGeneralTab.c:48
CheckBoxWidget m_HudDVersion
Определения ScriptConsoleGeneralTab.c:53
vector GetCurrentLocationPos()
Определения ScriptConsoleGeneralTab.c:416
CheckBoxWidget m_HudDCharStats
Определения ScriptConsoleGeneralTab.c:46
ButtonWidget m_LocationRemoveButton
Определения ScriptConsoleGeneralTab.c:39
CheckBoxWidget m_HudDHealth
Определения ScriptConsoleGeneralTab.c:54
void ProcessTeleportText(PlayerBase player)
Определения ScriptConsoleGeneralTab.c:266
CheckBoxWidget m_LogsEnabled
Определения ScriptConsoleGeneralTab.c:45
CheckBoxWidget m_HudDCharDebug
Определения ScriptConsoleGeneralTab.c:51
CheckBoxWidget m_HudDFreeCamCross
Определения ScriptConsoleGeneralTab.c:52
CheckBoxWidget m_HudDTemperature
Определения ScriptConsoleGeneralTab.c:59
string GetCurrentLocationName()
Определения ScriptConsoleGeneralTab.c:407
ButtonWidget m_DiagToggleButton
Определения ScriptConsoleGeneralTab.c:43
bool IsCurrentPositionValid()
Определения ScriptConsoleGeneralTab.c:449
MissionGameplay m_MissionGameplay
Определения ScriptConsoleGeneralTab.c:20
ButtonWidget m_TeleportButton
Определения ScriptConsoleGeneralTab.c:40
ButtonWidget m_DiagDrawButton
Определения ScriptConsoleGeneralTab.c:42
CheckBoxWidget m_HudDCharAgents
Определения ScriptConsoleGeneralTab.c:50
ButtonWidget m_LocationAddButton
Определения ScriptConsoleGeneralTab.c:38
bool m_IsShiftDown
Определения ScriptConsoleTabBase.c:5
PluginConfigDebugProfile m_ConfigDebugProfile
Определения ScriptConsoleTabBase.c:11
ScriptConsole m_ScriptConsole
Определения ScriptConsoleTabBase.c:9
const int MENU_LOC_ADD
Определения 3_Game/DayZ/constants.c:178
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, g_Game, GetCurrentLocationName(), GetCurrentLocationPos(), GetCurrentPositionIndex(), GetMapPos(), GetPlugin(), IsCurrentPositionValid(), m_ButtonCopyPos, ScriptConsoleTabBase::m_ConfigDebugProfile, m_DiagDrawButton, m_DiagDrawmodeTextListbox, m_DiagToggleButton, m_DiagToggleTextListbox, m_HudDCharAgents, m_HudDCharDebug, m_HudDCharLevels, m_HudDCharModifiers, m_HudDCharStats, m_HudDCharStomach, m_HudDFreeCamCross, m_HudDHealth, m_HudDHorticulture, m_HudDTemperature, m_HudDVersion, ScriptConsoleTabBase::m_IsShiftDown, m_LocationAddButton, m_LocationRemoveButton, m_LogsEnabled, m_MissionGameplay, m_PositionsListbox, ScriptConsoleTabBase::m_ScriptConsole, m_TeleportButton, MENU_LOC_ADD, position, ProcessTeleportText(), RefreshLocations(), LogManager::SetLogsEnabled(), ToString(), x и y.