器件型号: TM4C129XNCZAD
我有一组菜单按钮、定义如下。 我认为该结构需要在编译时设置、但我希望最后一个按钮仅在设置了某个变量(运行时)时可用。 我如何才能做到这一点?
//–42 面板 — 系统校准菜单=(CAL2_SCREEN )
//------------------------------------------------------------------------------------
tPushButtonWidget g_SystemCalibration1[]=
{
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 1、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 5)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“",“,0、0、0、0、 0、OnDisLevelCALBtnPress)、
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 2、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 40)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“",“,0、0、0、0、 0、OnLevelSNSensBtnPress)、
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 3、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 75)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“",“,0、0、0、0、 0、OnEnDisQuickStopAtLLBtnPress)、
//搜索“g_SystemCalibration1 + 3“以在第 1 部分和第 2 部分之间来回移动
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 4、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 110)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“",“,0、0、0、0、 0、OnSensorTypeChange)、
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 5、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 145)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“自动模式延迟“、0、0、0、 0、OnAutoDelayBtnPress)、
RectangularButtonStruct (g_psPanels + 41、g_SystemCalibration1 + 6、0、
&g_sKentec320x240x16_SSD2119、(BG_MIN_X + 5)、(BG_MIN_Y + 180)、180、30
(PB_style_outline | PB_style_text_opaint | PB_style_text |
PB_style_Fill | PB_style_release_notify)、
ClrDarkBlue、ClrBlue、ClrWhite、ClrWhite、
G_psFontCmss14b、“第一个通用板复位“、0、0、0、0、 FirstGenBoardReset)、
RectangularButtonStruct (g_psPanel + 41、0、0、
&g_sKentec320x240x16_SSD2119、(BG_MAX_X –50)、(BG_MAX_Y - 50)、50、40、
PB_style_IMG、0、0、0、0、0、0、 G_OnBackBtnpress Backward_Btn、g_OnBtnPress、g_OnBtnPress、0、0、0、0、Backward_Btn、
};