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

◆ OnChange() [5/5]

override bool UIPopupScript::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprivate

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

116 {
117 if ( w == m_SldStartTime )
118 {
119 float slider_value_start_time = m_SldStartTime.GetCurrent() * 0.01;
120 float start_time_f = slider_value_start_time * 1439;
121 int start_time = start_time_f;
122 m_CurrHour = start_time / 60;
123 m_CurrMinute = start_time % 60;
124
126
128
129 return true;
130 }
131 else if ( w == m_SldStartDay )
132 {
133 float slider_value_start_day = m_SldStartDay.GetCurrent();
134 float start_day_f = slider_value_start_day * 3.64 + 1;
135 int start_day = start_day_f;
136
137 for ( int i = 0; i < 12; i++ )
138 {
139 int days = m_DaysInMonth[i];
140 if ( start_day <= days )
141 {
142 m_CurrMonth = i+1;
143 m_CurrDay = start_day;
144 break;
145 }
146 else
147 {
148 start_day -= days;
149 }
150 }
151
153
155
156 return true;
157 }
158 else if ( w == m_SldOvercast )
159 {
161
162 m_CurrOvercast = m_SldOvercast.GetCurrent() * 0.01;
164
165 return true;
166 }
167 else if ( w == m_SldRain )
168 {
170
171 m_CurrRain = m_SldRain.GetCurrent() * 0.01;
172 GetGame().GetWeather().GetRain().Set( m_CurrRain, 0, 1000 );
173
174 return true;
175 }
176 else if ( w == m_SldFog )
177 {
179
180 m_CurrFog = m_SldFog.GetCurrent() * 0.01;
181 GetGame().GetWeather().GetFog().Set( m_CurrFog, 0, 1000 );
182
183 return true;
184 }
185 else if ( w == m_SldWindForce )
186 {
188
189 m_CurrWindForce = m_SldWindForce.GetCurrent() * 0.01;
190 //GetGame().GetWeather().SetWindSpeed( m_CurrWindForce );
191
192 return true;
193 }
194
195 return false;
196 }
proto native World GetWorld()
proto native Weather GetWeather()
Returns weather controller object.
int m_CurrYear
Определения UIPopupScriptSceneManager.c:40
float m_CurrWindForce
Определения UIPopupScriptSceneManager.c:48
float m_CurrOvercast
Определения UIPopupScriptSceneManager.c:45
void UpdateSliderOvercast()
Определения UIPopupScriptSceneManager.c:413
int m_CurrDay
Определения UIPopupScriptSceneManager.c:42
void UpdateSliderStartTime(int hour, int minute)
Определения UIPopupScriptSceneManager.c:401
SliderWidget m_SldStartTime
Определения UIPopupScriptSceneManager.c:17
static const int m_DaysInMonth[12]
Определения UIPopupScriptSceneManager.c:11
int m_CurrHour
Определения UIPopupScriptSceneManager.c:43
void UpdateSliderWindForce()
Определения UIPopupScriptSceneManager.c:431
int m_CurrMonth
Определения UIPopupScriptSceneManager.c:41
SliderWidget m_SldOvercast
Определения UIPopupScriptSceneManager.c:21
void UpdateSliderStartDay(int month, int day)
Определения UIPopupScriptSceneManager.c:407
SliderWidget m_SldWindForce
Определения UIPopupScriptSceneManager.c:27
SliderWidget m_SldRain
Определения UIPopupScriptSceneManager.c:23
SliderWidget m_SldFog
Определения UIPopupScriptSceneManager.c:25
void UpdateSliderFog()
Определения UIPopupScriptSceneManager.c:425
void UpdateSliderRain()
Определения UIPopupScriptSceneManager.c:419
int m_CurrMinute
Определения UIPopupScriptSceneManager.c:44
float m_CurrRain
Определения UIPopupScriptSceneManager.c:46
float m_CurrFog
Определения UIPopupScriptSceneManager.c:47
SliderWidget m_SldStartDay
Определения UIPopupScriptSceneManager.c:19
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
proto native void Set(float forecast, float time=0, float minDuration=0)
Sets the forecast.
proto native void SetDate(int year, int month, int day, int hour, int minute)
Sets actual ingame world time.
proto native CGame GetGame()

Перекрестные ссылки Weather::GetFog(), GetGame(), Weather::GetOvercast(), Weather::GetRain(), CGame::GetWeather(), CGame::GetWorld(), m_CurrDay, m_CurrFog, m_CurrHour, m_CurrMinute, m_CurrMonth, m_CurrOvercast, m_CurrRain, m_CurrWindForce, m_CurrYear, m_DaysInMonth, m_SldFog, m_SldOvercast, m_SldRain, m_SldStartDay, m_SldStartTime, m_SldWindForce, WeatherPhenomenon::Set(), World::SetDate(), UpdateSliderFog(), UpdateSliderOvercast(), UpdateSliderRain(), UpdateSliderStartDay(), UpdateSliderStartTime(), UpdateSliderWindForce(), x и y.