extract a couple of constants

akkartik
Nov 14, 2024, 5:18 PM
375Q6NPJB34MIVAHX2K6MHLK5DMBMMQ4KKQKXG27IEBEYUKVDHIQC

Dependencies

  • [2] Y6M77HB4 keep sliders well within settings area
  • [3] QLJY3CKC bugfix: use border color in scrollbars
  • [4] OL5RDL6Z slightly shrink the clickable area for a button
  • [5] LBQBZT4I round scrollbar slightly
  • [6] LR4HHCRH responsive layout for settings menu
  • [7] MZ3DMYPD start sketching out a scrollbar
  • [8] YR7AXEYB add keyboard shortcuts for common operations
  • [9] A5NQFECK make scrollbar opaque
  • [10] LEE7TNZM sync all sliders with the font slider where possible
  • [11] OC4P6P36 greatly simplify slider implementation
  • [12] AZMYKWMH resolve conflicts
  • [13] YV2GBDNW preserve settings across restart
  • [14] Z5M23NTK implement second, 'output' editor
  • [15] RK2ASPN7 add lots of buttons to the toolbar
  • [16] JV27LDDK sliders for font size and color settings
  • [*] R5QXEHUI somebody stop me

Change contents

  • file addition: 0184-Scrollbar_width (----------)
    [18.2]
    Scrollbar_width = 30
  • file addition: 0183-Side_button_width (----------)
    [18.2]
    Side_button_width = 30
  • replacement in 0081-draw_settings_menu at line 4
    [5.94][5.3112:3154](),[5.777][5.3112:3154](),[5.3112][5.3112:3154]()
    local x,y = Safe_width-30-w, Menu_bottom
    [5.94]
    [5.3154]
    local x,y = Safe_width-Side_button_width-w, Menu_bottom
  • replacement in 0081-draw_settings_menu at line 15
    [5.3463][2.40:73]()
    x0=sx+20, x1=Safe_width-30-10,
    [5.3463]
    [5.3493]
    x0=sx+20, x1=Safe_width-Side_button_width-10,
  • replacement in 0081-draw_settings_menu at line 63
    [5.1312][5.881:885]()
    end
    [5.1312]
    end
  • replacement in 0060-next_pane_button at line 2
    [5.6252][4.136:251]()
    button(Global_state, 'right', {x=r-30, y=Menu_bottom, w=30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
    [5.6252]
    [5.6368]
    button(Global_state, 'right', {x=r-Side_button_width, y=Menu_bottom, w=Side_button_width, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
  • replacement in 0060-next_pane_button at line 5
    [5.6421][5.6421:6541]()
    love.graphics.polygon('fill', r-25, App.screen.height/2-10, r-25, App.screen.height/2+10, r-5, App.screen.height/2)
    [5.6421]
    [5.6661]
    love.graphics.polygon('fill', r-Side_button_width+5, App.screen.height/2-10, r-Side_button_width+5, App.screen.height/2+10, r-5, App.screen.height/2)
  • replacement in 0059-previous_pane_button at line 2
    [5.6758][5.6758:6888]()
    button(Global_state, 'previous_pane', {x=0, y=Menu_bottom, w=Menu_left+30, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
    [5.6758]
    [5.6888]
    button(Global_state, 'previous_pane', {x=0, y=Menu_bottom, w=Menu_left+Side_button_width, h=App.screen.height, bg={r=0.5, g=0.5, b=0.5, a=0.2},
  • replacement in 0059-previous_pane_button at line 5
    [5.6941][5.6941:7084]()
    love.graphics.polygon('fill', Menu_left+5, App.screen.height/2, Menu_left+25, App.screen.height/2-10, Menu_left+25, App.screen.height/2+10)
    [5.6941]
    [5.7204]
    love.graphics.polygon('fill', Menu_left+5, App.screen.height/2, Menu_left+Side_button_width-5, App.screen.height/2-10, Menu_left+Side_button_width-5, App.screen.height/2+10)
  • replacement in 0034-draw_scrollbar at line 3
    [3.229][5.830:1061](),[5.2463][5.830:1061]()
    love.graphics.line(state.right+30, state.top, state.right+30, state.bottom)
    love.graphics.line(state.right+25, state.top, state.right+35, state.top)
    love.graphics.line(state.right+25, state.bottom, state.right+35, state.bottom)
    [3.229]
    [5.1061]
    local r = state.right+15+Scrollbar_width/2
    love.graphics.line(r, state.top, r, state.bottom)
    love.graphics.line(r-5, state.top, r+5, state.top)
    love.graphics.line(r-5, state.bottom, r+5, state.bottom)
  • replacement in 0034-draw_scrollbar at line 11
    [5.32][5.1226:1319]()
    love.graphics.rectangle('fill', state.right+15, topy+5, 30, math.max(boty-topy-10, 5), 5,5)
    [5.32]
    [5.1319]
    love.graphics.rectangle('fill', state.right+15, topy+5, Scrollbar_width, math.max(boty-topy-10, 5), 5,5)