Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Customising the look of FuseGL

  1. #21
    Variable Bitrate Grrrmachine's Avatar
    Join Date
    Sep 2005
    Location
    Warsaw, Poland
    Posts
    346
    These are the things I need some clarification on for FuseGL:

    Removing the title bar
    Changing Font
    Changing Font colour

    I'm not sure which file would set these (UserGUI or UpdateLabelText) and to be honest, which language I should be trying to learn. Every tutorial I find on C#looks nothing like what's in the UserGUI file, and everything on XML just points to using .ttf fonts which apparently FuseGL can't use.

    I'm only at the "Hello World!" stage of C#, so it'll take me a while to figure all this out for myself.

  2. #22
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,045
    Quote Originally Posted by Grrrmachine View Post
    These are the things I need some clarification on for FuseGL:

    Removing the title bar
    Changing Font
    Changing Font colour

    I'm not sure which file would set these (UserGUI or UpdateLabelText) and to be honest, which language I should be trying to learn. Every tutorial I find on C#looks nothing like what's in the UserGUI file, and everything on XML just points to using .ttf fonts which apparently FuseGL can't use.

    I'm only at the "Hello World!" stage of C#, so it'll take me a while to figure all this out for myself.
    C# is the language to learn. XML is not really a language even though they say it is, it is more of a structure. The cs files are C# files and are anything. The XML files are just settings and mean nothing without C# behind it.

    Here is how you can remove the title bar:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FuseGL_User_Settings>
      <FuseGL_GUI_Settings>
        <TitleBar>
          <setting type="bool" titlebar_always_hidden="true" />
        </TitleBar>
      </FuseGL_GUI_Settings>
    </FuseGL_User_Settings>
    That is just showing you where in the XML to code it, but the main thing is the line:

    Code:
          <setting type="bool" titlebar_always_hidden="true" />
    Last edited by 2k1Toaster; 03-24-2013 at 12:12 AM.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #23
    Variable Bitrate Grrrmachine's Avatar
    Join Date
    Sep 2005
    Location
    Warsaw, Poland
    Posts
    346
    Yep, that worked great, thanks Nick. That allows FuseGL to be cleanly embedded within RideRunner.

    I do understand that XML is just a way to store info rather than display it. But, as with the Title Bar, I'm not sure which settings control the font, or which file they should go in.

  4. #24
    Variable Bitrate Grrrmachine's Avatar
    Join Date
    Sep 2005
    Location
    Warsaw, Poland
    Posts
    346
    Right, after a month of on-off struggling with this, I've thrown in the towel. I just can't work out how you're supposed to declare the new font, especially in a global way that affects all the labels I'm running. So I'll leave these here and let others play around with them to see if they can find a solution.

    This is the font .png (right-click to see image)

    Name:  HandelGotD.png
