Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Finney

Lets talk GTA.Forms

Recommended Posts

Finney

Hey guys. I'm interested in adding buttons, textboxs - and all the standard forms. I've noticed that GTA also hosts its own forms (aside from Windows.Forms)...

 

I was wondering if anyone had a good read on GTA.Forms and proper use - or if someone would mind giving me a simple example? C# of course.

 

I've toyed around with trying to set up a simple GTA.Forms.Textbox, and buttons, and other thigns - with bad results (... well ... no results).

 

I've tried making them into several methods, trying different things - and I've tried to locate material... I only found one VB written example that was kinda written wrong, so I didn't really want to try to toy with that.

 

I'm running a bit short on time, and most likely won't see this till tomorrow, but just something to get me setup and on screen, a example method or something of that nature would be really all I need to get the ball rolling - even if its very basic... I'm literally just failing to setup right. :D

 

Thanks in advance guys for taking the time.

 

Later!

Share this post


Link to post
Share on other sites
uNi

What are you talking about exactly?

Share this post


Link to post
Share on other sites
Jitnaught

GTA does not host it's own version of Windows.Forms, it's .NET Scripthook that implements this.

I myself have never delved into GTA.Forms, but my guess into using it is

 

GTA.Forms.Button button = new GTA.Forms.Button();button.Text = "Click me";button.Location = new System.Drawing.Point(Game.Resolution.Width / 2 - button.Size.Width / 2, Game.Resolution.Height / 2 - button.Size.Height / 2); //center of screenbutton.Click += button_Click; //create function for thisbutton.Visible = true;
This is 100% untested as I am busy at the moment, but when I get time I'll research it (if it isn't confirmed that it works/is confirmed that it doesn't work).

 

What are you talking about exactly?

He put this in the wrong section. Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
Finney

GTA does not host it's own version of Windows.Forms, it's .NET Scripthook that implements this.

I myself have never delved into GTA.Forms, but my guess into using it is

GTA.Forms.Button button = new GTA.Forms.Button();button.Text = "Click me";button.Location = new System.Drawing.Point(Game.Resolution.Width / 2 - button.Size.Width / 2, Game.Resolution.Height / 2 - button.Size.Height / 2); //center of screenbutton.Click += button_Click; //create function for thisbutton.Visible = true;
This is 100% untested as I am busy at the moment, but when I get time I'll research it (if it isn't confirmed that it works/is confirmed that it doesn't work).

 

What are you talking about exactly?

He put this in the wrong section.

 

... Are you serious? LMFAO I DID IT AGAIN!? Damnit man I'm making ass of myself...

 

Ok I was wondering. I had to make sure I declared it a GTA.Forms.Button when using it, rather then a System.Windows.Forms. I'm pretty comfortable with Windows.Forms, but I was just having ZERO luck getting a display in game using the GTA.Forms. I'm out of time, but I just couldn't resist checking back... damnit.. now... if I could just... post in the right ... section.

 

 

:|

 

PS to the admin, I am so damn sorry. I'm clearly over looking a topics section when I make my posts...

Edited by Finney

Share this post


Link to post
Share on other sites
Finney

I came across this useful form helper created by CoMPMStR, would help with positioning items visually in form.

 

http://gtaforums.com/topic/392325-beta-gtaiv-net-scripthook/page-51?do=findComment&comment=1059476991

 

 

GTA.Form Menu Teleporter - http://pastebin.com/DZLLVdKm

 

This is good - this is kind of what I was after also, just a coded example of how to get the Forms up and running.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.