//public TreeNode node; //public Panel(String aname, Func<int, int, int, int, int, Panel> ashow, int ax, int ay, int apos, int asign = -1, UI_Mode uim = UI_Mode.UI_Checkbox, int fAlt = -1, string text = "", int fAlt2 = -1, string text2 = "", int fAlt3 = -1, string text3 = "", int fAlt4 = -1, string text4 = "", int str_id=0, int str_count=0, string strings="") { public Panel(String aname, ShowPanel ashow, int ax, int ay, int apos, int asign = -1, UI_Mode uim = UI_Mode.UI_Checkbox, int fAlt = -1, string text = "", int fAlt2 = -1, string text2 = "", int fAlt3 = -1, string text3 = "", int fAlt4 = -1, string text4 = "", int str_id = 0, int str_count = 0, string strings = "", int mAlt5_mask = 0, string text5 = "") { name = aname; show = ashow; x = ax; y = ay; pos = apos; sign = asign; Altf = fAlt; alt_text = text; Alt2 = fAlt2; alt2_text = text2; Alt3 = fAlt3; alt3_text = text3; Alt4 = fAlt4; alt4_text = text4; ui_mode = uim; string_id = str_id; string_count = str_count; this.strings = strings; Alt5 = 0; alt5_text = text5; Alt5_mask = mAlt5_mask; //OSD.osd_switch_once updatePanelStrings(string_id, str_count, strings); }
public void copyFrom(Panel other) { name = other.name; x = other.x; y = other.y; pos = other.pos; sign = other.sign; show = other.show; Altf = other.Altf; alt_text = other.alt_text; Alt2 = other.Alt2; alt2_text = other.alt2_text; Alt3 = other.Alt3; alt3_text = other.alt3_text; Alt4 = other.Alt4; alt4_text = other.alt4_text; ui_mode = other.ui_mode; Alt5 = other.Alt5; alt5_text = other.alt5_text; Alt5_mask = other.Alt5_mask; Alt6 = other.Alt6; alt6_text = other.alt6_text; Alt6_mask = other.Alt6_mask; string_id = other.string_id; string_count = other.string_count; }
public void copyFrom(Panel other) { name = other.name; x = other.x; y = other.y; pos = other.pos; sign = other.sign; show = other.show; Altf = other.Altf; alt_text = other.alt_text; Alt2 = other.Alt2; alt2_text = other.alt2_text; Alt3 = other.Alt3; alt3_text = other.alt3_text; Alt4 = other.Alt4; alt4_text = other.alt4_text; ui_mode = other.ui_mode; }
//public TreeNode node; public Panel(String aname, Func <int, int, int, int, int> ashow, int ax, int ay, int apos, int asign = -1, UI_Mode uim = UI_Mode.UI_Checkbox, int fAlt = -1, string text = "", int fAlt2 = -1, string text2 = "", int fAlt3 = -1, string text3 = "", int fAlt4 = -1, string text4 = "") { name = aname; show = ashow; x = ax; y = ay; pos = apos; sign = asign; Altf = fAlt; alt_text = text; Alt2 = fAlt2; alt2_text = text2; Alt3 = fAlt3; alt3_text = text3; Alt4 = fAlt4; alt4_text = text4; ui_mode = uim; }
private void setSelect(Informant informant, bool select) { if (IsSameOrSubclass(typeof(GridThing), informant.GetType())) { GridThing gridThing = informant as GridThing; gridThing.setSelected(select); // If tile, that contains a character, set select for character as well if (IsSameOrSubclass(typeof(Tile), informant.GetType())) { Tile tile = informant as Tile; if (tile.character) { setSelect(tile.character, select); } } // If character, select tiles in movement range if (select && IsSameOrSubclass(typeof(Character), informant.GetType())) { Character character = informant as Character; //TODO: for now this switches to movement mode, // in the future this should be trigged by a button in the UI or a keypress or something explicit // not just by click a character should it prompt a move... this.selectedCharacter = character; foreach (var tile in character.move_range) { tile.setWalkableForSelectedCharacter(select); this.mode = UI_Mode.player_unit_turn_during_action; this.action = UI_Action.move; } } } }