about summary refs log tree commit diff stats
path: root/configure-debug
blob: 63679c9806199047641ce9d0be2fa5eb4326327c (plain) (blame)
1
2
3
4
#!/bin/sh

#./configure PYTHON_VERSION=3 CFLAGS='-g3 -O0' CXXFLAGS='-g3 -O0' $@
./configure CFLAGS='-g3 -O0' CXXFLAGS='-g3 -O0' $@
ont-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
function draw_help_without_mouse_pressed(drawing)
  love.graphics.setColor(0,0.5,0)
  local y = drawing.y+10
  love.graphics.print("Things you can do:", Margin_left+30,y)
  y = y + Line_height
  love.graphics.print("* Press the mouse button to start drawing a "..current_shape(), Margin_left+30,y)
  y = y + Line_height
  love.graphics.print("* Hover on a point and press 'ctrl+u' to pick it up and start moving it,", Margin_left+30,y)
  y = y + Line_height
  love.graphics.print("then press the mouse button to drop it", Margin_left+30+bullet_indent(),y)
  y = y + Line_height
  love.graphics.print("* Hover on a point and press 'ctrl+n', type a name, then press 'enter'", Margin_left+30,y)
  y = y + Line_height
  love.graphics.print("* Hover on a point or shape and press 'ctrl+d' to delete it", Margin_left+30,y)
  y = y + Line_height
  if Current_drawing_mode ~= 'freehand' then
    love.graphics.print("* Press 'ctrl+p' to switch to drawing freehand strokes", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'line' then
    love.graphics.print("* Press 'ctrl+l' to switch to drawing lines", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'manhattan' then
    love.graphics.print("* Press 'ctrl+m' to switch to drawing horizontal/vertical lines", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'circle' then
    love.graphics.print("* Press 'ctrl+o' to switch to drawing circles/arcs", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'polygon' then
    love.graphics.print("* Press 'ctrl+g' to switch to drawing polygons", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'rectangle' then
    love.graphics.print("* Press 'ctrl+r' to switch to drawing rectangles", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'square' then
    love.graphics.print("* Press 'ctrl+s' to switch to drawing squares", Margin_left+30,y)
    y = y + Line_height
  end
  love.graphics.print("* Press 'ctrl+=' or 'ctrl+-' to zoom in or out, ctrl+0 to reset zoom", Margin_left+30,y)
  y = y + Line_height
  love.graphics.print("Press 'esc' now to hide this message", Margin_left+30,y)
  y = y + Line_height
  love.graphics.setColor(0,0.5,0, 0.1)
  love.graphics.rectangle('fill', Margin_left,drawing.y, Line_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
end

function draw_help_with_mouse_pressed(drawing)
  love.graphics.setColor(0,0.5,0)
  local y = drawing.y+10
  love.graphics.print("You're currently drawing a "..current_shape(drawing.pending), Margin_left+30,y)
  y = y + Line_height
  love.graphics.print('Things you can do now:', Margin_left+30,y)
  y = y + Line_height
  if Current_drawing_mode == 'freehand' then
    love.graphics.print('* Release the mouse button to finish drawing the stroke', Margin_left+30,y)
    y = y + Line_height
  elseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' then
    love.graphics.print('* Release the mouse button to finish drawing the line', Margin_left+30,y)
    y = y + Line_height
  elseif Current_drawing_mode == 'circle' then
    if drawing.pending.mode == 'circle' then
      love.graphics.print('* Release the mouse button to finish drawing the circle', Margin_left+30,y)
      y = y + Line_height
      love.graphics.print("* Press 'a' to draw just an arc of a circle", Margin_left+30,y)
    else
      love.graphics.print('* Release the mouse button to finish drawing the arc', Margin_left+30,y)
    end
    y = y + Line_height
  elseif Current_drawing_mode == 'polygon' then
    love.graphics.print('* Release the mouse button to finish drawing the polygon', Margin_left+30,y)
    y = y + Line_height
    love.graphics.print("* Press 'p' to add a vertex to the polygon", Margin_left+30,y)
    y = y + Line_height
  end
  love.graphics.print("* Press 'esc' then release the mouse button to cancel the current shape", Margin_left+30,y)
  y = y + Line_height
  y = y + Line_height
  if Current_drawing_mode ~= 'line' then
    love.graphics.print("* Press 'l' to switch to drawing lines", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'manhattan' then
    love.graphics.print("* Press 'm' to switch to drawing horizontal/vertical lines", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'circle' then
    love.graphics.print("* Press 'o' to switch to drawing circles/arcs", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'polygon' then
    love.graphics.print("* Press 'g' to switch to drawing polygons", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'rectangle' then
    love.graphics.print("* Press 'r' to switch to drawing rectangles", Margin_left+30,y)
    y = y + Line_height
  end
  if Current_drawing_mode ~= 'square' then
    love.graphics.print("* Press 's' to switch to drawing squares", Margin_left+30,y)
    y = y + Line_height
  end
  love.graphics.setColor(0,0.5,0, 0.1)
  love.graphics.rectangle('fill', Margin_left,drawing.y, Line_width, math.max(Drawing.pixels(drawing.h),y-drawing.y))
end

function current_shape(shape)
  if Current_drawing_mode == 'freehand' then
    return 'freehand stroke'
  elseif Current_drawing_mode == 'line' then
    return 'straight line'
  elseif Current_drawing_mode == 'manhattan' then
    return 'horizontal/vertical line'
  elseif Current_drawing_mode == 'circle' and shape and shape.start_angle then
    return 'arc'
  else
    return Current_drawing_mode
  end
end

_bullet_indent = nil
function bullet_indent()
  if _bullet_indent == nil then
    local text = love.graphics.newText(love.graphics.getFont(), '* ')
    _bullet_indent = text:getWidth()
  end
  return _bullet_indent
end