-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
form. A fue improvements for go to line functions #62
Comments
I don't think we should place invalid error in line columb, as Notepad itself is the same does that, putting to the last or first whatever is available. |
@harrymkt yes, We should get error if we enter an out of range columb, for example, a line only have 4 columbs and you enter 26 for the columb number. In this case, If We don't get a out of range columb error, The user will be confused and can think that actually they are now at columb 26, But in reality, This line only has 4 columbs and the user is at columb 4, So for this reason and also teknikly, We should have these errors, As we have for the line numbers |
@peter1384 However, Notepad++ has the ability to go to a specified offset, or column, and it moves to last and first depending on the input. Even though they are moved to last or first, users won't I think confused, because they have been put in blank character, which means they can type in last or first, so I don't think this is a big issue. But yeah, it is good to provide as an optional feature. |
@harrymkt yeah, it's good that you understand, Also, I have another reason for needing this error. I've built a notepad for my self with nvgt since I like it, And I use it to figger out my code compilation error problems. So when I get compilation error in my code, and it says on line 226 25, I quickly open my nvgt notepad, press ctrl g, and enter 226 in line number, and 25 in line columb, And if such line number or line columb doesn't exist in my code, I'd like to get an error raather than my line number or columb set focused on anything else |
@samtupy Currently, This dialog only has one editbox which renames between line number and item number, and if a multy line editbox is in focus, the line columb will be inserted in it, so it will contane line number and line columb in that case. This is all that i've understood from that class. So if we want to have only line columb for the non multy line editboxes, what should we do? it is a bit unclear for me, it would be much simpler i think if we said if list is in focus, do blaaablaa. else if is multy line do blaablaa. But currently it only says if a list is in focus, rename to go to item, and then a kolen, and go to line, and insert line columb. I'm not so much advance to change that, And I think that kolen can only be useful if we only have 2 cases, but not more than 2. Can you please have a look? thanks! |
Hi, I agree with these changes and will implement them in the coming days. |
To answer your question specifically, you would set the f_index field to hidden once it turned out that a single line text field was in use. |
@samtupy hi, Thanks! even with that, I don't know the function name to hide a feald in nvgt form lol, and yeah i'll just let you do it. Thanks! i'm excitedly waiting for it! |
@samtupy hi, I wanted to do the first case and only leave the second case to you because I know I can do that, I just don't know how to hide a feald in the form. I saw the boolians about enabled and visible, And I tryed to check if the feald was not multi line, I go |
@samtupy actually, I've just noticed this go to line functions does not work at all, But I don't know why, But it works in stw inputs, But I tryed it with both nvgt 0.85.1 and 0.87.2 but it doesn't work, |
Oops you are correct, this was accidentally broken when form.nvgt got converted to no longer need bgt_compat.nvgt. I shall fix it when I attend to the other things in this issue, thanks. |
@samtupy ok then. I'll just let you do everything in this issue |
But, You know better. May be this kind of code has its disadvantages also, As we need to create the f index feald for all cases, but in the current state you only created the f index once, And you are using it for everything |
@samtupy thanks, the go to line functions are working perfectly fine now, But the line column has a problem. |
@samtupy This also happens with stw inputs, So don't worry, it's not because of your recent codes. Now my multi line editbox is exactly same as stw, meaning both have the same bug in same way as provided above |
don't care about the note 2 provided by me because it was a bug in that time and now nothing about it, and i'll edit my comment and remove it |
oh! how notepad plus plus is stupid! Since i've heard it supports going to column and line, I downloaded it to try how is it, And When I pressed ctrl+g on it, It showed me an editbox with lable line number, and a set of radio buttons contaning line number, and offset options, And a go button and a cansel button, And the lable of editbox was changing depending on the radio buttons selection to number or offset |
Hello @peter1384. Enjoy! |
Audio Form modifications: * You can use `audioform_keyboard_echo` property to save in your game data file, and then retrieve it when the game loads the data etc. * Once an input field is popped out, You can use the F2 key to change between echo modes. The changed echo mode will be spoken out loud, as well as setting `audioform_keyboard_echo` property to match with the changed echo (fixes #77). * The `reset` method now takes a new parameter, true by default, which resets the form's echo mode to default. This is useful to retrieve the value of the `audioform_keyboard_echo` property. * The go to line functionality can now be used on non multiline input fields as well. In non multiline fields, the line number field will be invisible (references #62). * Added a new property in `control` class called `enable_go_to_index`, which is true by default, which allows setting to enable or disable the go to line functionality. This is natively used in `go_to_index` class to disable the ability to promt the dialog on go to line dialog over and over. * Added a new method that allows you to toggle the go to line functionality. `bool set_enable_go_to_index(int control_index, bool enabled);` Sound Pool modifications: * Added a new parameter in `update_listener_3d` function called `refresh_y_is_elevation` (bool) which toggles whether the sound pool should refresh the global `sound_pool_default_y_is_elevation` property. This makes it possible to constantly change the global property for the sound elevation. Token Gen modifications: * A new parameter has been added, `mode`, which you can choose the mode to generate, see `token_gen_flag` enum constants for possible modes. Default mode is `token_gen_flag_all`
@harrymkt first, really thanks! then, I think you can also very easily do the second point in this issue as wel! look at set column function, we have 2 values there, one is int col and the other is int maxcol. So, up on pressing ok button for this dialog, along other checks, you can add else if col grater than maxcol invalid column! return; sorry, i'm typing on phone so that's why I didn't typ simbles and stuf. Thanks a lot! |
Hello @amirmahdifard. First of all, I think it is not necessary because it moves to the last maximum possible column, so user can continue its typing from the last. Please let me know why you think this should be implemented. Thanks! |
The column minus issue when it is used on line 1 has been resolved at #84. |
it's ok anyway, thanks! |
* `set_line` function now returns an int rather than a bool. Values are 0 for success, 1 for invalid line and 2 for invalid coloumn, as well as -1 for an internal error. * You can no longer go beyond the maximum coloumn in form input. For example if the input has 50 characters in length, you can go up to 51, because 51 will be the blank character from which you can continue to write from the end. This change closes samtupy#62. * Improved the touch.nvgt `is_available` method's return value as `return dev.length() > 0;` for short.
1: currently, If a list is in focus, the go to item dialog appears and allowes us to select an item in the list, and if a multy line editbox is in focus, the go to line dialog appears, allowing to find a line number and a line columb. But, When a non multy line editbox is in focus, This dialog cannot help us at all currently, But, If a non multy line edit box is in focus, this dialog should open, with only line columb, and an ok and a cancel button, allowing us to set the line columb in a long line inside the non multy line editbox
2: Currently, if you enter an out of range line number for example you only have 10 lines and you enter 11 and press enter, you get invalid line number error, But this is not the case for the line columb. If you enter an out of range number columb for a line and press enter, you will be put on the last columb of the line and you won't get an invalid line columb error, Which you should. I didn't find how to fix this in the form.nvgt my self
The text was updated successfully, but these errors were encountered: