public SettingComponent(KeybinderCore core, ISettingsProvider provider) : base(core) { _provider = provider; _temporarySettings = new Dictionary <Tuple <Type, string>, object>(); }
static void Main(string[] args) { using (KeybinderCore core = new KeybinderCore("rgn_ac_gta", new SAPI())) { var testCollection = new TestCollection(core); core.AddComponent(new ChatComponent(core, testCollection)); core.AddComponent(new KeyComponent(core, testCollection)); core.AddComponent(new TextComponent(core, testCollection)); core.AddComponent(new OverlayComponent(core, true)); core.AddComponent(new SettingComponent(core, new DefaultProvider())); core.Start(); var testOverlay = core.GetComponent <OverlayComponent>().GetOverlay <TestOverlay>(); testOverlay.Overlay.Active = true; testOverlay.Overlay.Color = 0xFFFFFFFF; testOverlay.Overlay.Size = 10; testOverlay.Overlay.UseMaxWidth = true; testOverlay.Overlay.UseMaxHeight = true; testOverlay.Overlay.MaxWidth = 100; testOverlay.Overlay.MaxHeight = 100; testOverlay.Overlay.X = 200; testOverlay.Overlay.Y = 400; testOverlay.Overlay.ExampleValue = "This get displayed when the value of this text is empty and edit mode is activated."; Console.ReadLine(); } }
public OverlayItemText(KeybinderCore core, string identifier) : base(core) { _identifier = identifier; _overlay = new Natives.Text(core); _boundingBox = new Box(); }
public OverlayComponent(KeybinderCore core, bool ingameEditing) : base(core) { _ingameEditing = ingameEditing; _overlays = new List <OverlayItem>(); _editActive = false; }
public ChatComponent(KeybinderCore core, params IChatCollection[] collections) : base(core) { _disposed = false; _collections = new List <IChatCollection>(collections); _chatBindMethods = new List <Tuple <IChatCollection, MethodInfo> >(); _chatLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "GTA San Andreas User Files\\SAMP\\"); }
public bool IsActive(KeybinderCore core) { if (!_isAffectedByPause) { return(false); } return(!core.Paused); }
public KeyComponent(KeybinderCore core, params IKeyCollection[] collections) : base(core) { _collections = new List <IKeyCollection>(collections); _keyBindMethods = new List <Tuple <IKeyCollection, MethodInfo> >(); _disposed = false; _keyboardHookHandle = IntPtr.Zero; _keyboardHookThread = new Thread(HookMessageProcedure); _keyboardHookRunning = false; _keyStates = new BitArray(KeyCount); _keyUsed = new BitArray(KeyCount); _keyPressedCount = new byte[KeyCount]; }
public MouseHook(KeybinderCore core) { _core = core; _overlayComponent = core.GetComponent <OverlayComponent>(); _mouseHookHandle = IntPtr.Zero; _buttonDown = false; _startPoint = new Point() { X = 0, Y = 0 }; _overlayPoint = new Point() { X = 0, Y = 0 }; _editState = OverlayEditState.None; _selectedOverlayText = null; _running = false; _threadId = 0; }
public Text(KeybinderCore core) { _core = core; _overlayComponent = core.GetComponent <OverlayComponent>(); _id = -1; _value = String.Empty; _oldValue = String.Empty; _valueBeforeEdit = String.Empty; _exampleValue = String.Empty; _color = 0xFFFFFFFF; _size = 12; _x = 0; _y = 0; _active = false; _useMaxWidth = false; _useMaxHeight = false; _maxWidth = 0; _maxHeight = 0; }
public TestOverlay(KeybinderCore core) : base(core, "Test") { }
public TestCollection(KeybinderCore core) { _core = core; }
public OverlayItemBox(KeybinderCore core) : base(core) { _overlay = new Box(); }
public OverlayItem(KeybinderCore core) { _core = core; }
public TextComponent(KeybinderCore core, params ITextCollection[] collections) : base(core) { _collections = new List <ITextCollection>(collections); _textBindMethods = new List <Tuple <ITextCollection, MethodInfo> >(); }
public Component(KeybinderCore core) { _core = core; _isInitialized = false; }