Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: Tool: TrackEditor (Former Problem with WM_MouseWheel)

  1. #21
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    you are using TBGL_GETWINDOWKEYONCE but you never reset it.

    I moved the GETASYNCKEYSTATE( - 1 ) out of that routine and added TBGL_ResetKeyState()

    add them both in the tbmain

    [code=thinbasic] appstate = %stEdit

    TBGL_ResetKeyState()
    GETASYNCKEYSTATE( - 1 )

    DIALOG SHOW MODAL hDlg, CALL DlgProc[/code]

    but I dont think that is the best place for them. But I have to go out so I will let you play.

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  2. #22
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Problem is not TBGL_GetWindowKeyOnce. It is working fine.
    Problem is that successive turning is fired by
    [code=thinbasic]
    CASE %ID_TurnRight, %btn_right
    RotateTileRight( )
    CASE %ID_TurnLeft, %btn_left
    RotateTileLeft( )
    [/code]
    in %WM_COMMAND events

    Comment out above line events and R and L keys will work fine.

    Still checking ...
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #23
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Ok, found the problem.

    Remove "&" from button text
    [code=thinbasic] CONTROL ADD BUTTON, hDlg, %btn_left, "&Left", 520, 5, 45, 15
    CONTROL ADD BUTTON, hDlg, %btn_Right, "&Right", 575, 5, 45, 15[/code]

    and just leave as:
    [code=thinbasic] CONTROL ADD BUTTON, hDlg, %btn_left, "Left", 520, 5, 45, 15
    CONTROL ADD BUTTON, hDlg, %btn_Right, "Right", 575, 5, 45, 15[/code]

    otherwise standard windows behave will fire another left or right command.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #24
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    EDIT: Eros was faster again

    Hi,

    the problem is buttons have &R and &L, that means after change of focus from cavas to dialog / listbox ... the R and L is captured by Windows and then by TBGL function.

    Solution is to get rid of &Left, &Right in button name.

    Other important thing is to filter messages properly, so use CBCTLMSG test:
    [code=thinbasic]
    CASE %ID_TurnLeft, %btn_left
    if CBCTLMSG = %BN_CLICKED THEN
    RotateTileLeft()
    END IF
    [/code]

    I attach working example for you.


    Petr

    P.S. Mike, this editor rocks! Very intuitive
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #25
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Mike,

    we discussed this via PM - ability to show tile preview.
    I did it using viewport approach, all new code is in Render_Track.


    Petr
    Attached Images Attached Images
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  6. #26
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    I agree, this editor rocks !

    And because it already rocks, I would change the following (personal opinion):
    • track files from binary to text structured. In this way other users can create it easily following file directive. A sort of text file like Petr and Simone used for (respectively) 3D Labyrinth levels and Arkanoid levels.
    • when trackedit open, it nicely open the last edit file. But if changed it ask again the same of the file. It should instead save under current file name
    • when closing with [X] and file is changed, ask if to save with Yes, No but also Cancel button.Cancel will just not save and not exit. It cancel the event
    • have the option to move the camera to be able to see part of the track that goes off screen when zooming. For example when mouse reach the edge of the TBGL canvas (maybe last 5/10 pixels, just move camera left/right/top/bottom
    • possibility to modify inclination the camera


    For today it can be enough ;D

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  7. #27
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Tile preview OMG
    We have really a great program here !!

    Thanks a lot guy. I started to smile this morning and still not able to stop. My wife told me I'm a little crazy kid. I start to think she will call neurological staff today but fortunately I will be out for family stuff a while today afternoon so I think I will distract my mind from this.

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #28
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Petr,

    found a situation in your version that GPF the script.
    Press inside the tile listbox where no element is present (white area). Here it GPF.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  9. #29
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    Ooops,

    I hope it not made you stop smiling, to make me sure I post correction here

    Will help Mike with the other suggestions, just have to change from "coder" to "cook" for now


    Petr
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  10. #30
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Tool: TrackEditor (Former Problem with WM_MouseWheel)

    NOW PERFECT !
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. RegExp tool
    By marcel in forum VBRegExp
    Replies: 1
    Last Post: 11-03-2008, 11:21

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •