Skip to content

Commit

Permalink
Added 'view asm' button
Browse files Browse the repository at this point in the history
  • Loading branch information
leuat committed Feb 25, 2024
1 parent cdcb0e7 commit fe28850
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion source/trsedocuments/formraseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void FormRasEditor::InitDocument(WorkerThread *t, QSharedPointer<CIniFile> ini,
ui->txtEditor->m_autoComplete = m_iniFile->getdouble("editor_autocomplete_nobug")==1;
ui->txtEditor->m_autoIndent = m_iniFile->getdouble("editor_autocomplete")==1;

ui->btnAsm->setVisible(m_currentSourceFile.toLower().endsWith(".ras"));

}

Expand Down Expand Up @@ -312,7 +313,7 @@ void FormRasEditor::Build(bool isShadow)
if (!(QApplication::keyboardModifiers() & Qt::ShiftModifier))
if (!isShadow)
if (m_projectIniFile->getString("main_ras_file")!="none") {
if (m_projectIniFile->getString("main_ras_file")!=m_currentFileShort) {
if (m_projectIniFile->getString("main_ras_file")!=m_currentFileShort) {
emit requestBuildMain(m_run);
return;
}
Expand Down Expand Up @@ -1396,3 +1397,10 @@ void FormRasEditor::on_btnViewHelp_clicked()
Help(ui->widgetHelp->m_currentWord);

}

void FormRasEditor::on_btnAsm_clicked()
{
LookupAssemblerUnderCursor();

}

4 changes: 2 additions & 2 deletions source/trsedocuments/formraseditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class FormRasEditor : public TRSEDocument
BuilderThread m_builderThread;
QElapsedTimer m_timer;
int m_lastBuild= 0;
QVector3D m_curCol = QVector3D(180,160,50);;
QVector3D m_curCol = QVector3D(180,160,50);
QVector3D m_startCol = QVector3D(64,32,0);
QVector3D m_endCol = QVector3D(255,200,100);

Expand All @@ -112,7 +112,6 @@ class FormRasEditor : public TRSEDocument
void FocusOnOutput();


void LoadRasFile(QString fileName);
void ExecutePrg(QString fileName);
void InitDocument(WorkerThread *t, QSharedPointer<CIniFile> ini, QSharedPointer<CIniFile> iniProject) override;
void setupEditor();
Expand Down Expand Up @@ -209,6 +208,7 @@ private slots:
void on_chkDisplayAddresses_stateChanged(int arg1);
void on_chkDisplayCycles_stateChanged(int arg1);
void on_btnViewHelp_clicked();
void on_btnAsm_clicked();
};

#endif // FORMRASEDITOR_H
7 changes: 7 additions & 0 deletions source/trsedocuments/formraseditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="btnAsm">
<property name="text">
<string>View Asm (f3)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
Expand Down

0 comments on commit fe28850

Please sign in to comment.