Changeset 98 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/panels/TimeStampPanel.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/TimeStampPanel.java

    r76 r98  
    6161                if ((incident.length + incident.offset) > longestLength) 
    6262                { 
    63                     longestLength = incident.length + incident.offset; 
     63                    longestLength = incident.length + incident.offset + IncidentTimelinePanel.requestedScriptBuilderFillerTime; 
    6464                } 
    6565            } 
     
    9292     * @param incident the incident which this window is editing. 
    9393     */ 
    94     public void update(ScriptIncident incident) 
     94    public void update(ScriptIncident incident, IncidentTimelinePanel timeline) 
    9595    { 
    9696        longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; 
     
    105105            if ((incident.length + incident.offset) > longestLength) 
    106106            { 
    107                 longestLength = incident.length + incident.offset; 
     107                longestLength = incident.length + incident.offset + timeline.requestedEditorFillerTime; 
    108108            } 
    109109        } 
Note: See TracChangeset for help on using the changeset viewer.