define whatsThisMttkMod = "MttkModStyles 1.5.2 undocumented"

define mttkModLicense = """
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    .
    ANY USAGE, READING, LEARNING FROM OR USE IN CONJUNCTION BY OR WITH
    MACHINE LEARNING, DEEP LEARNING, ARTIFICIAL INTELLIGENCE OR SIMILIAR
    IS STRICTLY FORBIDDEN."""

init 100:
    define mttkModIntStdTxtSModifier = 0

    if not hasattr( renpy, "config" ):#0 super-senseless-safety ENSURE renpy.config
        define config.skipping = None
    if "gui" not in renpy.python.store_dicts.keys():#1st extra-senseless-safety ENSURE the GUI.store #PYsix: view is OK here
        define gui._skip_backup = False

init 103 python hide:
    guiTupTupStr = ( ( "accent_color", "#0099cc" ), ( "idle_color", "#888888" ),#2nd ENSURE gui.COLORs
    ( "idle_small_color", "#aaaaaa" ), ( "hover_color", "#66c1e0" ), ( "selected_color", "#ffffff" ), ( "insensitive_color", "#5555557f" ),
    ( "muted_color", "#003d51" ), ( "hover_muted_color", "#005b7a" ), ( "text_color", "#ffffff" ), ( "interface_text_color", "#ffffff" ) )
    for vLst in guiTupTupStr:
        if not hasattr( gui, vLst[ 0 ] ):
            setattr( gui, vLst[ 0 ], vLst[ 1 ] )
        elif isinstance( getattr( gui, vLst[ 0 ] ), Color ):
            pass
        elif not isinstance( getattr( gui, vLst[ 0 ] ), mttkstrtyp ):
            setattr( gui, vLst[ 0 ], vLst[ 1 ] )
        elif isinstance( renpy.color.Color( getattr( gui, vLst[ 0 ] ) ), Color ):
            pass
        else:
            setattr( gui, vLst[ 0 ], vLst[ 1 ] )

    guiTupTupStr = ( ( "slot_spacing", 10 ), ( "file_slot_cols", 3 ), ( "file_slot_rows", 2 ), ( "page_spacing", 0 ), ( "scrollbar_size", 10 ) )
    for vLst in guiTupTupStr:#3rd ENSURE some gui.INTs
        if not hasattr( gui, vLst[ 0 ] ):
            setattr( gui, vLst[ 0 ], vLst[ 1 ] )
        elif not isinstance( getattr( gui, vLst[ 0 ] ), int ):
            setattr( gui, vLst[ 0 ], vLst[ 1 ] )

    styTupStr = ( "page_label", "page_label_text", "page_button", "page_button_text", "slot_button", "slot_button_text", "slot_time_text", "slot_name_text" )
    for styStr in styTupStr:#4th ENSURE the file_slots STYLEs
        try:
            aStyleObject = renpy.style.get_style( styStr )
        except:
            aStyleObject = renpy.style.get_or_create_style( styStr )

    confTupTupStr = ( ( "thumbnail_width", 66 ), ( "thumbnail_height", 50 ) )#5th ENSURE some config.INTs
    for vLst in confTupTupStr:
        if not hasattr( config, vLst[ 0 ] ):
            setattr( config, vLst[ 0 ], vLst[ 1 ] )
        elif not isinstance( getattr( config, vLst[ 0 ] ), int ):
            setattr( config, vLst[ 0 ], vLst[ 1 ] )


