Author Topic: InForm Beta 7 is out now  (Read 606 times)

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #30 on: June 17, 2018, 11:27:18 AM »
The Multiline property has not been implemented yet (and is only for TextBox controls, not labels) and the CanResize property is for the main form only. Go with WordWrap and a big label and you'll be just fine.

Quote
Thank's for this wonderful tool
I thank you for your interest and kind words! Looking forward to ver 0.2 of your encrypt tool.

Let me know what else you need assistance with, I'll be around all day :-)

Re: InForm Beta 7 is out now
« Reply #31 on: June 17, 2018, 08:27:07 PM »
Yes Fellippe
 I'm glad to say that I post the InForm version of Encrypt/Decrypt
open to get suggestions and feedback

Re: InForm Beta 7 is out now
« Reply #32 on: June 20, 2018, 10:30:15 AM »
Hi Fellippe

just some help for me, please:

1. can I use multiple form in a program created by Inform?
  1.1 If yes there is a code sample to look at?
   1.2 If no can I hide disabled_other_items_grouped_for_window and show/hide different groups in the same form?

2.  How many items can I use in a project of Inform? (max number?)

3. Can modify aspect (size, position, backcolor etc etc) of  Window/Form at runtime?
   3.1 If yes are the effects at once or must I force by  _display?

4. If I create 3 forms with Inform, each at one time, then can I use them in the same code?
   4.1 Can I chain the 3 different forms?

For now these questions are just enough....
Thanks

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #33 on: June 20, 2018, 11:27:58 AM »
Hi TempodiBasic. For each point:

1. not yet;
    1.1 not yet;
    1.2 yes; InForm's editor uses that trick. When you click File->Open or Edit->Z-ordering, the new "dialog" is achieved by showing a frame that covers all the screen. That frame is hidden at -600, -600 during program execution and is only shown when requested. You can inspect UiEditor.bas to see how I did it. Look for "OpenFrame" and "ZOrdering" in the code.

2. I haven't tried pushing it to a limit yet. There are no constraints in code and you can probably have as many items as your system's memory allows. If you do hit a limit, please let me know.

3. Yes.
    3.1 No. You should never call _DISPLAY as InForm is already doing that at a regular interval. If some change doesn't show immediately, you must request a full redraw by setting __UI_ForceRedraw = True (global redraw) or by setting Control(ControlID).Redraw = True (per control) when needed.

4. Not yet, but that's planned (issue #20 at https://github.com/FellippeHeitor/InForm/milestone/3)
    4.1 not yet (see above).
« Last Edit: June 20, 2018, 04:04:24 PM by FellippeHeitor »

Re: InForm Beta 7 is out now
« Reply #34 on: June 21, 2018, 02:27:28 PM »
Hi Fellippe

Thanks for further specific information about Inform 7 Beta

