[REL] Show Secondary Colour v1.0 [62168]

Discussion in 'Released Mods' started by burntcustard, March 3, 2014.

  1. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    [​IMG]
    This mod adds a border around the primary colour choosing box, showing the secondary colour. There's no way to change the secondary colour right now, other than rejoining a lobby, which sucks, but at least this way you know what it's going to be before the game starts.

    Available on PAMM!

    Show Secondary Colours works well with DeathByDenim's Favourite Colour mod!
    Last edited: March 7, 2014
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,323
    No longer works in 62318 (but doesn't break anything).
    Need to change the first line from

    $('.slot-color').each( function() {

    to

    $('.slot-color-primary').each( function() {
    Quitch likes this.
  3. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Yep I just saw that. Slow down Raevn I just got up ;P On a more positive note, THEY ADDED BACK CHANGING SECONDARY COLOUR WOOOOO.
    mishtakashi, moldez and cwarner7264 like this.
  4. cwarner7264

    cwarner7264 Moderator Alumni

    Messages:
    4,460
    Likes Received:
    5,390
    It's 2 o'clock in the afternoon. Bloody students :p
    mishtakashi likes this.
  5. pownie

    pownie Active Member

    Messages:
    80
    Likes Received:
    131
    15:10 for the part of the populous known to be overly punctual. :D
  6. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    :D

    Updated on PAMM, and there's a news article because everyone could do with these 6 lines of code this patch.
    mishtakashi and Quitch like this.
  7. Khtugg

    Khtugg New Member

    Messages:
    15
    Likes Received:
    4
    I'm having trouble changing my colour scheme, which is a real bummer let me tell you that! Using PAMM I've installed Secondary Colours and Favourite Colours and a favourite colour option appaers in settings, but I cannot choose the red primary and white secondary combo. It will select red as primary but will randomise between the "old" colours associated with red some builds back...

    Is it possible to make any colour combo? And if so how?
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Working on it! ;)
    I plan to make my mod require this mod, so I can reintroduce the favourite secondary colour again.

    You can't just pick any combo though. The primary colour you pick determines your option for the secondary colour. Usually you only have two options with the exception of white and black, which have five secondary colours if I remember correctly.
  9. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Big quote because I'm lazy. You can't make "any colour combo". I would love Uber to give us some more options, and/or let any primary go with any secondary. That being said, it might be hackable client side, but I have no idea how and it's probably not worth it.

    Uber added a shadow in Gamma v.62443 to more UI items, so the mod looks a little cooler now:
    [​IMG]

    Would people be interested in options for this? Like a setting to make it "themed" like the old strip that used to be in the colour box? Should be easy for me to test out some other implementations, even if Uber are going to "fix" it soon.

    Yes it's 3:15am.
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    I'm afraid not. Well, not in the sense that other players would be able to see your colour scheme. The only way to set the secondary colour is by sending a message "next_secondary_color" to the server, which in return will give you the next secondary colour (surprisingly ;)). Theoretically, it should be possible to change the colours locally so you would map, say, orange to cyan, but only you would see it. All of the other players would still see orange. Also, I don't know how to do even that. :)
  11. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    Hey, what about this?
    Code:
    $('.slot-color-primary').each( function() {
      var databindstr = $(this).attr('data-bind');
      databindstr = databindstr.replace(
        "\'background\': slot.primaryColor",
        "\'background\': slot.secondaryColor, \'border-left-color\': slot.primaryColor, \'border-left-width\': \'10px\', \'border-right-color\': slot.primaryColor, \'border-right-width\': \'40px\', \'border-top-width\': \'0px\', \'border-bottom-width\': \'0px\'"
      );
      $(this).attr('data-bind', databindstr);
    });
    secondary_colour.png
  12. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    That's what I meant :p Give me a minute with the themes and I'll make a few :)

    Edit: I'm trying slightly more complicated (well, to me!) things, so it's taking a little longer than expected. Still, just figured something out and hope to have some other styles to show soon.

    Edit: Here's what I'm trying to figure out now... This code:
    $('.slot-color-primary').append(
    '<div class="secondaryColour" ................

    Is only creating a div inside/on the upper half of .slot-color-primary. I'm going to make some foods and come back to it, but if anyone wants to explain this behaviour (I may not have given enough code, I know) while I'm bacon-ing, it might speed me up.

    Sorted this bit at least.
    Last edited: March 7, 2014
  13. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    [​IMG]
    [​IMG]
    [​IMG]
    Currently you can change between these in settings. Any changes or any other styles people would like before I upload to PAMM?

    EDIT: Without Uber's border looks kind of nice in DeathByDenim's picture, but the border changes on hover, and fits in better with the rest of Gamma. I think.
  14. cwarner7264

    cwarner7264 Moderator Alumni

    Messages:
    4,460
    Likes Received:
    5,390
    Doge-shaped secondary colour outline pls.
  15. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    If possible a chevron facing downwards.:D
  16. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Couldn't find a nice doge outline, so:
    [​IMG]
    Yes this is really hard to see with some combinations.
    Quitch and cwarner7264 like this.
  17. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,325
    Likes Received:
    2,118
    You won't be satisfied until every looks doge-like, will you? ;)
    cwarner7264 likes this.
  18. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Something like this?
    [​IMG]
    You can be specific. Thinner "V"? Two Vs, one above the other? Smaller?

    EDIT: Just made a corner one as well:
    [​IMG]
    Last edited: March 7, 2014
    lokiCML, Fr33Lancer and DeathByDenim like this.
  19. lokiCML

    lokiCML Post Master General

    Messages:
    1,975
    Likes Received:
    954
    I was thinking centered and a long line of able seaman. Also if you want some more ideas. Heraldry could be a good place to start and specifically charge.

    Thank You
  20. tatsujb

    tatsujb Post Master General

    Messages:
    12,878
    Likes Received:
    5,374
    damn that looks slick!

Share This Page