Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    feature that gives a warning when you press the green flag

    Feedback
    feature-request
    3
    10
    666
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by

      So chrome gives you a warning if you have progress on a website (like say a drawing or text) and then try to close it

      What if Creaticode has a similar feature but for when you try to press the green flag (or also close the tab)? This might be useful so a user doesn’t accidentally reset their progress in a project.

      For implementing this feature, i’d say a block called “[enable/disable v] tab close warning” and “[enable/disable v] green flag press warning” would do the trick.

      Also, I love all the new tutorials and stuff you guys added, I’m actually going to make an AI chatbot project that’s super enhanced using the calculations bot tutorial

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      info-creaticode Tyller_ 2 Replies Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @jeffreyrb03-gmail last edited by

        @jeffreyrb03-gmail

        When you try to close the tab with unsaved work, we already show a warning like that.

        For the greenflag, when would it be necessary to show a warning?

        jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
        • Tyller_
          Tyller_ Best Forum Helpers @jeffreyrb03-gmail last edited by

          @jeffreyrb03-gmail maybe just a block that disables or enables it for when you try to close the tab from the play screen, then it’ll run a new hat block called something like “user tried to leave page” (though I don’t remember if that pop up freezes the page/pauses animation frame requests), then it’ll allow the project to save a user’s data or prepare for them to leave gracefully

          <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
          </div>

          info-creaticode 1 Reply Last reply Reply Quote 1
          • info-creaticode
            CreatiCode @Tyller_ last edited by

            @tyller_

            That makes sense. So this would be a new hat block in the event category, which will be triggered whenever the user tries to close the tab. We can add this to our todo list. Thanks

            1 Reply Last reply Reply Quote 1
            • jeffreyrb03-gmail
              JaecadeJnight Mod Helper @info-creaticode last edited by

              @info-creaticode Thats when you see inside and make changes to code, but I mean when playing the project. For example, there could be a drawing application project. But the user might press the green flag and reset all their progress on accident, so this would solve the issue

              #LLJW
              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

              Tyller_ 1 Reply Last reply Reply Quote 0
              • Tyller_
                Tyller_ Best Forum Helpers @jeffreyrb03-gmail last edited by

                @jeffreyrb03-gmail that could be fixed with a “first green flag press” hat block, though there would have to be a new button in the editor so you can do a normal green flag press and simulate a “first press” of the flag

                <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
                </div>

                info-creaticode 1 Reply Last reply Reply Quote 0
                • info-creaticode
                  CreatiCode @Tyller_ last edited by

                  @tyller_

                  We already have this block, which runs when the user clicks the green flag button, but before the “when green flag clicked” block is triggered

                  000746d5-6816-4535-809f-8af17d625444-image.png

                  Tyller_ 1 Reply Last reply Reply Quote 0
                  • Tyller_
                    Tyller_ Best Forum Helpers @info-creaticode last edited by

                    @info-creaticode okay, does it run every time you press the green flag in the editor and only once when you press it in the project page?

                    <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
                    </div>

                    info-creaticode 1 Reply Last reply Reply Quote 0
                    • info-creaticode
                      CreatiCode @Tyller_ last edited by

                      @tyller_

                      It always runs when the green flag button is clicked.

                      In this use case, we can use a variable to keep track of if there is any unsaved work from user. This variable will be set to false in the “when green flag clicked” block or when we save the work, and set to true when the user does something new.

                      Then in the “prepare green flag” block, if this variable is true, then we show the warning.

                      1 Reply Last reply Reply Quote 1
                      • jeffreyrb03-gmail
                        JaecadeJnight Mod Helper @info-creaticode last edited by jeffreyrb03-gmail

                        @info-creaticode I don’t know if that will like stop the user from pressing the green flag and resetting their progress in say, a drawing app. The green flag usually resets things, which is it’s purpose, like resetting widgets and whatnot. However, some method to like give a prompt that says “You have unsaved work in this project, are you sure you want to reset it?” would be good, but i don’t think a hat block would logically make sense for this thing.

                        #LLJW
                        <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post