public static List <List <VNActor.Actor> > getSelectedChars(VNNeoController game) { var mtreeman = game.studio.treeNodeCtrl; var ar = new List <VNActor.Actor>(); foreach (var node in mtreeman.selectNodes) { var ochar = NeoOCI.create_from_treenode(node); if (ochar.objctrl is OCIChar) { VNActor.Actor chara = (VNActor.Actor)ochar; ar.Add(chara); } } var am = new List <VNActor.Actor>(); var af = new List <VNActor.Actor>(); foreach (var chara in ar) { if (chara.Sex == 0) { am.Add(chara); } else { af.Add(chara); } } return(new List <List <VNActor.Actor> > { af, am }); }
// main class // ::::: Console init and window ::::: public static void toggle_scene_console(VNNeoController game) { if (SceneConsole.Instance.guiOnShow) { sceneConsoleGUIClose(); } else { UI.sceneConsoleGUIStart(game); } }
// Change name internal static void changeCharName(VNNeoController game, string name) { var chara = Utils.getSelectedChar(game); var old_name = chara.text_name; chara.objctrl.treeNodeObject.textName = name; // for sex in range(len(self.basechars)): // if old_name in self.nameset[sex]: // self.changeSceneChars((1 - sex), tag="upd") // break // Duplicate scene }
//import_or_reload("sceneutils") //import_or_reload("posesavestate") // :::::::::: JSON Derulo :::::::::::: // :::::::::: For debug only :::::::::::: // :type game:vngameengine.VNNeoController public static void start(VNNeoController game) { UI.sceneConsoleGUIStart(game); SceneFolders.LoadTrackedActorsAndProps(); // if no blocks - autoload if (SceneConsole.Instance.block.Count == 0) { if (Folder.find_single_startswith("-scenesavestate:") != null) { SceneConsole.Instance.loadSceneData(); SceneConsole.Instance.show_blocking_message_time_sc("Scene data was auto-loaded!"); } } }
public static VNActor.Actor getSelectedChar(VNNeoController game) { var mtreeman = game.studio.treeNodeCtrl; var ar = new List <VNActor.Actor>(); foreach (var node in mtreeman.selectNodes) { var ochar = NeoOCI.create_from_treenode(node); if (ochar.objctrl is OCIChar) { VNActor.Actor chara = (VNActor.Actor)ochar; ar.Add(chara); } } return(ar[0]); }
public static void sceneConsoleSkinSetup(VNNeoController game) { setWindowName(windowindex); game.wwidth = WindowWidth; game.wheight = WindowHeight; // #game.windowRect = Rect (Screen.width / 2 - game.wwidth / 2, Screen.height - game.wheight - 10, game.wwidth, game.wheight) var x = Utils.get_ini_value_def_int("WindowX", (int)(Screen.width - game.wwidth * 1.3)); var y = Utils.get_ini_value_def_int("WindowY", Screen.height - game.wheight - 650); var w = Utils.get_ini_value_def_int("WindowWidth", game.wwidth + 50); var h = Utils.get_ini_value_def_int("WindowHeight", game.wheight + 400); // game.windowRect = Rect(Screen.width / 2 - game.wwidth * 1.5, Screen.height - game.wheight - 500, // game.wwidth + 50, game.wheight + 400) game.windowRect = new Rect(x, y, w, h); //game.windowCallback = GUI.WindowFunction(scriptHelperWindowGUI) game.windowStyle = game.windowStyleDefault; }
// ::::: Essential functions ::::: public static Folder getFolder(VNNeoController game, string name, bool exact = false) { var flds = game.scene_get_all_folders(); foreach (var fld in flds) { if (exact == false) { if (fld.text_name.Contains(name)) { return(fld); } } else if (name == fld.text_name) { return(fld); } } return(null); }
public Scene(VNNeoController game, bool importSys) : this(new Dictionary <string, ActorData>(), new Dictionary <string, NEOItemData>(), new Dictionary <string, LightData>(), new Dictionary <string, NEOPropData>(), new List <CamData>()) { SceneFolders.LoadTrackedActorsAndProps(); Dictionary <string, VNActor.Actor> actors = game.AllActors; Dictionary <string, Prop> props = game.AllProps; foreach (string actid in actors.Keys) { this.actors[actid] = (ActorData)actors[actid].export_full_status(); } foreach (string propid in props.Keys) { var prop = props[propid]; AddProp(propid, prop); } if (importSys) { this.sys = (VNEngine.System.SystemData)export_full_status(); } }
public static void sceneConsoleGUIStart(VNNeoController game) { var skin = new SkinCustomWindow(); skin.funcSetup = sceneConsoleSkinSetup; //skin.funcWindowGUI = sceneConsoleSkinWindowGUI; game.skin_set(skin); // sc.originalWindowCallback = game.windowCallback // sc.originalwindowwidth = game.wwidth // sc.originalwindowheight = game.wheight Instance.guiOnShow = true; // setWindowName(sc.windowindex) // game.wwidth = sc.windowwidth // game.wheight = sc.windowheight // // game.windowRect = Rect(Screen.width / 2 - game.wwidth * 1.5, Screen.height - game.wheight - 500, // game.wwidth + 50, game.wheight + 400) //Utils.loadConfig(); // game.windowCallback = GUI.WindowFunction(sceneConsoleWindowFunc) }
public static List <Item> getSelectedItems(VNNeoController game) { var mtreeman = game.studio.treeNodeCtrl; var ar = new List <Item>(); foreach (var node in mtreeman.selectNodes) { var oitem = NeoOCI.create_from_treenode(node); if (oitem.objctrl is OCIItem) { Item prop = (Item)oitem; ar.Add(prop); } } if (ar.Count > 0) { return(ar); } else { throw new Exception("No items selected"); } }
public static void sys_import_status_diff_optimized(VNNeoController game, object status) { /* //TODO * var ofs = GameSystem.export_sys_status(game); * var dfs = new Dictionary<object, object> * { * }; * foreach (var key in status.Keys) * { * if (!ofs.ContainsKey(key) || ofs[key] != status[key]) * { * dfs[key] = status[key]; * } * } * * VNFrame.act(game, new Dictionary<string, object> { * { * "sys", * dfs}}); * VNFrame.act(game, new Dictionary<string, object> { * { * "sys", * status}}); */ }
// tree node public static bool treenode_check_select(TreeNodeObject treenode) { VNNeoController game = SceneConsole.Instance.game; return(game.studio.treeNodeCtrl.CheckSelect(treenode)); }
internal void endVNSSbtn(VNNeoController game) { this.game.visible = false; //VNSceneScript.run_state(this.game, this.game.scenedata.scMaxState + 1, true); TODO }