Announcement

Collapse
No announcement yet.

Argument Assertion Advocate (AAA) Action Plugin

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

  • Argument Assertion Advocate (AAA) Action Plugin

    Argument Assertion Agent (AAA) Action Plugin
    This is based on the IRLUA_HELPER_FUNCTIONS that I put in every single one of my plugins. The code used for plugin development can now help with AMS projects too!

    What it does...
    As did the original script, It allows the checking of argument count and types and throw errors if either are incorrect (among other things).

    Why create a plugin instead of continuing to use the script?
    Two reasons:
    1. I wanted to be able to use these features in my projects (not just plugins) to more easily catch mistakes and track bugs in my project code as well as force specific argument input.
    2. Now, whenever I make a change to the helper functions' code, I have to change only one section of code instead of having to update every plugin.

    You can get the latest version on my website.
    Last edited by Centauri Soldier; 01-13-2020, 01:23 PM.
    https://github.com/CentauriSoldier

  • #2
    Updated to 3.1.0.0.
    https://github.com/CentauriSoldier

    Comment


    • #3
      is there any chance that you can create a plugin that will auto resize all object size if the page is resize? if the object is label and paragraph all its font also will resize proportionaly.. is that posible? thanks

      Comment


      • #4
        I think Soldier actually already did a resize plugin (if memory serves me correctly). Seem to recall several examples of "resize all" code floating about at some stage. Didn't you dev a plugin from one of these examples, Centauri? (I also seem to remember a chunk of resize-code that Worm did some improvements to).

        Comment


        • #5
          Yes, I do recall writing something like that. I'm not sure if I still have it or not. I can look around for it.
          https://github.com/CentauriSoldier

          Comment


          • #6
            I might actually still have it, too. There's nothing on my current HDD - but there's a bunch of old AMS stuff on some archived drives I have in storage. It's all old stuff though and likely therefore to be v7 code which'll need updating. Do you remember whether it was a v8 plugin, Centauri?

            Comment


            • #7
              The only thing I can find is an incomplete example of it. I know I wrote a script for that but I think it was for LOVE2D, not for AMS.

              It's pretty easy to do though. You just set two variables. One is the the build resolution and the other is the actual resolution. You build your project using the build resolution then use a ratio (of the actual resolution to the build resolution) to adjust object size and position during runtime whenever a resize is detected..
              https://github.com/CentauriSoldier

              Comment


              • #8
                Hello BioHazard and Centauri Soldier , thanks for taking time in this thread... yeah i have the Auto Centering Object example, here but do not do the works it only auto center its object from the page. but what i want to achieve which is i do also some manual coding but no luck is, auto center all object proportionaly acording to the size of the page project.. and if the object is Label or Paragraph or button the text also will auto resize.

                Comment


                • #9
                  @telco,

                  I'm pretty sure the stuff I'm talking about will do what u need. I remember seeing examples floating around - there were several of them as I recall - and for some reason have it in my head that Centauri actually did a plugin that was based on one of them. Will dig up some boxes from storage to see what I can find on my old HDDs. Might take a few days though, sorry. Will make a post here if I find anything of relevance.

                  Comment


                  • #10
                    telco

                    Did some digging & dusted some cobwebs - but didn't find much, I'm sorry to say...

                    The plugin I was thinking of was something Centauri did based on Adam's ResizeAJK example - but was developed for v7.5 and doesn't include the functionality you wanted for font-resizing in the page Objects.

                    For something that includes a resizing of Object font, you can modify the ResizeAJK example by setting the appropriate table elements for font-size in Globals. Set the font-size dynamically by choosing some kind of algorithm which reflects the dimensions of the Objects being resized.

                    In the ResizeAJK example for instance, you could use the RatioW and/or RatioH variables to obtain a rough correlation between object-resizing and desired fontsize. Eg.
                    Code:
                    nFontSize = (RatioW * 10);
                    Then apply it to each of the Objects you wish to affect, viz.
                    Code:
                    Button.SetProperties(tblProps.ObName,{FontSize = nFontSize});
                    Label.SetProperties(tblProps.ObName,{FontSize = nFontSize});
                    Paragraph.SetProperties(tblProps.ObName,{FontSize = nFontSize});
                    Have attached a rough'N'ready example, using Adam's ResizeAJK code to demonstrate. It shows dynamic font-resizing in the associated Button, Label & Paragraph objects.

                    Nb. This is a MacGuyver-style 'innovate'N'create' approach - so It ain't pretty - but seems to do what you asked.
                    Attached Files

                    Comment


                    • #11
                      Hello BioHazard thank you for taking time to deg in your drive to look this example..i actually have this ResizeAJK but your modded one looks do the job.. although i need to add manually the plugin object.. Thanks..

                      Comment


                      • #12
                        also im trying to modify the example you have, that if in case i need to resize the window width the window height need also to resize automatic in this case the page will still remain in the same ratio.. what do you think? im still working it now for this solutions..

                        Comment

                        Working...
                        X