Skybox menu w/ previews

Started by unixfreak, October 07, 2013, 01:19:47 AM

Previous topic - Next topic

unixfreak



Mostly  ported over from Sauerbraten, i made a few tiny changes and reorganized the menu.

Add this to your autoexec:
exec skyboxes.cfg

Copy this code into skyboxes.cfg:

    newgui skyboxes [
       guicontainer [
          guiheader "select skybox"
       
          guibar   
          guistrut 10 1
       
          guilist [
             guilist [ genskyitems $skyboxlist1 ]
             guistrut 2
             guibar
             guistrut 2
             guilist [ genskyitems $skyboxlist2 ]
             guistrut 2
             guibar
             guistrut 2
             guilist [ genskyitems $skyboxlist3 ]
              showskyshot
         
          ]
       ]

    ]


    skyboxes = [showgui skyboxes]

    skyboxlist1 = [
    elyvisions/arch3
    elyvisions/cave3
    elyvisions/dark
    elyvisions/hot
    elyvisions/rainbow
    elyvisions/sh
    elyvisions/skyast
    elyvisions/skyhsky
    elyvisions/skype
    elyvisions/sp2
    elyvisions/sp3
    elyvisions/tron
    jojo/city
    jojo/redcliff
    jwin/altitude
    jwin/space2
    jwin/space
    ]

    skyboxlist2 = [
    mayhem/afterrain
    mayhem/aqua4
    mayhem/aqua9
    mayhem/flame
    mayhem/grouse
    mayhem/h2s
    mayhem/prehistoric
    mayhem/scorched
    mayhem/shattered
    mayhem/trough
    penguins/arid2
    penguins/arid
    penguins/barren
    penguins/divine
    penguins/harmony
    penguins/kenon
    penguins/tropic
    ]

    skyboxlist3 = [
    penguins/violence
    penguins/wrath
    skyboxes/clouds2
    skyboxes/clouds
    skyboxes/gradient
    skyboxes/grey
    skyboxes/interstellar
    skyboxes/miramar
    skyboxes/skyhigh
    skyboxes/skylump2
    skyboxes/skylump
    skyboxes/stars
    skyboxes/stormydays
    skyboxes/sunsetflat
    skyboxes/yellow
    ulukai/corona
    ulukai/redeclipse
    ]


    genskyitems = [
        looplist cursky $arg1 [
            guibutton $cursky (concat skybox $cursky)
        ]
    ]

    alias showskyshot [ guibar; guiimage (concatword "<thumbnail:128>data/" (if (> $numargs 0) [result $arg1] [result (at $guirollovername 0)]) "_ft") $guirolloveraction 4 1 "textures/nothumb"]


Run it with:
/skyboxes

Make sure you're in editmode (derp).
Join the Red Eclipse discord! https://www.redeclipse.net/discord