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

◆ OnClick()

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

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

705 {
706 super.OnClick(w, x, y, button);
707
708 int i;
709 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
710
711 PluginDeveloper module_dev = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
712
713 if (w == m_PositionsListbox)
714 {
715
716 vector position = GetCurrentLocationPos();
717
719 {
721 }
722
723 return true;
724 }
725 else if (w == m_TeleportButton)
726 {
727 ProcessTeleportText(player);
728 return true;
729 }
730 else if (w == m_ButtonCopyPos)
731 {
732 if (m_IsShiftDown)
733 {
734 g_Game.CopyToClipboard(GetMapPos().ToString(false));
735 return true;
736 }
737
738
739 g_Game.CopyToClipboard(GetMapPos().ToString() + " " + g_Game.GetPlayer().GetDirection().ToString());
740 return true;
741 }
742 else if (w == m_LogsEnabled)
743 {
744 //Log("m_LogsEnabled: "+ToString(m_LogsEnabled.IsChecked()));
745
747 {
748 m_ConfigDebugProfile.SetLogsEnabled(m_LogsEnabled.IsChecked());
749 LogManager.SetLogsEnabled(m_LogsEnabled.IsChecked());
750 }
751
752 return true;
753 }
754 else if (w == m_HudDCharStats)
755 {
757 {
758 m_ConfigDebugProfile.SetCharacterStatsVisible(m_HudDCharStats.IsChecked());
759 }
760
761 // Refresh UI by new settings
762 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
763
764 return true;
765 }
766 else if (w == m_HudDCharLevels)
767 {
769 {
770 m_ConfigDebugProfile.SetCharacterLevelsVisible(m_HudDCharLevels.IsChecked());
771 }
772
773 // Refresh UI by new settings
774 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
775
776 return true;
777 }
778 else if (w == m_HudDCharStomach)
779 {
781 {
782 m_ConfigDebugProfile.SetCharacterStomachVisible(m_HudDCharStomach.IsChecked());
783 }
784
785 // Refresh UI by new settings
786 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
787
788 return true;
789 }
790 else if (w == m_HudDVersion)
791 {
793 {
794 m_ConfigDebugProfile.SetVersionVisible(m_HudDVersion.IsChecked());
795 }
796
797 // Refresh UI by new settings
798 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
799
800 return true;
801 }
802 else if (w == m_HudDTemperature)
803 {
805 {
806 m_ConfigDebugProfile.SetTempVisible(m_HudDTemperature.IsChecked());
807 }
808
809 // Refresh UI by new settings
810 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
811
812 return true;
813 }
814 else if (w == m_HudDHealth)
815 {
817 {
818 m_ConfigDebugProfile.SetHealthVisible(m_HudDHealth.IsChecked());
819 }
820
821 // Refresh UI by new settings
822 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
823
824 return true;
825 }
826 else if (w == m_HudDHorticulture)
827 {
829 {
830 m_ConfigDebugProfile.SetHorticultureVisible(m_HudDHorticulture.IsChecked());
831 }
832
833 // Refresh UI by new settings
834 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
835
836 return true;
837 }
838 else if (w == m_HudDCharModifiers)
839 {
841 {
842 m_ConfigDebugProfile.SetCharacterModifiersVisible(m_HudDCharModifiers.IsChecked());
843 }
844
845 // Refresh UI by new settings
846 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
847
848 return true;
849 }
850 else if (w == m_HudDCharAgents)
851 {
853 {
854 m_ConfigDebugProfile.SetCharacterAgentsVisible(m_HudDCharAgents.IsChecked());
855 }
856
857 // Refresh UI by new settings
858 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
859
860 return true;
861 }
862 else if (w == m_HudDCharDebug)
863 {
865 {
866 m_ConfigDebugProfile.SetCharacterDebugVisible(m_HudDCharDebug.IsChecked());
867 }
868
869 // Refresh UI by new settings
870 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
871
872 return true;
873 }
874 else if (w == m_HudDFreeCamCross)
875 {
877 {
878 m_ConfigDebugProfile.SetFreeCameraCrosshairVisible(m_HudDFreeCamCross.IsChecked());
879 }
880
881 // Refresh UI by new settings
882 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
883
884 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.GetMission().RefreshCrosshairVisibility);
885
886 return true;
887 }
888
889 else if (w == m_DiagToggleButton)
890 {
891 int toggle_row_index = m_DiagToggleTextListbox.GetSelectedRow();
892 bool toggle_state = g_Game.GetDiagModeEnable(toggle_row_index);
893 g_Game.SetDiagModeEnable(toggle_row_index, !toggle_state);
894 return true;
895 }
896 else if (w == m_DiagDrawButton)
897 {
898 int draw_row_index = m_DiagDrawmodeTextListbox.GetSelectedRow();
899 g_Game.SetDiagDrawMode(draw_row_index);
900 return true;
901 }
902 // TOUCHED THIS
903 else if (w == m_LocationAddButton)
904 {
905 ScriptConsoleAddLocation menu = ScriptConsoleAddLocation.Cast(g_Game.GetUIManager().EnterScriptedMenu(MENU_LOC_ADD, m_ScriptConsole));
906 menu.SetPosition(GetMapPos());
907 return true;
908 }
909 else if (w == m_LocationRemoveButton)
910 {
911 m_ConfigDebugProfile.CustomLocationsRemove(GetCurrentLocationName());
913 return true;
914 }
915 return false;
916 }
DayZGame g_Game
Определения DayZGame.c:3942
proto string ToString()
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:325
CheckBoxWidget m_HudDHorticulture
Определения ScriptConsoleGeneralTab.c:51
CheckBoxWidget m_HudDCharLevels
Определения ScriptConsoleGeneralTab.c:43
CheckBoxWidget m_HudDCharModifiers
Определения ScriptConsoleGeneralTab.c:45
ButtonWidget m_ButtonCopyPos
Определения ScriptConsoleGeneralTab.c:37
TextListboxWidget m_DiagDrawmodeTextListbox
Определения ScriptConsoleGeneralTab.c:67
int GetCurrentPositionIndex()
Определения ScriptConsoleGeneralTab.c:431
TextListboxWidget m_DiagToggleTextListbox
Определения ScriptConsoleGeneralTab.c:65
TextListboxWidget m_PositionsListbox
Определения ScriptConsoleGeneralTab.c:66
CheckBoxWidget m_HudDCharStomach
Определения ScriptConsoleGeneralTab.c:44
CheckBoxWidget m_HudDVersion
Определения ScriptConsoleGeneralTab.c:49
vector GetCurrentLocationPos()
Определения ScriptConsoleGeneralTab.c:403
CheckBoxWidget m_HudDCharStats
Определения ScriptConsoleGeneralTab.c:42
ButtonWidget m_LocationRemoveButton
Определения ScriptConsoleGeneralTab.c:35
CheckBoxWidget m_HudDHealth
Определения ScriptConsoleGeneralTab.c:50
void ProcessTeleportText(PlayerBase player)
Определения ScriptConsoleGeneralTab.c:253
CheckBoxWidget m_LogsEnabled
Определения ScriptConsoleGeneralTab.c:41
CheckBoxWidget m_HudDCharDebug
Определения ScriptConsoleGeneralTab.c:47
CheckBoxWidget m_HudDFreeCamCross
Определения ScriptConsoleGeneralTab.c:48
CheckBoxWidget m_HudDTemperature
Определения ScriptConsoleGeneralTab.c:55
string GetCurrentLocationName()
Определения ScriptConsoleGeneralTab.c:394
ButtonWidget m_DiagToggleButton
Определения ScriptConsoleGeneralTab.c:39
bool IsCurrentPositionValid()
Определения ScriptConsoleGeneralTab.c:436
MissionGameplay m_MissionGameplay
Определения ScriptConsoleGeneralTab.c:16
ButtonWidget m_TeleportButton
Определения ScriptConsoleGeneralTab.c:36
ButtonWidget m_DiagDrawButton
Определения ScriptConsoleGeneralTab.c:38
CheckBoxWidget m_HudDCharAgents
Определения ScriptConsoleGeneralTab.c:46
ButtonWidget m_LocationAddButton
Определения ScriptConsoleGeneralTab.c:34
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:172
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, ProcessTeleportText(), RefreshLocations(), LogManager::SetLogsEnabled(), ToString(), x и y.