init 106:
    define mttkModIntStdVBoxSpacing = 0
    define mttkModDictPropsStdText = { }
    define mttkModDictPropsStdTxtFont = { }

    if renpy.loadable( "DejaVuSans.ttf" ):#z-double
        $ mttkModDictPropsStdText[ "font" ] = "DejaVuSans.ttf"#else: I can't help you!
        $ mttkModDictPropsStdTxtFont[ "font" ] = "DejaVuSans.ttf"

    if hasattr( config, "screen_width" ):#z-double
        if getattr( config, "screen_width", 0 ) <= 640:
            define mttkModIntStdTxtSize = 18
            define mttkModIntStdOutlineSize = 1
            define mttkModIntSmallTxtSize = 12


        elif getattr( config, "screen_width", 0 ) <= 800:
            define mttkModIntStdTxtSize = 20
            define mttkModIntStdOutlineSize = 1
            define mttkModIntSmallTxtSize = 12


        elif getattr( config, "screen_width", 0 ) <= 1024:#this and up is most likely 4:3
            define mttkModIntStdTxtSize = 21
            define mttkModIntStdOutlineSize = 2
            define mttkModIntSmallTxtSize = 13


        elif getattr( config, "screen_width", 0 ) <= 1280:#this and down is most likely 16:9
            define mttkModIntStdTxtSize = 22
            define mttkModIntStdOutlineSize = 2
            define mttkModIntSmallTxtSize = 14


        elif getattr( config, "screen_width", 0 ) <= 1600:
            define mttkModIntStdTxtSize = 27
            define mttkModIntStdOutlineSize = 2
            define mttkModIntSmallTxtSize = 15


        elif getattr( config, "screen_width", 0 ) <= 1920:
            define mttkModIntStdTxtSize = 32
            define mttkModIntStdOutlineSize = 2
            define mttkModIntSmallTxtSize = 16


        else:#TODO width > 1920 !
            define mttkModIntStdTxtSize = int( getattr( config, "screen_width", 1920 ) / 61 )
            define mttkModIntStdOutlineSize = 3
            define mttkModIntSmallTxtSize = int( getattr( config, "screen_width", 1920 ) / 135 )


    else:
        define mttkModIntStdTxtSize = 18
        define mttkModIntStdOutlineSize = 1
        define mttkModIntSmallTxtSize = 12


    $ mttkModDictPropsStdText[ "size" ] = mttkModIntStdTxtSize + int( mttkModIntStdTxtSModifier )
    define mttkModIntSpacingFrmSmallTxt = mttkModIntSmallTxtSize













init 109:#my styles
    style mttkModStyMyTxtDefault is default:
        color ( 255, 255, 255, 255 )
        yalign 0.5
    style mttkModStyText is mttkModStyMyTxtDefault:
        properties mttkModDictPropsStdText# see init 6
        outlines [ ( mttkModIntStdOutlineSize, "#000", 0, 0 ) ]
        xalign 0.5
        text_align 0.5





    style mttkModStyMyButtDefault is default:
        child None
        yalign 0.5

    style mttkModStyTButt is mttkModStyMyButtDefault:
        xalign 0.5
    style mttkModStyTButt_text is mttkModStyText:
        color "#ff8800"
        hover_color "#33aa33"
    style mttkModStyTButtOCol is mttkModStyMyButtDefault:
        xalign 0.5
    style mttkModStyTButtOCol_text is mttkModStyText:
        color "#eebb00"
        hover_color "#0f0"





















    style mttkModStyMyFrame is default
    style mttkModStyMyFrame_text is mttkModStyText
    style mttkModStyMyFrame_button is mttkModStyTButt
    style mttkModStyMyFrame_button_text is mttkModStyTButt_text
    style mttkModStyMyHlpFrame is default
    style mttkModStyMyHlpFrame_text is mttkModStyText:
        size ( mttkModIntStdTxtSize + int( mttkModIntStdTxtSModifier ) - 4 )
        xalign 0.0
        text_align 0.0
        color "#ad4"
    style mttkModStyMyHlpFrame_button is mttkModStyTButtOCol
    style mttkModStyMyHlpFrame_button_text is mttkModStyTButtOCol_text:
        size ( mttkModIntStdTxtSize + int( mttkModIntStdTxtSModifier ) - 4 )

    style mttkModStyFsPage_label is page_label:#file_slots
        yalign 0.5
    style mttkModStyFsPage_label_text is page_label_text:
        outlines [ ( 1, "#000", 0, 0 ) ]
    style mttkModStyFsMyPage_label is mttkModStyFsPage_label
    style mttkModStyFsMyPage_label_text is mttkModStyFsPage_label_text:
        properties mttkModDictPropsStdTxtFont
    style mttkModStyFsGrid_button is slot_button


    style mttkModStyFsGrid_button_text is slot_button_text
    style mttkModStyFsGrid_time_text is slot_time_text:
        yalign 0.5
    style mttkModStyFsGrid_name_text is slot_name_text:
        yalign 0.5
    define mttkModColFsAcc = gui.accent_color
    define mttkModColFsHover = gui.hover_color
    style mttkModStyFsPageSelect_button is page_button:
        yalign 0.5
    if renpy.loadable( "DejaVuSans.ttf" ):
        style mttkModStyFsPageSelect_button_text is page_button_text:
            font "DejaVuSans.ttf"
            yalign 0.5
    else:
        style mttkModStyFsPageSelect_button_text is page_button_text:
            yalign 0.5

    style mttkModStyFsMyPageT_button is mttkModStyFsPageSelect_button#my Butts
    style mttkModStyFsMyPageT_button_text is mttkModStyFsPageSelect_button_text:
        outlines [ ( 1, "#000", 0, 0 ) ]
        color "#eebb00"
        hover_color "#0f0"



##eof

