3 private ButtonWidget m_BtnCancel;
11 private static const int m_DaysInMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
13 private ButtonWidget m_BtnSave;
55 m_BtnCancel = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_cancel") );
56 m_BtnSceneNew = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_mission_new") );
57 m_BtnSceneLoad = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_mission_load") );
58 m_BtnSceneRename = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_mission_rename") );
59 m_BtnSceneDelete = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_mission_delete") );
60 m_BtnSceneDuplicate = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_sm_mission_duplicate") );
62 m_LstListScenes = TextListboxWidget.Cast( wgt.FindAnyWidget(
"tls_ppp_sm_scene_list") );
64 m_BtnSave = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_st_save") );
68 m_SldStartTime = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_start_time") );
71 m_SldStartDay = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_start_day") );
74 m_SldOvercast = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_overcast") );
77 m_SldRain = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_rain") );
80 m_SldFog = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_fog") );
83 m_SldWindForce = SliderWidget.Cast( wgt.FindAnyWidget(
"sld_ppp_st_wind_force") );
97 super.OnClick(w,
x,
y, button);
100 PluginSceneManager editor;
117 PopupOpen(SceneEditorMenu.POPUP_ID_SCENE_NEW, NULL);
126 editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
128 editor.SceneLoad(scene_name);
139 popup_rename.SetRenameName(scene_name);
148 editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
150 editor.SceneDuplicate(scene_name);
161 editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
163 editor.SceneDelete(scene_name);
165 if ( editor.SceneCanDelete(scene_name) )
168 popup_delete.SetDeleteName(scene_name);
173 popup_notify.SetLabelText(
"You cant delete current loaded scene!");
192 editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
209 float slider_value_start_time =
m_SldStartTime.GetCurrent() * 0.01;
210 float start_time_f = slider_value_start_time * 1439;
211 int start_time = start_time_f;
224 float start_day_f = slider_value_start_day * 3.64 + 1;
225 int start_day = start_day_f;
227 for (
int i = 0; i < 12; i++ )
230 if ( start_day <= days )
296 PluginSceneManager editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
299 string loaded_scene_name = editor.SceneGetName();
301 for (
int i = 0; i < scene_list.Count(); ++i )
303 string scene_name = scene_list.Get(i);
307 if ( scene_name == loaded_scene_name )
369 int year, month, day, hour, minute;
374 float start_day = day;
375 int month_tmp = month;
376 while ( month_tmp > 1 )
403 string label_text = hour.ToStringLen(2) +
":" + minute.ToStringLen(2);
409 string label_text = day.ToString() +
"." + month.ToString() +
". " +
m_CurrYear.ToString();
415 string label_text =
m_SldOvercast.GetCurrent().ToString()+
"%";
421 string label_text =
m_SldRain.GetCurrent().ToString()+
"%";
427 string label_text =
m_SldFog.GetCurrent().ToString()+
"%";
PluginBase GetPlugin(typename plugin_type)
proto native World GetWorld()
override ScriptInvoker GetUpdateQueue(int call_category)
proto native Weather GetWeather()
Returns weather controller object.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native void SetWindSpeed(float speed)
Sets the actual wind speed in metre per second.
proto native float GetWindSpeed()
Returns actual wind speed in metre per second.
proto native float GetWindMaximumSpeed()
Returns maximal wind speed in metre per second.
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 float GetActual()
proto native void SetDate(int year, int month, int day, int hour, int minute)
Sets actual ingame world time.
proto void GetDate(out int year, out int month, out int day, out int hour, out int minute)
Get actual ingame world time.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray