Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 5 6 7 8 9 … 18 Next »
Can't we call Starfall code from HTML?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Can't we call Starfall code from HTML?
05-05-2018, 02:53 PM,
#1
Skeleton Offline
Cheating Donating Member ( ͡° ͜ʖ ͡°)
****
Posts: 199
Threads: 30
Joined: Nov 2014
Can't we call Starfall code from HTML?
Hello,

As the title says, can't we call Starfall code from HTML elements as we can do in standard gmod Lua?

If no, could this be added? It would be useful to make nicer UI.

Thank you.

[Image: giphy.gif]
Find
Reply
05-05-2018, 07:25 PM,
#2
Blackhawk Offline
GMod Admin
Posts: 204
Threads: 9
Joined: Sep 2013
RE: Can't we call Starfall code from HTML?
I really don't see the point in using HTML to make an UI. Making a "nice" UI with HTML takes probably far more time than just doing it in Starfall.
Also HTML isn't really made for calling lua functions, you'd either use PHP or JavaScript.
Find
Reply
06-05-2018, 11:58 AM, (This post was last modified: 06-05-2018, 11:58 AM by Skeleton. Edited 1 time in total.)
#3
Skeleton Offline
Cheating Donating Member ( ͡° ͜ʖ ͡°)
****
Posts: 199
Threads: 30
Joined: Nov 2014
RE: Can't we call Starfall code from HTML?
Hey,

Thank you for your answer but I don't think you get what I meant.

In gmod Lua we can hook events from a HTML page to some actions like running some Lua code.
Also it is already using Javascript to run Lua code, I think the best way for you to understand is to take a look at this.

I don't know what is your knowledge in HTML and CSS but we can do really advanced stuff in only few lines and in a way probably more optimized that what we can currently do.
We can also animate, transform (to fake a 3D effect for instance) and many other things.

There is a reason why CEF used in a lot of games. Even the game's menu is a web page.

[Image: giphy.gif]
Find
Reply
06-05-2018, 12:09 PM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Can't we call Starfall code from HTML?
I'm guessing you tried to use the RUNLUA hack that Garry uses a lot, which won't work. Use this instead, which does.

Also, I wouldn't trust the browser currently in the game. It's super outdated and doesn't support many of the now standard features of CSS3 and ES6. Perhaps when the CEF branch is finally brought into the standard release it may be more viable (if you enjoy the pain of web technologies), but for now I wouldn't get your hopes up.
Find
Reply
06-05-2018, 12:34 PM, (This post was last modified: 06-05-2018, 12:38 PM by Skeleton. Edited 3 times in total.)
#5
Skeleton Offline
Cheating Donating Member ( ͡° ͜ʖ ͡°)
****
Posts: 199
Threads: 30
Joined: Nov 2014
RE: Can't we call Starfall code from HTML?
Thank you. This function should do the trick.

I'll take a look at the possibilities as I try to experiment stuff with Starfall (for instance the Trivia game I did). But yeah, when the CEF is out of the dev branch that will be alot better.

As I'm thinking about making Derma stuff in Starfall I wanted to try HTML but yeah, it will probably be outdated as hell.

[Image: giphy.gif]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.