make colors easier to edit

[?]
Jul 12, 2022, 6:03 AM
4KC7I3E2DIKLIP7LQRKB5WFA2Z5XZXAU46RFHNFQU5BVEJPDX6UQC

Dependencies

  • [2] FHSZYAZ2 more precise search highlighting
  • [3] C6QTJYA4 keep online help inside of drawing
  • [4] 2L5MEZV3 experiment: new edit namespace
  • [5] LUNH47XX make text and drawings the same width
  • [6] J2SVGR2E experiment: blinking cursor
  • [7] NUCZBE77 bugfix: alignment of help screen
  • [8] DAENUOGV eliminate assumptions that line length == size in bytes
  • [9] 6J3NXBYG affordance to adjust width for word wrap
  • [10] OIB2QPRC start remembering where the cursor is drawn in px
  • [11] AH744RFR show when we're naming a point
  • [12] HIKLULFQ extract a function
  • [13] GSV7DABC make online help fit within a drawing
  • [14] 5DOC2CBM extract a function
  • [15] BZRRUIFQ correct location of the line width slider
  • [16] MP2TBKU6 bugfix: crash in Text.up() after return
  • [17] WTDKUACN rectangle and square shapes
  • [18] M6TH7VSZ rip out notion of Line_width
  • [19] LXTTOB33 extract a couple of files
  • [20] 2TQR4PSY add args to some functions
  • [21] U7M4M2F7 bugfix: don't rely on Screen_bottom1 while scrolling
  • [22] HOSPP2AN crisp font rendering
  • [23] BYG5CEMV support for naming points
  • [24] C45WCXJ2 keep drawings within the line width slider as well
  • [25] NYQ7HD4D move
  • [26] XOAHJ6M3 similar tests for cursor up
  • [27] 4VKEE43Z bugfix
  • [28] GK47BBCY start passing left/right margins everywhere
  • [29] B3IWYWSR delete another arg that can be deduced
  • [30] H22OAXWE couple of TODOs
  • [31] E6TMJY2T lighter color for in-progress strokes
  • [32] 5DOTWNVM right margin
  • [33] Z4XRNDTR find text
  • [34] BULPIBEG beginnings of a module for the text editor
  • [35] XNFTJHC4 split keyboard handling between Text and Drawing
  • [36] YJGADSGK delete unused arg
  • [37] BLWAYPKV extract a module
  • [38] DXT4QTAH a few more integer coordinates
  • [39] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [40] VHQCNMAR several more modules
  • [41] 3TFEAQSW start using some globals
  • [42] NQH7DEEW bugfix: missed rename in one file
  • [43] JFFUF5AL override mouse state lookups in tests
  • [44] LAW2O3NW extract variable Margin_left
  • [45] CVGE3SIG I feel confident now that page-down is working.
  • [46] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [*] 3QNOKBFM beginnings of a test harness
  • [*] AVTNUQYR basic test-enabled framework

Change contents

  • replacement in text.lua at line 14
    [5.22][5.109:141](),[5.26][5.109:141](),[5.50][5.109:141](),[5.63][5.109:141](),[5.113][5.109:141](),[5.1166][5.109:141](),[5.1746][5.109:141](),[5.109][5.109:141]()
    love.graphics.setColor(0,0,0)
    [5.1166]
    [5.1747]
    App.color(Text_color)
  • replacement in text.lua at line 62
    [2.113][5.429:471](),[5.420][5.429:471](),[5.429][5.429:471]()
    love.graphics.setColor(0,0,0)
    [2.113]
    [2.114]
    App.color(Text_color)
  • replacement in text.lua at line 86
    [5.68][5.68:102]()
    love.graphics.setColor(1,0,0)
    [5.68]
    [5.102]
    App.color(Cursor_color)
  • replacement in text.lua at line 88
    [5.158][5.158:192]()
    love.graphics.setColor(0,0,0)
    [5.158]
    [5.192]
    App.color(Text_color)
  • replacement in select.lua at line 71
    [5.854][5.854:894]()
    love.graphics.setColor(0.7,0.7,0.9)
    [5.854]
    [5.894]
    App.color(Highlight_color)
  • replacement in select.lua at line 73
    [5.965][5.965:999]()
    love.graphics.setColor(0,0,0)
    [5.965]
    [2.292]
    App.color(Text_color)
  • replacement in search.lua at line 14
    [5.49392][5.49392:49424]()
    love.graphics.setColor(0,0,0)
    [5.49392]
    [5.49424]
    App.color(Text_color)
  • replacement in search.lua at line 16
    [5.49464][5.49464:49496]()
    love.graphics.setColor(1,0,0)
    [5.49464]
    [5.49496]
    App.color(Cursor_color)
  • replacement in search.lua at line 21
    [5.49666][5.49666:49698]()
    love.graphics.setColor(0,0,0)
    [5.49666]
    [5.49698]
    App.color(Text_color)
  • edit in icons.lua at line 3
    [5.882][5.882:1345](),[5.1345][5.5334:5335](),[5.5334][5.5334:5335]()
    function icon.line_width(x, y)
    love.graphics.setColor(0.7,0.7,0.7)
    love.graphics.line(x+0,y+0, x+9,y+0)
    love.graphics.line(x+0,y+1, x+9,y+1)
    love.graphics.line(x+0,y+2, x+9,y+2)
    love.graphics.line(x+0,y+3, x+9,y+3)
    love.graphics.line(x+0,y+4, x+9,y+4)
    love.graphics.line(x+0,y+5, x+9,y+5)
    love.graphics.line(x+1,y+6, x+8,y+6)
    love.graphics.line(x+2,y+7, x+7,y+7)
    love.graphics.line(x+3,y+8, x+6,y+8)
    love.graphics.line(x+4,y+9, x+5,y+9)
    end
  • replacement in icons.lua at line 4
    [5.5370][5.5370:5408]()
    love.graphics.setColor(0.7,0.7,0.7)
    [5.5370]
    [5.5408]
    App.color(Icon_color)
  • edit in icons.lua at line 8
    [5.5526][5.5526:5560]()
    love.graphics.setColor(0, 0, 0)
  • replacement in help.lua at line 2
    [5.6673][5.6673:6707]()
    love.graphics.setColor(0,0.5,0)
    [5.6673]
    [5.6707]
    App.color(Help_color)
  • replacement in help.lua at line 48
    [5.851][5.8427:8466](),[5.6670][5.8427:8466](),[5.8427][5.8427:8466]()
    love.graphics.setColor(0,0.5,0, 0.1)
    [5.6670]
    [3.12]
    App.color(Help_background_color)
  • replacement in help.lua at line 53
    [5.8630][5.8630:8664]()
    love.graphics.setColor(0,0.5,0)
    [5.8630]
    [5.8664]
    App.color(Help_color)
  • replacement in help.lua at line 127
    [5.10759][5.10759:10798]()
    love.graphics.setColor(0,0.5,0, 0.1)
    [5.10759]
    [3.150]
    App.color(Help_background_color)
  • edit in edit.lua at line 1
    [4.413]
    [4.414]
    -- some constants people might like to tweak
    Text_color = {r=0, g=0, b=0}
    Cursor_color = {r=1, g=0, b=0}
    Stroke_color = {r=0, g=0, b=0}
    Current_stroke_color = {r=0.7, g=0.7, b=0.7} -- in process of being drawn
    Current_name_background_color = {r=1, g=0, b=0, a=0.1} -- name currently being edited
    Focus_stroke_color = {r=1, g=0, b=0} -- what mouse is hovering over
    Highlight_color = {r=0.7, g=0.7, b=0.9} -- selected text
    Icon_color = {r=0.7, g=0.7, b=0.7} -- color of current mode icon in drawings
    Help_color = {r=0, g=0.5, b=0}
    Help_background_color = {r=0, g=0.5, b=0, a=0.1}
  • replacement in edit.lua at line 117
    [4.3913][4.3913:3947]()
    love.graphics.setColor(0, 0, 0)
    [4.3913]
    [4.3947]
    App.color(Text_color)
  • replacement in drawing.lua at line 10
    [5.403][5.316:359](),[5.1709][5.316:359](),[5.2764][5.316:359](),[5.4220][5.316:359](),[5.6674][5.316:359](),[5.18359][5.316:359](),[5.316][5.316:359]()
    love.graphics.setColor(0.75,0.75,0.75)
    [5.6674]
    [5.6675]
    App.color(Icon_color)
  • replacement in drawing.lua at line 34
    [5.18755][5.994:1030](),[5.994][5.994:1030]()
    love.graphics.setColor(1,0,0)
    [5.18755]
    [5.1030]
    App.color(Focus_stroke_color)
  • replacement in drawing.lua at line 36
    [5.1039][5.1039:1075]()
    love.graphics.setColor(0,0,0)
    [5.1039]
    [5.1075]
    App.color(Stroke_color)
  • replacement in drawing.lua at line 43
    [5.18841][5.1222:1260](),[5.1222][5.1222:1260]()
    love.graphics.setColor(1,0,0)
    [5.18841]
    [5.3132]
    App.color(Focus_stroke_color)
  • replacement in drawing.lua at line 46
    [5.1346][5.1346:1384]()
    love.graphics.setColor(0,0,0)
    [5.1346]
    [5.3233]
    App.color(Stroke_color)
  • replacement in drawing.lua at line 55
    [5.303][5.303:347]()
    love.graphics.setColor(1,0,0,0.1)
    [5.303]
    [5.347]
    App.color(Current_name_background_color)
  • replacement in drawing.lua at line 68
    [5.1483][5.10:51]()
    love.graphics.setColor(0.75,0.75,0.75)
    [5.1483]
    [5.3419]
    App.color(Current_stroke_color)
  • edit in app.lua at line 158
    [49.6421]
    [49.6421]
    end
    function App.color(color)
    love.graphics.setColor(color.r, color.g, color.b, color.a)