Return to “Scripting & Modding”

Post

PlayerBar.lts

#1
Hi All,

Just looking at the Aug/Sep dev video and Josh is showing how to edit the UI via LTSL.

At 21 mins, 3 seconds; I paused the video to understand the code better (Josh is showing how to change the colour of the top middle icons from Blue (Primary) to Orange (Secondary).

Underneath that, is the size of those icons {var size 36.0}, and underneath that again, he has commented out additional "items of interest", which show what else he will be implementing in this area of the UI:
  • # Assets - mentioned in the code below, but not active
    # Account - mentioned in the code below, but not active
    # Log
    # Missions
    # Relations
    # Projects
I was always wondering why Josh didn't click on all of the icons on this bar, and we can see why:

Code: Select all

children +=
  Components:FocusGlow
    Components:Tooltip
      "Player Information"
      Components:Clickable
        MessageInfo
        Widgets:WidgetIcon Icon:Person size color

children +=
  Components:FocusGlow
    Components:Tooltip
      "Assets"
      Widgets:WidgetIcon Icon:Assets size color

children +=
  Components:FocusGlow
    Components:Tooltip
      "Account"
        Widgets:WidgetIcon Icon:Credits size color

children +=
  Components:FocusGlow
    Components:Tooltip



I suppose the intention of this topic is to help understand how LTSL modifies this specific area of the HUD - either as a resource, or for other people to take an interest in/provide possible code samples.

HTH,

FM

EDIT: Changed "thread" to be "topic"
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-
Post

Re: PlayerBar.lts

#4
Now, one of the only questions left is, are these files monitored in real-time, does it need a click of a button to re-read the file, or is it just stored in memory between launches? :think:

The modding wheels are turning...
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
Post

Re: PlayerBar.lts

#5
DWMagus wrote:are these files monitored in real-time, :think:
My reckoning is that LT (in its current incarnation) has a polling script that checks for date/file stamps every X seconds.
We see this when Josh saves the file he is working on and Voila, the change appears.

The question then to ask is whether it is better to have a single file with lots of changes, or multiple small files.. :think:
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-

Online Now

Users browsing this forum: No registered users and 6 guests

cron