Bug #778

Turtle LeftRepeat dosen't work

Added by Zbigniew Rebacz about 10 years ago. Updated over 9 years ago.

Status:RejectedStart date:05/08/2014
Priority:NormalDue date:
Assignee:Zbigniew Rebacz% Done:

0%

Category:TurtleSpent time:-
Target version:-

Description

It seems that LeftRepeat is not implemented in current Turtle version (I tested it with Chrome & Firefox).

History

#1 Updated by Miroslav Fidler almost 10 years ago

  • Assignee set to Zbigniew Rebacz

I am unable to reproduce this. I have tested in Windows, with WebWord, double-clicking on words - seems to work in all 3 browsers (IE, FF, CH).

Can you please describe the exact procedure to reproduce this problem, please?

#2 Updated by Zbigniew Rebacz almost 10 years ago

Here is my code maybe it can help: (This is map editor for 2D platformer game - the idea of this method is that you can add new elements to the game map by holding left button)

void EditorCtrl::LeftDown(Point p, dword keyflags)
{
    Element* element = findElement(p);
    if (!lock && element != NULL) {
        Point pos = findElementPos(p);

        if (mode == EditMode && toolMaterial != NULL) {
            element->setColor(toolMaterial->getColor());
            Refresh();
        }
        else if (mode == DestroyMode) {
            *element = Element();
            Refresh();
        }
        else if (mode == StartMode) {
            if (pos != level.getEnd()) {
                level.setStart(pos);
                Refresh();
            }
        }
        else if (mode == EndMode) {
            if (pos != level.getStart()) {
                level.setEnd(pos);
                Refresh();
            }
        }
    }
}

void EditorCtrl::LeftRepeat(Point p, dword keyflags)
{
    LeftDown(p, keyflags);
}

#3 Updated by Zbigniew Rebacz almost 10 years ago

  • Assignee changed from Zbigniew Rebacz to Miroslav Fidler

#4 Updated by Miroslav Fidler almost 10 years ago

  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

Hard to say. I cannot reproduce the problem based on the code posted. I have tested this:

struct MyApp : TopWindow {
    int n;

    void Paint(Draw& w) {
        w.DrawRect(GetSize(), White());
        w.DrawText(10, 10, AsString(n));
    }

    virtual void LeftDown(Point p, dword keyflags)
    {
        n++;
        Refresh();
    }

    virtual void LeftRepeat(Point p, dword keyflags)
    {
        LeftDown(p, keyflags);
    }
};

CONSOLE_APP_MAIN
{
    StdLogSetup(LOG_COUT|LOG_FILE);

    MemoryLimitKb(100000000); // Perhaps a good idea to set a limit to prevent DDoS
    Ctrl::connection_limit = 50; // Maximum number of concurrent users (preventing DDoS)

#ifdef _DEBUG
    Ctrl::debugmode = true; // Only single session in debug (no forking)
#endif

//    Ctrl::WhenDisconnect = callback(FinishApp); // Use this to gracefully exit (save data?)

#ifndef _DEBUG
    Ctrl::host = "eventcraft.eu";
#endif

    if(Ctrl::StartSession()) {
//        PromptOK("[^http://www.ultimatepp.org^ LINK");
        MyApp().Run();
        Ctrl::EndSession();
    }

    LOG("Session Finished");
}

Seems to work just fine...

My guess is that either some very special case, or you have some other problem in your code.

#5 Updated by Zbigniew Rebacz over 9 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF