• Version
  • 139 Download
  • 9.69 MB File Size
  • April 26, 2018 Create Date

AgkSharp-Templates files.
Build on AGK Version 2017-12-12

 

5 thoughts on “AGKSharp Templates 2018-05-10

  • Ben Holtzman

    Very interesting project. I’ll volunteer to help make enums for command parameters! I’d also like to donate at some point when you get your donate button working.

  • Parker Eli Bidigare

    I am having a problem with putting text into the edit boxes, I click on it and there is no console. I am thinking this is a bug.

    • MadBit

      Here is a quick Example. That works. 😉

      using System;
      using AgkSharp;
      using AGKCore;

      namespace EditBoxes
      {

      static class Program
      {
      ///

      /// Der Haupteinstiegspunkt für die Anwendung.
      ///

      [STAThread]
      static void Main()
      {
      Core.CreateWin32Window(“AGK-Title”, 640, 480, false);
      if (!Core.InitAGK())
      return;

      Agk.SetVirtualResolution(640, 480);

      uint backdrop = Agk.CreateSprite(Agk.LoadImage(“media/background5.jpg”));
      Agk.SetSpriteSize(backdrop, 100, 100);

      // create edit boxes
      Agk.CreateEditBox(1);
      Agk.SetEditBoxText(1, “normal field”);
      Agk.SetEditBoxPosition(1, 10, 90);
      Agk.SetEditBoxSize(1, 80, 16);

      uint index = Agk.CreateEditBox();
      Agk.SetEditBoxPosition(index, 10, 10);
      Agk.SetEditBoxSize(index, 50, 20);
      Agk.SetEditBoxDepth(index, 10);
      Agk.SetEditBoxBorderSize(index, 5);
      Agk.SetEditBoxBorderColor(index, 255, 128, 100, 255);
      Agk.SetEditBoxBackgroundColor(index, 192, 192, 192, 192);
      Agk.SetEditBoxText(index, “Hello world”);
      Agk.SetEditBoxTextColor(index, 0, 255, 255);
      Agk.SetEditBoxCursorColor(index, 255, 0, 0);
      Agk.SetEditBoxTextSize(index, 12);
      Agk.SetEditBoxFocus(index, 1);
      Agk.SetEditBoxActive(index, 1);
      Agk.SetEditBoxVisible(index, 1);
      Agk.SetEditBoxCursorBlinkTime(index, 2.0f);
      Agk.SetEditBoxCursorWidth(index, 2.0f);
      Agk.SetEditBoxMaxChars(index, 5000);
      Agk.SetEditBoxMaxLines(index, 4);
      Agk.SetEditBoxMultiLine(index, 1);
      Agk.SetEditBoxScissor(index, 20, 0, 100, 100);
      Agk.FixEditBoxToScreen(index, 1);

      // main loop
      while (Core.LoopAGK())
      {
      // main code
      //if (Agk.GetEditBoxExists(index) == 1)

      // get data from edit box
      for (int n = 1; n <= 13; n++) Agk.Print(""); Agk.Print("CUSTOM EDIT BOX ABOVE"); Agk.Print("GetCurrentEditBox=" + Agk.Str(Agk.GetCurrentEditBox())); Agk.Print("GetEditBoxHasFocus=" + Agk.Str(Agk.GetEditBoxHasFocus(index))); Agk.Print("GetEditBoxText=" + Agk.GetEditBoxText(index)); Agk.Print("GetEditBoxX=" + Agk.Str(Agk.GetEditBoxX(index))); Agk.Print("GetEditBoxY=" + Agk.Str(Agk.GetEditBoxY(index))); Agk.Print("GetEditBoxWidth=" + Agk.Str(Agk.GetEditBoxWidth(index))); Agk.Print("GetEditBoxHeight=" + Agk.Str(Agk.GetEditBoxHeight(index))); Agk.Print("GetEditBoxChanged=" + Agk.Str(Agk.GetEditBoxChanged(index))); Agk.Print("GetEditBoxActive=" + Agk.Str(Agk.GetEditBoxActive(index))); Agk.Print("GetEditBoxVisible=" + Agk.Str(Agk.GetEditBoxVisible(index))); Agk.Print("GetEditBoxLines=" + Agk.Str(Agk.GetEditBoxLines(index))); // update the screen Agk.Sync(); } // free usages Agk.DeleteEditBox(index); Core.CleanUp(); } } }

  • Bryan

    If AGK wants to grow, projects like this are needed. As a Unity , C# and Python developer I can see how this would significantly help make AGK more useful. I also noticed there was a python wrapper now as well. Excellent work on ever who is doing this. I personally feel like AGK wont grow until it accepts industry standard languages like C#, Java and Python. I would have never attempted anything commercial in the software without these – so I think this has opened up alot of possibilities but today was the first I had heard of it.

    Best of luck with it, I may pull it into VS tonight and tinker about with it.

Leave a Reply

Your email address will not be published. Required fields are marked *