Changeset 98 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java


Ignore:
Timestamp:
08/29/2017 10:40:27 AM (9 years ago)
Author:
bmcguffin
Message:

Added "Add 15 minutes" button, btnAddTime, to both Script Builder and Incident Editor windows. Clicking the button allows the user to add 15 minutes of scrollable space to the end of the timeline window, so that new events can be added after the end. This extra time does not interact with the model and so does not enter the save file, or persist between iterations of the program.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java

    r76 r98  
    118118                if ((incident.length + incident.offset) > longestLength) 
    119119                { 
    120                     longestLength = incident.length + incident.offset; 
     120                    longestLength = incident.length + incident.offset + IncidentTimelinePanel.requestedScriptBuilderFillerTime; 
    121121                } 
    122122            } 
     
    141141     * @param incident the incident being edited 
    142142     */ 
    143     public void update(ScriptIncident incident) 
     143    public void update(ScriptIncident incident, IncidentTimelinePanel timeline) 
    144144    { 
    145145        longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; 
     
    155155            if ((incident.length + incident.offset) > longestLength) 
    156156            { 
    157                 longestLength = incident.length + incident.offset; 
     157                longestLength = incident.length + incident.offset + timeline.requestedEditorFillerTime; 
    158158            } 
    159159 
Note: See TracChangeset for help on using the changeset viewer.