Translating the game

  • #10, by ke4Monday, 31. August 2015, 13:27 5 years ago
    Yes it's mouseEvent and already third one in my game. Why there cant be multiple mouseEvent handerls? :/ All works fine...

    Nice idea with the rect idea, should definitely work with that.

    I know i was searching through the forum and i found your example .ved file but it wasnt drag and drop slider, but with buttons on the side. It's from 2012 so i guess there wasn't functions for that then.
    Then i found something on Wiki article fom the forum search, but it was really long script and that little scared me i want something simple. My version is just a few lines of code.
    I did't check the wiki though.

    Good articles btw, but how they can be found except random search?

    Key Killer

    810 Posts


  • #11, by afrlmeMonday, 31. August 2015, 14:06 5 years ago
    No idea, the search function on this website isn't all that great. It's a bit hit & miss half the time when you try searching for something specific.

    Because there's only supposed to be one instance of all event handlers / listeners except the mainLoop event.

    The general idea is that you create a single function for each event handler you create & then inside of that you can add if queries, lines of code & / or call other functions from inside of said function.

    function mouseEvt(eventType, mousePosition)
    if eventType == eEvtMouseWheelUp or eventType == eEvtMouseWheelDown then
    -- mouse wheel was activated, do something
    end
    if eventType == eEvtMouseMove then
    if game.CurrentScene:getName() == "test" then moveAnim() end
    end
    end

    function moveAnim()
    if ActiveAnimations["test"].AnimationCurrentPosition.x > 200 and ActiveAnimations["test"].AnimationCurrentPosition.x < 600 then
    ActiveAnimations["test"].AnimationCurrentPosition = { x = (game.ScrollPosition.x + getCursorPos().x), y = 100}
    end
    end

    registerEventHandler("mouseEvent", "mouseEvt")
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17

    ... the example is a bit crude as I just wrote it mostly off the top of my head.

    Imperator

    6819 Posts

  • #12, by ke4Wednesday, 02. September 2015, 13:41 5 years ago
    I exported all my text into .po and tried translate one scene & then import the file back.

    When i imported the texts back it said successfully imported, but they are imported somewhere into unknown, the english boxes in Visionaire for the scene are still empty. I set English for the translation option in exporting.

    Key Killer

    810 Posts

  • #13, by afrlmeWednesday, 02. September 2015, 19:23 5 years ago
    Try csv format instead. I believe I had no issue with that one. I can't remember what I opened the files up with though. I think it was the database / spreadsheet app of open office.

    Imperator

    6819 Posts

  • #14, by ke4Wednesday, 02. September 2015, 19:33 5 years ago
    I would like to use the Poedit software, looks very comfortable. Seems to be just some import issue, but maybe there is some csv "poedit" tool.

    Key Killer

    810 Posts

Write post