flat assembler
Message board for the users of flat assembler.

Index > IDE Development > FASMW scrolling through time

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8146
Location: Kraków, Poland
Tomasz Grysztar 03 Mar 2017, 10:49
Inspired by today's xkcd I tried to make a quick patch to fedit control used by fasmw, which would allow to move through undo/redo space with the mouse wheel:
Code:
wm_mousewheel:
        lea     ebx,[kbstate]
        invoke  GetKeyboardState,ebx
        test    [kbstate+VK_MENU],80h
        jnz     time_scroll
        ; ...
    time_scroll:
        test    [editor_mode],FEMODE_READONLY
        jnz     ignore
        test    [editor_mode],FEMODE_NOUNDO
        jnz     enable_undo
      move_through_time:
        cmp     word [wparam+2],0
        jl      forward_in_time
        sub     word [wparam+2],120
        jc      time_scroll_done
        mov     eax,[undo_data]
        test    eax,eax
        jz      time_scroll_done
        call    undo_changes
        jmp     move_through_time
      forward_in_time:
        add     word [wparam+2],120
        jc      time_scroll_done
        mov     eax,[redo_data]
        test    eax,eax
        jz      time_scroll_done
        call    redo_changes
        jmp     move_through_time
      time_scroll_done:
        call    create_caret
        mov     [last_operation],0
        jmp     text_changed    
It allows to "scroll through time" when mouse wheel is used while holding down ALT key.

After playing a bit with this trick I'm starting to think that this could in fact be treated seriously.


Description: Experimental FASMW with ALT+wheel allowing to "scroll through time"
Download
Filename: fasmw.zip
Filesize: 88.33 KB
Downloaded: 857 Time(s)

Post 03 Mar 2017, 10:49
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 03 Mar 2017, 11:25
This is a very cool idea!
Post 03 Mar 2017, 11:25
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1511
Location: Toronto, Canada
AsmGuru62 03 Mar 2017, 21:27
Indeed! Nice feature.
Post 03 Mar 2017, 21:27
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8146
Location: Kraków, Poland
Tomasz Grysztar 04 Mar 2017, 13:44
After fixing a minor bug I have added it to the official release. To get it working you need to enable the "Time scrolling" from the "Options" menu and then hold either Ctrl+Alt or the right Alt while scrolling - I wanted to make sure that it would not get activated by accident.
Post 04 Mar 2017, 13:44
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.