I find very good (and master's tricky ;-) )  to take off screen items not used at the place of disable it , hide it , activate it,  show it every time you must use!

About point 2 I have had an idea_program that will do a good test about amout of Item_Ram used!

See again

Offline Unseen Machine

  • QB64 Elite
Re: InForm Beta 7 is out now
« Reply #35 on: June 21, 2018, 10:09:25 PM »
does it support GL windows yet?

Unseen

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #36 on: June 21, 2018, 11:36:48 PM »
It will when qb64 does, so not yet.

Offline Unseen Machine

  • QB64 Elite
Re: InForm Beta 7 is out now
« Reply #37 on: June 22, 2018, 08:03:49 PM »
But i hacked one of your old versions of Inform to support GL windows remember!?

Unseen

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #38 on: June 22, 2018, 08:41:12 PM »
Ah, you mean being able to use use SUB _GL de with InForm dialogs. Yeah, but it ended up interfering with some other routines I had to add, so I dropped it for the time being.

I thought you were talking about using multiple opengl windows, like multiple SCREENs.

Offline Unseen Machine

  • QB64 Elite
Re: InForm Beta 7 is out now
« Reply #39 on: June 23, 2018, 07:05:59 PM »
Lol, glad i cleared that up! And Qb64 does actually support multiple open gl windows if you use my SFML library, i made that allow you to use upto 5 screens!

Still, good work on the project mate! kudos!

Unseen

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #40 on: June 23, 2018, 07:21:29 PM »
Where’s that SFML library again, btw?

Offline Unseen Machine

  • QB64 Elite
Re: InForm Beta 7 is out now
« Reply #41 on: June 23, 2018, 07:35:33 PM »
Qb64.net! Which is down!

C++ Code, i cant find the DECLARE LIBRARY bit yet!!!

This is for SFML 1.6

Code: [Select]
//SFML Wrapper for QB64 v.02 - By John Onyon a.k.a Unseen Machine
 
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
 
sf::RenderWindow App;
sf::Color BackgroundColor = sf::Color(0,0,0,255);
sf::Color PaintColor = sf::Color(255,255,255,255);
sf::SoundBufferRecorder Recorder;
sf::SoundBuffer SndBuffer;
sf::Sound Snd;
sf::Font MyFont;
sf::String Txt;
sf::Shape Pixel;
 
// SCREEN
 
void SF_Screen_New(int width, int height, const char* title)
{
    App.Create(sf::VideoMode(width, height, 32), title);
    App.PreserveOpenGLStates(true);
}
 
void SF_Screen_Set_XY(int x, int y)
{
    App.SetPosition(x,y);
}
 
 
int SF_Screen_Exit()
{
    sf::Event Event;
    while (App.GetEvent(Event))
    {
        if (Event.Type == sf::Event::Closed)
        return(-1);
    }
}
 
void SF_Screen_Set_Size(int32 Width, int32 Height)
{
    App.SetSize(Width,Height);
}
 
 
void SF_Screen_Hide()
{
    App.Show(0);
}
 
 
void SF_Screen_Show()
{
    App.Show(-1);
}
 
 
void SF_Screen_Set_Active()
{
    App.SetActive();
}
 
 
void SF_Screen_CLS()
{
    App.Clear(BackgroundColor);
}
 
 
void SF_Screen_Set_MAXFPS(int32 fps)
{
    App.SetFramerateLimit(fps);
}
 
 
void SF_Screen_Close()
{
    App.Close();
}
 
 
void SF_Screen_Set_Width(int Width)
{
    int x = App.GetHeight();
    App.SetSize(Width,x);   
}
 
 
int SF_Screen_Get_Width()
{
    return(App.GetWidth());
}
 
 
void SF_Screen_Set_Height(int Height)
{
    int x = App.GetWidth();
    App.SetSize(x,Height); 
}
 
 
int SF_Screen_Get_Height()
{
    return(App.GetHeight());
}
 
 
void SF_Screen_Display()
{
    App.Display();
}
 
 
void SF_Screen_Set_Color(int r, int g, int b, int a)
{
    sf::Color col = sf::Color(r,g,b,a);
    BackgroundColor = col;
}
 
 
// MOUSE
 
unsigned int SF_Mouse_Get_X()
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetMouseX());
}
 
unsigned int SF_Mouse_Get_Y()
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetMouseY());
}
 
unsigned int SF_Mouse_Get_LB()
{
    const sf::Input& Input = App.GetInput();
    return(-Input.IsMouseButtonDown(sf::Mouse::Left));
}
 
unsigned int SF_Mouse_Get_RB()
{
    const sf::Input& Input = App.GetInput();
    return(-Input.IsMouseButtonDown(sf::Mouse::Right));
}
 
void SF_Mouse_Set_XY(int x, int y)
{
    App.SetCursorPosition(x,y);
}
 
void SF_Mouse_Hide()
{
    App.ShowMouseCursor(0);
}
 
 
void SF_Mouse_Show()
{
    App.ShowMouseCursor(1);
}
 
 
//Font and Text
 
void SF_Font_Load(const char* Filename, int res)
{
    MyFont.LoadFromFile(Filename, res); 
}
 
void SF_Text_Print (int x, int y, const char* Text, int size)
{
    Txt.SetText(Text);
    Txt.SetFont(MyFont);
    Txt.SetSize(size);
    Txt.SetX(x);
    Txt.SetY(y);
    App.Draw(Txt);
}
 
void SF_Text_Set_Color (int r, int g, int b, int a)
{
    sf::Color col = sf::Color(r,g,b,a);
    Txt.SetColor(col);
}
 
void SF_Text_Set_Rotation(float Rot)
{
    Txt.SetRotation(Rot);   
}
 
void SF_Text_Set_Center(float x, float y)
{
    Txt.SetCenter(x,y);
}
 
//Sound
 
void SF_Mic_Get_Input(int SampleRate)
{
    Recorder.Start(SampleRate);   
}
 
void SF_Mic_Stop_Input()
{
    Recorder.Stop();
}
 
void SF_Mic_Play()
{
    const sf::SoundBuffer& Buffer = Recorder.GetBuffer();
    sf::Sound Sound(Buffer);
    Sound.Play();
    while (Sound.GetStatus() == sf::Sound::Playing){}
}
 
void SF_Mic_Save(const char* FileName)
{
    const sf::SoundBuffer& Buffer = Recorder.GetBuffer();
    sf::Sound Sound(Buffer);
    Buffer.SaveToFile(FileName);
}
 
int SF_Sound_Buffer_Load_FromFile(const char* FileName1)
{
    if (SndBuffer.LoadFromFile(FileName1))
            return(-1);
}
 
 
void SF_Sound_Buffer_Play()
{
    Snd.SetBuffer(SndBuffer);
    Snd.Play();
}
 
 
int SF_Sound_Buffer_Get_SampleCount()
{
    return(SndBuffer.GetSamplesCount());
}
 
 
int SF_Sound_Buffer_Get_SampleRate()
{
    return(SndBuffer.GetSampleRate());
}
 
bool SF_Sound_Buffer_Save(const char* FileName)
{
    return(SndBuffer.SaveToFile(FileName));
}
 
void SF_Sound_Buffer_Load_SNDRAW(const sf::Int16* RawSnd)
{
    RawSnd = SndBuffer.GetSamples();
}
 
// 2d drawing functions
void SF_Paint_Set_Color(int r, int g, int b, int a)
{
    PaintColor = sf::Color(r, g, b, a);
}
 
void SF_Pixel_Set(int x, int y)
{
    Pixel = sf::Shape::Rectangle(x, y, x+1, y+1, PaintColor);
    App.Draw(Pixel);
}
 
void SF_Circle(int x, int y, int Radius)
{
    Pixel = sf::Shape::Circle(x, y, Radius, PaintColor);
    Pixel.EnableFill(true);
    App.Draw(Pixel);
}
 
void SF_Circle_NoFill(int x, int y, int Radius)
{
    Pixel = sf::Shape::Circle(x, y, Radius, PaintColor, 1, PaintColor);
    Pixel.EnableFill(false);
    Pixel.EnableOutline(true);
    App.Draw(Pixel);
}
 
void SF_Rectangle(int x, int y, int width, int height)
{
    Pixel = sf::Shape::Rectangle(x, y, x + width, y + height, PaintColor);
    Pixel.EnableFill(true);
    App.Draw(Pixel);
}
 
void SF_Rectangle_NoFill(int x, int y, int width, int height)
{
    Pixel = sf::Shape::Rectangle(x, y, x + width, y + height, PaintColor, 1, PaintColor);
    Pixel.EnableFill(false);
    Pixel.EnableOutline(true);
    App.Draw(Pixel);
}
 
void SF_Line(int x, int y, int xx, int yy, int thick)
{
    Pixel = sf::Shape::Line(x, y, xx, yy, thick, PaintColor);
    Pixel.EnableFill(true);
    App.Draw(Pixel);
}
 
//GamePad input
 
bool SF_GamePad_Button_Get_State(int GamePad, int Button)
{
    const sf::Input& Input = App.GetInput();
    return(Input.IsJoystickButtonDown(GamePad, Button));
}
 
int SF_GamePad_Axis_Get_X (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisX));
}
 
int SF_GamePad_Axis_Get_Y (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisY));
}
 
int SF_GamePad_Axis_Get_Z (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisZ));
}
 
int SF_GamePad_Axis_Get_R (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisR));
}
 
int SF_GamePad_Axis_Get_U (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisU));
}
 
int SF_GamePad_Axis_Get_V (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisV));
}
 
int SF_GamePad_Axis_Get_POV (int GamePad)
{
    const sf::Input& Input = App.GetInput();
    return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisPOV));
}
 
 
// Keyboard Input v.01
 
int SF_Key_Left()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::Left))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
int SF_Key_Right()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::Right))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
int SF_Key_Up()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::Up))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
int SF_Key_Down()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::Down))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
int SF_Key_A()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::A))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
int SF_Key_B()
{
    int kval =0;
    const sf::Input& Input = App.GetInput();
    if (Input.IsKeyDown(sf::Key::B))
        kval = -1;
    else
        kval = 0;
    return(kval);
}
 
// Other Stuff
 
void SF_Push_Events()
{
    sf::Event Event;
    while (App.GetEvent(Event))
    {   }
}

Ill dig about my dropbox and see if i can put together a proper package for you.

Unseen

Re: InForm Beta 7 is out now
« Reply #42 on: June 23, 2018, 08:45:26 PM »
Hi Fellippe

I'm posting my Recipe program v0.1

So I have coded to Multiuse the same form in different aspect to emulate different forms...
and So I have discovered that InputBox/TextBox have no WordWrap properties so I can write one single long text in one raw, no in multiline!
Next step is to translate  TextBox into Label that let me use wordwrap and can show recipes in more lines.

See later Fellippe

Offline Unseen Machine

  • QB64 Elite
Re: InForm Beta 7 is out now
« Reply #43 on: June 23, 2018, 09:13:46 PM »
Here you go, files attached.

Code: [Select]
DECLARE LIBRARY "SFML\libsfml-graphics", "SFML\libsfml-window", "SFML\libsfml-system", "UnseenGDK_GL", "sfml\libopengl32", "sfml\libglu32", "sfml\libsfml-audio"

    '    // SCREEN FUNCTIONS
    FUNCTION GDK_GL_SCREEN% (BYVAL width&, BYVAL height&, title$, BYVAL ref&)
    FUNCTION GDK_GL_SCREEN_WIDTH& (BYVAL ref&)
    FUNCTION GDK_GL_SCREEN_HEIGHT& (BYVAL ref&)
    FUNCTION GDK_GL_SCREEN_FRAMETIME! (BYVAL ref&)
    FUNCTION GDK_GL_SCREEN_EXIT (BYVAL Ref&)

    '// SCREEN SUBS
    SUB GDK_GL_SCREEN_CLOSE (BYVAL ref&)
    SUB GDK_GL_SCREEN_SET_DEST (BYVAL ref&)
    SUB GDK_GL_SCREEN_SET_XY (BYVAL X&, BYVAL Y&, BYVAL REF&)
    SUB GDK_GL_SCREEN_SHOW (BYVAL ref&)
    SUB GDK_GL_SCREEN_HIDE (BYVAL ref&)
    SUB GDK_GL_SCREEN_SET_FPS (BYVAL FPS&, BYVAL ref&)
    SUB GDK_GL_SCREEN_DISPLAY (BYVAL ref&)


    '// Keyboard input
    FUNCTION GDK_GL_KEY_Left (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Right (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Up (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Down (BYVAL REF&)
    FUNCTION GDK_GL_KEY_A (BYVAL REF&)
    FUNCTION GDK_GL_KEY_B (BYVAL REF&)
    FUNCTION GDK_GL_KEY_C (BYVAL REF&)
    FUNCTION GDK_GL_KEY_D (BYVAL REF&)
    FUNCTION GDK_GL_KEY_E (BYVAL REF&)
    FUNCTION GDK_GL_KEY_F (BYVAL REF&)
    FUNCTION GDK_GL_KEY_G (BYVAL REF&)
    FUNCTION GDK_GL_KEY_H (BYVAL REF&)
    FUNCTION GDK_GL_KEY_I (BYVAL REF&)
    FUNCTION GDK_GL_KEY_J (BYVAL REF&)
    FUNCTION GDK_GL_KEY_K (BYVAL REF&)
    FUNCTION GDK_GL_KEY_L (BYVAL REF&)
    FUNCTION GDK_GL_KEY_M (BYVAL REF&)
    FUNCTION GDK_GL_KEY_N (BYVAL REF&)
    FUNCTION GDK_GL_KEY_O (BYVAL REF&)
    FUNCTION GDK_GL_KEY_P (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Q (BYVAL REF&)
    FUNCTION GDK_GL_KEY_R (BYVAL REF&)
    FUNCTION GDK_GL_KEY_S (BYVAL REF&)
    FUNCTION GDK_GL_KEY_T (BYVAL REF&)
    FUNCTION GDK_GL_KEY_U (BYVAL REF&)
    FUNCTION GDK_GL_KEY_V (BYVAL REF&)
    FUNCTION GDK_GL_KEY_W (BYVAL REF&)
    FUNCTION GDK_GL_KEY_X (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Y (BYVAL REF&)
    FUNCTION GDK_GL_KEY_Z (BYVAL REF&)

    '// Mouse Input
    FUNCTION GDK_GL_MOUSE_X (BYVAL Ref&)
    FUNCTION GDK_GL_MOUSE_Y (BYVAL Ref&)
    FUNCTION GDK_GL_MOUSE_LB (BYVAL Ref&)
    FUNCTION GDK_GL_MOUSE_RB (BYVAL Ref&)
    SUB GDK_GL_MOUSE_MOVE (BYVAL X&, BYVAL Y&, BYVAL Ref&)
    SUB GDK_GL_MOUSE_HIDE (BYVAL Ref&)
    SUB GDK_GL_MOUSE_SHOW (BYVAL Ref&)

    '>> GAMEPAD Input
    FUNCTION GDK_GL_GAMEPAD_BUTTON (BYVAL GAMEPAD&, BYVAL Button&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_X (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_Y (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_Z (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_R (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_U (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_V (BYVAL GAMEPAD&, BYVAL ref&)
    FUNCTION GDK_GL_GAMEPAD_POV (BYVAL GAMEPAD&, BYVAL ref&)

    '// SHAPES LIBRARY
    SUB GDK_GL_SPHERE (BYVAL Radius#, BYVAL Slices&, BYVAL Stacks&, BYVAL Texture&)



END DECLARE

Unseen

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: InForm Beta 7 is out now
« Reply #44 on: June 23, 2018, 09:48:28 PM »
Thanks a lot! I'll be studying it soon!