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

◆ OnClick()

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

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

690 {
691 super.OnClick(w, x, y, button);
692
693 int i;
694 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
695
696 PluginDeveloper module_dev = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
697
698 if (w == m_PositionsListbox)
699 {
700
701 vector position = GetCurrentLocationPos();
702
704 {
706 }
707
708 return true;
709 }
710 else if (w == m_TeleportButton)
711 {
712 ProcessTeleportText(player);
713 return true;
714 }
715 else if (w == m_ButtonCopyPos)
716 {
717 if (m_IsShiftDown)
718 {
720 return true;
721 }
722
723
724 GetGame().CopyToClipboard(GetMapPos().ToString() + " " + GetGame().GetPlayer().GetDirection().ToString());
725 return true;
726 }
727 else if (w == m_LogsEnabled)
728 {
729 //Log("m_LogsEnabled: "+ToString(m_LogsEnabled.IsChecked()));
730
732 {
733 m_ConfigDebugProfile.SetLogsEnabled(m_LogsEnabled.IsChecked());
734 LogManager.SetLogsEnabled(m_LogsEnabled.IsChecked());
735 }
736
737 return true;
738 }
739 else if (w == m_HudDCharStats)
740 {
742 {
743 m_ConfigDebugProfile.SetCharacterStatsVisible(m_HudDCharStats.IsChecked());
744 }
745
746 // Refresh UI by new settings
747 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
748
749 return true;
750 }
751 else if (w == m_HudDCharLevels)
752 {
754 {
755 m_ConfigDebugProfile.SetCharacterLevelsVisible(m_HudDCharLevels.IsChecked());
756 }
757
758 // Refresh UI by new settings
759 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
760
761 return true;
762 }
763 else if (w == m_HudDCharStomach)
764 {
766 {
767 m_ConfigDebugProfile.SetCharacterStomachVisible(m_HudDCharStomach.IsChecked());
768 }
769
770 // Refresh UI by new settings
771 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
772
773 return true;
774 }
775 else if (w == m_HudDVersion)
776 {
778 {
779 m_ConfigDebugProfile.SetVersionVisible(m_HudDVersion.IsChecked());
780 }
781
782 // Refresh UI by new settings
783 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
784
785 return true;
786 }
787 else if (w == m_HudDTemperature)
788 {
790 {
791 m_ConfigDebugProfile.SetTempVisible(m_HudDTemperature.IsChecked());
792 }
793
794 // Refresh UI by new settings
795 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
796
797 return true;
798 }
799 else if (w == m_HudDHealth)
800 {
802 {
803 m_ConfigDebugProfile.SetHealthVisible(m_HudDHealth.IsChecked());
804 }
805
806 // Refresh UI by new settings
807 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
808
809 return true;
810 }
811 else if (w == m_HudDHorticulture)
812 {
814 {
815 m_ConfigDebugProfile.SetHorticultureVisible(m_HudDHorticulture.IsChecked());
816 }
817
818 // Refresh UI by new settings
819 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
820
821 return true;
822 }
823 else if (w == m_HudDCharModifiers)
824 {
826 {
827 m_ConfigDebugProfile.SetCharacterModifiersVisible(m_HudDCharModifiers.IsChecked());
828 }
829
830 // Refresh UI by new settings
831 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
832
833 return true;
834 }
835 else if (w == m_HudDCharAgents)
836 {
838 {
839 m_ConfigDebugProfile.SetCharacterAgentsVisible(m_HudDCharAgents.IsChecked());
840 }
841
842 // Refresh UI by new settings
843 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
844
845 return true;
846 }
847 else if (w == m_HudDCharDebug)
848 {
850 {
851 m_ConfigDebugProfile.SetCharacterDebugVisible(m_HudDCharDebug.IsChecked());
852 }
853
854 // Refresh UI by new settings
855 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
856
857 return true;
858 }
859 else if (w == m_HudDFreeCamCross)
860 {
862 {
863 m_ConfigDebugProfile.SetFreeCameraCrosshairVisible(m_HudDFreeCamCross.IsChecked());
864 }
865
866 // Refresh UI by new settings
867 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
868
870
871 return true;
872 }
873
874 else if (w == m_DiagToggleButton)
875 {
876 int toggle_row_index = m_DiagToggleTextListbox.GetSelectedRow();
877 bool toggle_state = GetGame().GetDiagModeEnable(toggle_row_index);
878 GetGame().SetDiagModeEnable(toggle_row_index, !toggle_state);
879 return true;
880 }
881 else if (w == m_DiagDrawButton)
882 {
883 int draw_row_index = m_DiagDrawmodeTextListbox.GetSelectedRow();
884 GetGame().SetDiagDrawMode(draw_row_index);
885 return true;
886 }
887 // TOUCHED THIS
888 else if (w == m_LocationAddButton)
889 {
890 ScriptConsoleAddLocation menu = ScriptConsoleAddLocation.Cast(g_Game.GetUIManager().EnterScriptedMenu(MENU_LOC_ADD, m_ScriptConsole));
891 menu.SetPosition(GetMapPos());
892 return true;
893 }
894 else if (w == m_LocationRemoveButton)
895 {
896 m_ConfigDebugProfile.CustomLocationsRemove(GetCurrentLocationName());
898 return true;
899 }
900 return false;
901 }
DayZGame g_Game
Определения DayZGame.c:3868
proto string ToString()
void RefreshCrosshairVisibility()
Определения HudDebug.c:251
Icon x
Icon y
PlayerBase GetPlayer()
Определения ModifierBase.c:51
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
proto native void CopyToClipboard(string text)
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native void SetDiagModeEnable(int diag_mode, bool enabled)
Set specific debug mode.
proto native void SetDiagDrawMode(int diag_draw_mode)
Set debug draw mode.
proto native bool GetDiagModeEnable(int diag_mode)
Gets state of specific debug mode.
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
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:423
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:395
CheckBoxWidget m_HudDCharStats
Определения ScriptConsoleGeneralTab.c:42
ButtonWidget m_LocationRemoveButton
Определения ScriptConsoleGeneralTab.c:35
CheckBoxWidget m_HudDHealth
Определения ScriptConsoleGeneralTab.c:50
void ProcessTeleportText(PlayerBase player)
Определения ScriptConsoleGeneralTab.c:245
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:386
ButtonWidget m_DiagToggleButton
Определения ScriptConsoleGeneralTab.c:39
bool IsCurrentPositionValid()
Определения ScriptConsoleGeneralTab.c:428
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
proto native CGame GetGame()
const int MENU_LOC_ADD
Определения constants.c:172
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8

Перекрестные ссылки ScriptCallQueue::Call(), CALL_CATEGORY_SYSTEM, CGame::CopyToClipboard(), g_Game, CGame::GetCallQueue(), GetCurrentLocationName(), GetCurrentLocationPos(), GetCurrentPositionIndex(), CGame::GetDiagModeEnable(), GetGame(), GetMapPos(), GetPlayer(), 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(), RefreshCrosshairVisibility(), RefreshLocations(), CGame::SetDiagDrawMode(), CGame::SetDiagModeEnable(), LogManager::SetLogsEnabled(), ToString(), x и y.