Announcement

Collapse
No announcement yet.

[Help] Page.Redraw()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Help] Page.Redraw()

    OK I am having a problem, I am trying to use

    PHP Code:
    if PageStart then
        Page
    .Redraw();
        
    PageStart false;
    end 

    I have also tried to just call Page.Redraw(); and it does not seem to fire at all

    I want my objects to be reset in to there given areas but it does not seem to work at all is there a bug in 8.2 I missed?

    Page one button PageStart = true

    Page two it checks if it came from Start or another place but its not redrawing
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    I am still having this problem I am unable to redraw the page, sorry but why was this post left with no reply's? Reloading the page does not redraw the page I want the page to load as it would of when it's first ran.

    So hidden or deleted objects reset, to there default what they was set to when the program is loaded.
    Plugins or Sources MokoX
    BunnyHop Here

    Comment


    • #3
      You have to do that on preload. Set their atributes and positions as they should be and write a script about it. So every time you load that page check if you want to set them back at their positions and atributes. Reloading page won't do anything. You have to manualy write down all the default settings for every object there is. Unless there is a plugin i am not aware of.

      Comment


      • #4
        Originally posted by afterlight View Post
        You have to do that on preload. Set their atributes and positions as they should be and write a script about it. So every time you load that page check if you want to set them back at their positions and atributes. Reloading page won't do anything. You have to manualy write down all the default settings for every object there is. Unless there is a plugin i am not aware of.
        I am sure there was a means to have the page fully redraw as default well I know we played with options in the past, you can't just keep writing all the code all the time this is very messy and not really right, I think we might of created a setting table looping throw the opbjects I not sure lol

        Not really seen you around afterlight so welcome I know it says Dec 2014 but hey lol
        Plugins or Sources MokoX
        BunnyHop Here

        Comment


        • #5
          Wel..

          You can do it the hard way or you can do it as you said in a form of a loop which is also a script

          On Show use this script:
          if getvalues == nil then

          obj = Page.EnumerateObjects();
          num = Table.Count(obj);

          vbuttons = 1
          vhotspots = 1
          vinputs = 1


          buttons = {};
          hotspots = {};
          inputs = {};


          start = 1
          while start <= num do
          obj1 = Table.Remove(obj, 1);
          type = Page.GetObjectType(obj1);



          if type == 0 then
          prop = Button.GetProperties(obj1);
          Table.Insert(buttons, vbuttons, obj1);
          Table.Insert(buttons, vbuttons + 1, prop);
          vbuttons = vbuttons + 2
          end

          if type == 7 then
          prop = Input.GetProperties(obj1);
          Table.Insert(inputs, vinputs, obj1);
          Table.Insert(inputs, vinputs + 1, prop);
          vinputs = vinputs + 2
          end

          if type == 8 then
          prop = Hotspot.GetProperties(obj1);
          Table.Insert(hotspots, vhotspots, obj1);
          Table.Insert(hotspots, vhotspots + 1, prop);
          vhotspots = vhotspots + 2
          end

          start = start + 1

          end

          getvalues = 1
          end

          And to get them back you can add the following script to the preload:
          if getvalues == 1 then

          but = Table.Count(buttons);
          start = 1
          while start <= but do
          Button.SetProperties(buttons[start], buttons[start + 1]);
          start = start + 2
          end

          inp = Table.Count(inputs);
          start = 1
          while start <= inp do
          Input.SetProperties(inputs[start], inputs[start + 1]);
          start = start + 2
          end

          hot = Table.Count(hotspots);
          start = 1
          while start <= hot do
          Input.SetProperties(hotspots[start], hotspots[start + 1]);
          start = start + 2
          end

          end

          This script is only for Buttons, Inputs, and Hotspots, you can add your tables for different types of objects if you want i just made this as an example of "reloading" the page.

          Hope this saves some time and helps you.

          Comment


          • #6
            Originally posted by afterlight View Post
            You can do it the hard way or you can do it as you said in a form of a loop which is also a script

            On Show use this script: ...........................

            And to get them back you can add the following script to the preload: ................................

            This script is only for Buttons, Inputs, and Hotspots, you can add your tables for different types of objects if you want i just made this as an example of "reloading" the page.

            Hope this saves some time and helps you.
            Well I give it a look but next time post them in code tags I was going to write my own but I give this a look buttons inputs and hotspots, I don't use any of them often lol, for the demo just images need to be checked but ya thanks.
            Last edited by kingzooly; 06-26-2015, 09:38 AM. Reason: Didn't need to Quote the code
            Plugins or Sources MokoX
            BunnyHop Here

            Comment


            • #7
              I never really wrote a lot on forum so I didn't quite know how to put the script in to the code environment (I tryed). Anyways I hope the script helped you.

              Code:
              CODE
              I hope this is it xD

              Comment


              • #8
                Ya if you do a reply rather then reply to thread it gives you a basic editor the Go Advanced option is there for if you have written stuff and don't want to lose your post
                Plugins or Sources MokoX
                BunnyHop Here

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