index.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <div id="app">
  2. <div class="step-1" v-if="currentStep==1">
  3. <h1>{{ titleI18n }}</h1>
  4. <h3><ui-hint class="top" style="margin-top: -15px; font-size: 16px;">{{ step1I18n }}</ui-hint></h3>
  5. <br/>
  6. <div class="node-and-text" v-for="(index, item) in guideArray">
  7. <div class="title-and-operate-buttons">
  8. <div class="title-and-alias">
  9. <h2>{{ guideI18n }} {{index+1}}</h2>
  10. &nbsp;
  11. <div style="padding-top: 15px;">
  12. <ui-button v-if="!item.isAliased" @click="showAliasInput(index)" type="icon" style="width: 28px;"><img :src="editImg" width="16" height="16" style="margin-left: -10px;"></ui-button>
  13. <div v-else class="alias-input-close">
  14. <ui-input placeholder="set alias" style="width: 60px;" :value="item.alias" @change="setAlias($event.target.value, index)"></ui-input>
  15. <ui-button @click="hideAliasInput(index)" type="icon" style="width: 10%;"><img :src="closeImg" width="16" height="16" style="margin-left: -10px;">></ui-button>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="operate-buttons">
  20. <ui-button @click="moveUp(index)">{{ moveUpI18n }}</ui-button>
  21. &nbsp;
  22. <ui-button @click="moveDown(index)">{{ moveDownI18n }}</ui-button>
  23. &nbsp;
  24. <ui-button @click="deleteGuide(index)">{{ deleteI18n }}</ui-button>
  25. </div>
  26. </div>
  27. <div class="touch-and-key">
  28. <ui-select :value="item.guideType" @change="onGuideTypeSelectionChange($event.target.value, index)" style=" width: 25%; margin-bottom: 10px;">
  29. <option value="touch">触摸引导</option>
  30. <option value="key">按键引导</option>
  31. </ui-select>
  32. &nbsp;<ui-select :value="item.uiType" @change="onUiTypeChange($event.target.value, index)" style=" width: 25%; margin-bottom: 10px;">
  33. <option value="1">战斗引导</option>
  34. <option value="2">建筑引导</option>
  35. <option value="101">功能开启引导</option>
  36. </ui-select>
  37. <span v-if="item.guideType=='touch'" style="width: 100%; margin-bottom: 10px;">
  38. <span v-if="!item.isDynamic" style="width: 100%;" class="touch-node-btn">
  39. <ui-node @change="onNodeSelectionChange($event.target.value, index)" droppable="cc.Node" :value="item.nodeUUID" style="width: 90%;" placeholder="select node"></ui-node>
  40. <ui-button @click="switchBetweenStaticAndDynamic(index)" type="icon" style="width: 10%;"><img :src="editImg" width="16" height="16" style="margin-left: -10px;"></ui-button>
  41. </span>
  42. <span v-else style="width: 100%;" class="touch-node-btn">
  43. <ui-input placeholder="input node's path, e.g. Canvas/Demo/Btn" style="width: 95%;" :value="item.path" @change="onDynamicNodePathChange($event.target.value, index)"></ui-input>
  44. <ui-button @click="switchBetweenStaticAndDynamic(index)" type="icon" style="width: 10%;"><img :src="selectImg" width="16" height="16" style="margin-left: -10px;"></ui-button>
  45. </span>
  46. </span>
  47. <span v-else style="width: 75%; margin-bottom: 10px;" class="key-input-btn">
  48. <ui-input placeholder="set key" style="width: 90%;" :value="item.key" @change="onKeyChange($event.target.value, index)"></ui-input>
  49. <ui-button @click="showKeyHelp" type="icon" style="width: 10%;"><img :src="helpImg" width="16" height="16" style="margin-left: -10px;"></ui-button>
  50. </span>
  51. </div>
  52. <div v-if="guideTextType=='zh'" style="width: 100%;height: 30px">
  53. <ui-text-area @change="onGuideTextChange($event.target.value, index)" placeholder="set guide text (zh)" style="margin-bottom: 20px; width: 100%;" :value="item.guideText"></ui-text-area>
  54. <div class="textarea-btn">
  55. <ui-button @click="changeGuideTextType" style="padding-left: 4px; padding-right: 4px;" class="transparent">→ en</ui-button>
  56. </div>
  57. </div>
  58. <div v-if="guideTextType=='en'" style="width: 100%;height: 30px">
  59. <ui-text-area @change="onGuideTextChange($event.target.value, index)" placeholder="set guide text (en)" style="margin-bottom: 20px; width: 100%;" :value="item.guideEnText"></ui-text-area>
  60. <div class="textarea-btn">
  61. <ui-button @click="changeGuideTextType" style="padding-left: 4px; padding-right: 4px;" class="transparent">→ zh</ui-button>
  62. </div>
  63. </div>
  64. <div class="touch-node-btn" style="width: 100%;height: 40px; margin-top: 20px">
  65. arrowX <ui-input placeholder="arrowX" style="width: 50px;" :value="item.arrowPos[0]" @change="onArrowPosXChange($event.target.value, index)"></ui-input>
  66. arrowY <ui-input placeholder="arrowY" style="width: 50px;" :value="item.arrowPos[1]" @change="onArrowPosYChange($event.target.value, index)"></ui-input>
  67. arrowRotation <ui-input placeholder="arrowRotation" style="width: 50px;" :value="item.arrowRotation" @change="onArrowRotationChange($event.target.value, index)"></ui-input>
  68. textBgX <ui-input placeholder="textBgX" style="width: 50px;" :value="item.textBgPos[0]" @change="onTextBgPosXChange($event.target.value, index)"></ui-input>
  69. textBgY <ui-input placeholder="textBgY" style="width: 50px;" :value="item.textBgPos[1]" @change="onTextBgPosYChange($event.target.value, index)"></ui-input>
  70. arrowType <ui-input placeholder="textBgY" style="width: 50px;" :value="item.arrowType" @change="onArrowTypeChange($event.target.value, index)"></ui-input>
  71. <ui-checkbox :value="item.showTextBg" @change="onShowTextBgChange($event.target.value, index)">showTextBg</ui-checkbox>
  72. <ui-checkbox :value="item.showRole" @change="onShowRoleChange($event.target.value, index)">showRole</ui-checkbox>
  73. <ui-checkbox :value="item.prevent" @change="onPreventChange($event.target.value, index)">prevent</ui-checkbox>
  74. </div>
  75. </div>
  76. <div class="step-1-buttons">
  77. <div class="last-guide" @click="useLastGuide">
  78. <img :src="prevplayImg" width="11" height="11">&nbsp;{{ useLastGuideI18n }}
  79. </div>
  80. <div>
  81. <ui-button @click="addGuide"><img :src="addImg" width="16" height="16">&nbsp;{{ addI18n }}</ui-button>
  82. &nbsp;
  83. <ui-button @click="confirmStep1"><img :src="confirmImg" width="16" height="16">&nbsp;{{ confirmI18n }}</ui-button>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="step-2" v-if="currentStep==2">
  88. <h1>{{ titleI18n }}</h1>
  89. <h3><ui-hint class="top" style="margin-top: -15px; font-size: 16px;">{{ step2I18n }}</ui-hint></h3>
  90. <br/>
  91. <div class="section-list">
  92. <ui-section style="width: 100%;" expand>
  93. <div class="header">{{ guideSignI18n }}</div>
  94. <div class="section">
  95. <div v-for="(index, item) in guideSignPicArray" class="img-checkbox">
  96. <img :src="item.path" height="60"/>
  97. <ui-checkbox @confirm="onGuideSignCheckboxConfirm(index)" :value="item.value">{{item.name}}</ui-checkbox>
  98. </div>
  99. </div>
  100. </ui-section>
  101. <ui-section style="width: 100%;" expand>
  102. <div class="header">{{ textBgI18n }}</div>
  103. <div class="section">
  104. <div v-for="(index, item) in textBgPicArray" class="img-checkbox">
  105. <img :src="item.path" height="60" width="120" />
  106. <ui-checkbox @confirm="onTextBgCheckboxConfirm(index)" :value="item.value">{{item.name}}</ui-checkbox>
  107. </div>
  108. </div>
  109. </ui-section>
  110. </div>
  111. <div class="step-2-buttons">
  112. <ui-button @click="back"><img :src="backImg" width="16" height="16">&nbsp;{{ goBackI18n }}</ui-button>
  113. &nbsp;&nbsp;
  114. <ui-button @click="confirmStep2"><img :src="confirmImg" width="16" height="16">&nbsp;{{ confirmI18n }}</ui-button>
  115. </div>
  116. </div>
  117. </div>