Views: 128
Size:  7.2 KB

    and the XML for the font:

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <font fontImage="HandelGotD.png">
      <char location_topleft="0,0" location_bottomright="10,15" value="97" offsets="0,0,0,0"></char>
      <char location_topleft="16,0" location_bottomright="25,15" value="98" offsets="0,0,0,0"></char>
      <char location_topleft="30,0" location_bottomright="38,15" value="99" offsets="0,0,0,0"></char>
      <char location_topleft="43,0" location_bottomright="52,15" value="100" offsets="0,0,0,0"></char>
      <char location_topleft="58,0" location_bottomright="66,15" value="101" offsets="0,0,0,0"></char>
      <char location_topleft="71,0" location_bottomright="78,15" value="102" offsets="0,0,0,0"></char>
      <char location_topleft="83,0" location_bottomright="92,15" value="103" offsets="0,0,0,0"></char>
      <char location_topleft="98,0" location_bottomright="107,15" value="104" offsets="0,0,0,0"></char>
      <char location_topleft="113,0" location_bottomright="116,15" value="105" offsets="0,0,0,0"></char>
      <char location_topleft="120,0" location_bottomright="126,15" value="106" offsets="0,0,0,0"></char>
      <char location_topleft="132,0" location_bottomright="141,15" value="107" offsets="0,0,0,0"></char>
      <char location_topleft="146,0" location_bottomright="149,15" value="108" offsets="0,0,0,0"></char>
      <char location_topleft="155,0" location_bottomright="168,15" value="109" offsets="0,0,0,0"></char>
      <char location_topleft="174,0" location_bottomright="183,15" value="110" offsets="0,0,0,0"></char>
      <char location_topleft="188,0" location_bottomright="198,15" value="111" offsets="0,0,0,0"></char>
      <char location_topleft="204,0" location_bottomright="213,15" value="112" offsets="0,0,0,0"></char>
      <char location_topleft="218,0" location_bottomright="227,15" value="113" offsets="0,0,0,0"></char>
      <char location_topleft="233,0" location_bottomright="240,15" value="114" offsets="0,0,0,0"></char>
      <char location_topleft="245,0" location_bottomright="254,15" value="115" offsets="0,0,0,0"></char>
      <char location_topleft="259,0" location_bottomright="266,15" value="116" offsets="0,0,0,0"></char>
      <char location_topleft="271,0" location_bottomright="280,15" value="117" offsets="0,0,0,0"></char>
      <char location_topleft="285,0" location_bottomright="295,15" value="118" offsets="0,0,0,0"></char>
      <char location_topleft="300,0" location_bottomright="313,15" value="119" offsets="0,0,0,0"></char>
      <char location_topleft="318,0" location_bottomright="328,15" value="120" offsets="0,0,0,0"></char>
      <char location_topleft="333,0" location_bottomright="342,15" value="121" offsets="0,0,0,0"></char>
      <char location_topleft="347,0" location_bottomright="356,15" value="122" offsets="0,0,0,0"></char>
      <char location_topleft="1,15" location_bottomright="14,30" value="65" offsets="0,0,0,0"></char>
      <char location_topleft="19,15" location_bottomright="30,30" value="66" offsets="0,0,0,0"></char>
      <char location_topleft="35,15" location_bottomright="46,30" value="67" offsets="0,0,0,0"></char>
      <char location_topleft="51,15" location_bottomright="63,30" value="68" offsets="0,0,0,0"></char>
      <char location_topleft="68,15" location_bottomright="79,30" value="69" offsets="0,0,0,0"></char>
      <char location_topleft="84,15" location_bottomright="94,30" value="70" offsets="0,0,0,0"></char>
      <char location_topleft="99,15" location_bottomright="111,30" value="71" offsets="0,0,0,0"></char>
      <char location_topleft="116,15" location_bottomright="128,30" value="72" offsets="0,0,0,0"></char>
      <char location_topleft="134,15" location_bottomright="137,30" value="73" offsets="0,0,0,0"></char>
      <char location_topleft="142,15" location_bottomright="151,30" value="74" offsets="0,0,0,0"></char>
      <char location_topleft="157,15" location_bottomright="168,30" value="75" offsets="0,0,0,0"></char>
      <char location_topleft="173,15" location_bottomright="182,30" value="76" offsets="0,0,0,0"></char>
      <char location_topleft="187,15" location_bottomright="202,30" value="77" offsets="0,0,0,0"></char>
      <char location_topleft="208,15" location_bottomright="219,30" value="78" offsets="0,0,0,0"></char>
      <char location_topleft="225,15" location_bottomright="238,30" value="79" offsets="0,0,0,0"></char>
      <char location_topleft="243,15" location_bottomright="254,30" value="80" offsets="0,0,0,0"></char>
      <char location_topleft="259,15" location_bottomright="272,30" value="81" offsets="0,0,0,0"></char>
      <char location_topleft="277,15" location_bottomright="288,30" value="82" offsets="0,0,0,0"></char>
      <char location_topleft="293,15" location_bottomright="304,30" value="83" offsets="0,0,0,0"></char>
      <char location_topleft="309,15" location_bottomright="320,30" value="84" offsets="0,0,0,0"></char>
      <char location_topleft="325,15" location_bottomright="336,30" value="85" offsets="0,0,0,0"></char>
      <char location_topleft="337,15" location_bottomright="350,30" value="86" offsets="0,0,0,0"></char>
      <char location_topleft="1,30" location_bottomright="17,45" value="87" offsets="0,0,0,0"></char>
      <char location_topleft="22,30" location_bottomright="34,45" value="88" offsets="0,0,0,0"></char>
      <char location_topleft="39,30" location_bottomright="51,45" value="89" offsets="0,0,0,0"></char>
      <char location_topleft="55,30" location_bottomright="67,45" value="90" offsets="0,0,0,0"></char>
      <char location_topleft="72,30" location_bottomright="84,45" value="48" offsets="0,0,0,0"></char>
      <char location_topleft="90,30" location_bottomright="93,45" value="49" offsets="0,0,0,0"></char>
      <char location_topleft="98,30" location_bottomright="109,45" value="50" offsets="0,0,0,0"></char>
      <char location_topleft="114,30" location_bottomright="125,45" value="51" offsets="0,0,0,0"></char>
      <char location_topleft="130,30" location_bottomright="142,45" value="52" offsets="0,0,0,0"></char>
      <char location_topleft="148,30" location_bottomright="159,45" value="53" offsets="0,0,0,0"></char>
      <char location_topleft="164,30" location_bottomright="176,45" value="54" offsets="0,0,0,0"></char>
      <char location_topleft="180,30" location_bottomright="192,45" value="55" offsets="0,0,0,0"></char>
      <char location_topleft="197,30" location_bottomright="209,45" value="56" offsets="0,0,0,0"></char>
      <char location_topleft="214,30" location_bottomright="226,45" value="57" offsets="0,0,0,0"></char>
      <char location_topleft="231,30" location_bottomright="241,45" value="43" offsets="0,0,0,0"></char>
      <char location_topleft="245,30" location_bottomright="252,45" value="45" offsets="0,0,0,0"></char>
      <char location_topleft="256,30" location_bottomright="265,45" value="62" offsets="0,0,0,0"></char>
      <char location_topleft="270,30" location_bottomright="279,45" value="60" offsets="0,0,0,0"></char>
      <char location_topleft="284,30" location_bottomright="287,45" value="46" offsets="0,0,0,0"></char>
      <char location_topleft="293,30" location_bottomright="296,45" value="58" offsets="0,0,0,0"></char>
      <char location_topleft="301,30" location_bottomright="304,45" value="39" offsets="0,0,0,0"></char>
      <char location_topleft="310,30" location_bottomright="316,45" value="34" offsets="0,0,0,0"></char>
      <char location_topleft="322,30" location_bottomright="325,45" value="44" offsets="0,0,0,0"></char>
      <char location_topleft="330,30" location_bottomright="334,45" value="59" offsets="0,0,0,0"></char>
      <char location_topleft="338,30" location_bottomright="348,45" value="61" offsets="0,0,0,0"></char>
    </font>

  5. #25
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,045
    Grab the update to 505, and then put the "font" tag into whatever "text" node you want, and it will work.

    Code:
    <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - LBL - Sensor - Temperature in Celcius[0,1] - OUTSIDE TEMPERATURE" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <text font="HandelGotD" text="(action){FuseGL.ExecuteCode(UpdateLabelText.cs;FuseGL_TextManipulation.InternalFlyCompile_UpdateLabelText;ChangeButtonTextOnVariablePersistant;{$[*].autoVariable___[Sensor - Temperature in Celcius[0,1] - OUTSIDE TEMPERATURE]};{this};0.000;C;)}" />
        <size width="210" height="30" />
        <location x="30" y="60" alignment="left" z="0.0" />
        <setting type="int" border_size="1" />
        <setting type="bool" mouse_cursor_to_hand_on_hover="false" />
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="Sensors.cs;FuseGL_Sensors.Sensors;Initialize___TempSensor___Celcius;{FB.AnalogueInput(0.1)};{$[*].autoVariable___[Sensor - Temperature in Celcius[0,1] - OUTSIDE TEMPERATURE]};" outputTo="this.text.text" />
        </events>
      </User_Object>
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  6. #26
    Variable Bitrate Grrrmachine's Avatar
    Join Date
    Sep 2005
    Location
    Warsaw, Poland
    Posts
    346
    Phenomenal! I was just expecting a snippet of code, not an entire FuseGL update. You're a star!

  7. #27
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,045
    Quote Originally Posted by Grrrmachine View Post
    Phenomenal! I was just expecting a snippet of code, not an entire FuseGL update. You're a star!
    Glad to help. You just had a few syntax errors in the font file. It took a couple minutes to chop it in and so this makes it easier. Hope you like it.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  8. #28
    Variable Bitrate Grrrmachine's Avatar
    Join Date
    Sep 2005
    Location
    Warsaw, Poland
    Posts
    346
    Surprisingly, the XML was generated by the old Fusion MDX - HandelD was an old font I used on a previous project back in the days of v3 brains.

    I'm presuming HandelD is now built in to FuseGL since I don't need the xml or png files in my FuseGL folder for the font to load. If that's the case, does it mean every time I need a new font I'll have to ask you to code it into FuseGL?

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Communicating with FB6 without FuseGL?
    By Grrrmachine in forum Fusion Brain
    Replies: 5
    Last Post: 10-21-2012, 11:19 AM
  2. Variables for FuseGL FB6
    By venfayon in forum FB Software
    Replies: 4
    Last Post: 10-08-2012, 06:11 PM
  3. FuseGL Manual - Work in Progress
    By Grrrmachine in forum FB Documentation and Tutorials
    Replies: 2
    Last Post: 06-12-2012, 03:06 PM
  4. Customising OBD window in CF 3
    By Chester in forum Centrafuse
    Replies: 0
    Last Post: 12-09-2009, 09:30 PM
  5. Customising Destinator Color Scheme
    By Ali_2k in forum GPS
    Replies: 0
    Last Post: 08-08-2008, 05:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •