├── LICENSE ├── README.md └── graph_sample ├── common ├── decisions │ ├── categories │ │ └── sample_decision_category.txt │ └── sample_decisions.txt ├── scripted_effects │ ├── line_graph_scripted_effects.txt │ └── radar_graph_scripted_effects.txt └── scripted_guis │ ├── dial_sample_scripted_gui.txt │ ├── line_graph_sample_scripted_gui.txt │ └── radar_graph_sample_scripted_gui.txt ├── descriptor.mod ├── gfx ├── FX │ ├── dial.shader │ ├── half_dial.shader │ ├── line_graph.shader │ ├── radar.shader │ └── radar5 │ │ ├── 0.shader │ │ ├── 1.shader │ │ ├── 2.shader │ │ ├── 3.shader │ │ └── 4.shader └── interface │ ├── dial │ ├── dial_back.dds │ ├── dial_back_half.dds │ ├── dial_background.dds │ ├── dial_dot.dds │ ├── dial_empty.dds │ └── dial_full.dds │ ├── line_graph │ ├── graph_line_empty.dds │ ├── graph_line_full.dds │ ├── line_graph_background.dds │ └── line_graph_chart.dds │ └── radar_graph │ ├── radar_graph_background.dds │ ├── radar_graph_empty.dds │ └── radar_graph_fill.dds ├── interface ├── dial_sample.gfx ├── dial_sample.gui ├── line_graph_sample.gfx ├── line_graph_sample.gui ├── radar_graph_sample.gfx └── radar_graph_sample.gui └── localisation └── graph_sample_localisation_l_english.yml /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Flaxbeard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HOI4 Scripted Graphs 2 | 3 | Custom shaderfiles and example code for implementing a number of neat visualizations for your Hearts of Iron IV Scripted GUIs. Created for use in [Cold Southern Springs](https://discord.gg/HZpcwUuaSH) and its parent mod, [The New Order: Last Days of Europe](https://steamcommunity.com/sharedfiles/filedetails/?id=2173766180). 4 | 5 | ## Guides 6 | You can find implementation guides and a technical breakdown of what is going on by visiting the [associated GitHub wiki page](https://github.com/Flaxbeard/hoi4-scripted-graphs/wiki). 7 | 8 | ## License / Credit 9 | No credit needed, but feel free to shoot me a PM on Discord (Flaxbeard#6752) if you make anything neat with this, I love to see what people can make. If so inclined, feel free to thank "Flaxbeard" in your mod credits, but this is not nececssary. 10 | 11 | ## Radar Graphs 12 | ![An example radar graph](https://i.imgur.com/0p97mii.png) ![An animated version](https://i.imgur.com/09vnBCp.gif) 13 | 14 | ## Line Graphs 15 | ![An example line graph](https://i.imgur.com/ag6DrfW.png) ![An animated version](https://i.imgur.com/CCZikCj.gif) 16 | 17 | ## Simple Dials 18 | ![An example dial](https://i.imgur.com/NovSMGX.png) ![An animated dial](https://i.imgur.com/agys36u.gif) 19 | 20 | ## Related Tools 21 | Looking for other neat HOI4 GUI widgets? Check out: 22 | - My [HOI4 Parliament Diagram](https://github.com/Flaxbeard/hoi4-parliament-diagram) tool which generates GUI code for semicircular parliament or congressional graphs. 23 | - [Yard1's fantastic Pie Chart](https://github.com/Yard1/HoI4-Scripted-GUI-Pie-Chart) repo for custom pie charts. 24 | -------------------------------------------------------------------------------- /graph_sample/common/decisions/categories/sample_decision_category.txt: -------------------------------------------------------------------------------- 1 | sample_category = { 2 | icon = generic_political_actions 3 | 4 | priority = 100 5 | 6 | allowed = { 7 | always = yes 8 | } 9 | visible = { 10 | is_debug = yes 11 | } 12 | } -------------------------------------------------------------------------------- /graph_sample/common/decisions/sample_decisions.txt: -------------------------------------------------------------------------------- 1 | sample_category = { 2 | open_radar_gui = { 3 | icon = generic_industry 4 | 5 | visible = { 6 | is_debug = yes 7 | } 8 | 9 | fire_only_once = no 10 | cost = 0 11 | 12 | complete_effect = { 13 | set_country_flag = open_radar_gui 14 | } 15 | } 16 | open_line_gui = { 17 | icon = generic_industry 18 | 19 | visible = { 20 | is_debug = yes 21 | } 22 | 23 | fire_only_once = no 24 | cost = 0 25 | 26 | complete_effect = { 27 | clear_array = SAMPLE_graph_offsets 28 | clear_array = SAMPLE_graph_slopes 29 | clear_array = SAMPLE_numbers 30 | set_variable = { SAMPLE_count = 0 } 31 | 32 | set_country_flag = open_line_gui 33 | } 34 | } 35 | open_dial_gui = { 36 | icon = generic_industry 37 | 38 | visible = { 39 | is_debug = yes 40 | } 41 | 42 | fire_only_once = no 43 | cost = 0 44 | 45 | complete_effect = { 46 | set_country_flag = open_dial_gui 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /graph_sample/common/scripted_effects/line_graph_scripted_effects.txt: -------------------------------------------------------------------------------- 1 | SAMPLE_add_random_point_to_line = { 2 | # Adds a random point to the line graph 3 | 4 | # This count is displayed as an x-axis label, increment it 5 | add_to_variable = { SAMPLE_count = 1 } 6 | 7 | # We keep track of the last y position so we can calculate the slope 8 | set_variable = { SAMPLE_last_y_position = SAMPLE_y_position } 9 | 10 | # Random new y position, 10-90 11 | set_variable = { SAMPLE_y_position = random } 12 | multiply_variable = { SAMPLE_y_position = 80 } 13 | add_to_variable = { SAMPLE_y_position = 10 } 14 | round_variable = SAMPLE_y_position 15 | 16 | # Prune arrays so they hold at most 20 elements 17 | if = { 18 | limit = { 19 | check_variable = { SAMPLE_count > 20 } 20 | } 21 | remove_from_array = { array = SAMPLE_graph_offsets index = 0 } 22 | remove_from_array = { array = SAMPLE_graph_slopes index = 0 } 23 | remove_from_array = { array = SAMPLE_numbers index = 0 } 24 | } 25 | 26 | # The y position offset is the inverse of the y position 27 | set_temp_variable = { offset = SAMPLE_last_y_position } 28 | multiply_temp_variable = { offset = -1 } 29 | add_to_array = { SAMPLE_graph_offsets = offset } 30 | 31 | # The 'slope' here is simply the difference between the current y value and the last one, divided by 2 plus 50 32 | # These last two changes are needed for the shader 33 | set_temp_variable = { diff = SAMPLE_y_position } 34 | subtract_from_temp_variable = { diff = SAMPLE_last_y_position } 35 | divide_temp_variable = { diff = 2 } 36 | add_to_temp_variable = { diff = 50 } 37 | add_to_array = { SAMPLE_graph_slopes = diff } 38 | 39 | add_to_array = { SAMPLE_numbers = SAMPLE_count } 40 | } -------------------------------------------------------------------------------- /graph_sample/common/scripted_effects/radar_graph_scripted_effects.txt: -------------------------------------------------------------------------------- 1 | SAMPLE_randomize_axes_values = { 2 | # Sets up random values from 4-9 for each of the axes on the radar graph 3 | 4 | set_variable = { SAMPLE_radar_0 = random } 5 | multiply_variable = { SAMPLE_radar_0 = 5 } 6 | add_to_variable = { SAMPLE_radar_0 = 4 } 7 | subtract_from_variable = { SAMPLE_radar_0 = 0.5 } 8 | round_variable = SAMPLE_radar_0 9 | 10 | set_variable = { SAMPLE_radar_1 = random } 11 | multiply_variable = { SAMPLE_radar_1 = 5 } 12 | add_to_variable = { SAMPLE_radar_1 = 4 } 13 | subtract_from_variable = { SAMPLE_radar_1 = 0.5 } 14 | round_variable = SAMPLE_radar_1 15 | 16 | set_variable = { SAMPLE_radar_2 = random } 17 | multiply_variable = { SAMPLE_radar_2 = 5 } 18 | add_to_variable = { SAMPLE_radar_2 = 4 } 19 | subtract_from_variable = { SAMPLE_radar_2 = 0.5 } 20 | round_variable = SAMPLE_radar_2 21 | 22 | set_variable = { SAMPLE_radar_3 = random } 23 | multiply_variable = { SAMPLE_radar_3 = 5 } 24 | add_to_variable = { SAMPLE_radar_3 = 4 } 25 | subtract_from_variable = { SAMPLE_radar_3 = 0.5 } 26 | round_variable = SAMPLE_radar_3 27 | 28 | set_variable = { SAMPLE_radar_4 = random } 29 | multiply_variable = { SAMPLE_radar_4 = 5 } 30 | add_to_variable = { SAMPLE_radar_4 = 4 } 31 | subtract_from_variable = { SAMPLE_radar_4 = 0.5 } 32 | round_variable = SAMPLE_radar_4 33 | } 34 | 35 | SAMPLE_convert_axes_values_to_frames = { 36 | # Computes the frame values for each of the radar graph progress bars, based on these inputs 37 | 38 | set_variable = { SAMPLE_radar_display_0 = SAMPLE_radar_0 } 39 | multiply_variable = { SAMPLE_radar_display_0 = 10 } 40 | add_to_variable = { SAMPLE_radar_display_0 = SAMPLE_radar_1 } 41 | 42 | set_variable = { SAMPLE_radar_display_1 = SAMPLE_radar_1 } 43 | multiply_variable = { SAMPLE_radar_display_1 = 10 } 44 | add_to_variable = { SAMPLE_radar_display_1 = SAMPLE_radar_2 } 45 | 46 | set_variable = { SAMPLE_radar_display_2 = SAMPLE_radar_2 } 47 | multiply_variable = { SAMPLE_radar_display_2 = 10 } 48 | add_to_variable = { SAMPLE_radar_display_2 = SAMPLE_radar_3 } 49 | 50 | set_variable = { SAMPLE_radar_display_3 = SAMPLE_radar_3 } 51 | multiply_variable = { SAMPLE_radar_display_3 = 10 } 52 | add_to_variable = { SAMPLE_radar_display_3 = SAMPLE_radar_4 } 53 | 54 | set_variable = { SAMPLE_radar_display_4 = SAMPLE_radar_4 } 55 | multiply_variable = { SAMPLE_radar_display_4 = 10 } 56 | add_to_variable = { SAMPLE_radar_display_4 = SAMPLE_radar_0 } 57 | } -------------------------------------------------------------------------------- /graph_sample/common/scripted_guis/dial_sample_scripted_gui.txt: -------------------------------------------------------------------------------- 1 | scripted_gui = { 2 | dial_sample_scripted_gui = { 3 | window_name = "dial_sample_gui" 4 | context_type = player_context 5 | 6 | visible = { 7 | has_country_flag = open_dial_gui 8 | } 9 | 10 | effects = { 11 | close_button_click = { 12 | clr_country_flag = open_dial_gui 13 | } 14 | refresh_button_click = { 15 | set_variable = { SAMPLE_dial_value = random } 16 | multiply_variable = { SAMPLE_dial_value = 100 } 17 | } 18 | left_button_click = { 19 | subtract_from_variable = { 20 | SAMPLE_half_dial_value = 5 21 | } 22 | clamp_variable = { var = SAMPLE_half_dial_value min = 0 max = 100 } 23 | } 24 | right_button_click = { 25 | add_to_variable = { 26 | SAMPLE_half_dial_value = 5 27 | } 28 | clamp_variable = { var = SAMPLE_half_dial_value min = 0 max = 100 } 29 | } 30 | } 31 | 32 | properties = { 33 | dial_hand = { 34 | frame = SAMPLE_dial_value 35 | } 36 | half_dial_hand = { 37 | frame = SAMPLE_half_dial_value 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /graph_sample/common/scripted_guis/line_graph_sample_scripted_gui.txt: -------------------------------------------------------------------------------- 1 | scripted_gui = { 2 | line_graph_sample_scripted_gui = { 3 | window_name = "line_graph_sample_gui" 4 | context_type = player_context 5 | 6 | visible = { 7 | has_country_flag = open_line_gui 8 | } 9 | 10 | effects = { 11 | close_button_click = { 12 | clr_country_flag = open_line_gui 13 | } 14 | add_button_click = { 15 | # Invoke scripted effect to add a random point to the line 16 | # See scripted effect file 17 | 18 | SAMPLE_add_random_point_to_line = yes 19 | } 20 | } 21 | 22 | # Set up dynamic list to generate one line segment per point 23 | dynamic_lists = { 24 | line_segments = { 25 | array = SAMPLE_graph_offsets 26 | change_scope = no 27 | entry_container = line_graph_line_segment 28 | index = segment_idx 29 | } 30 | } 31 | 32 | properties = { 33 | segment = { 34 | # Sets they position of the line segment to the graph offset 35 | # Equal to -y1 36 | y = SAMPLE_graph_offsets^segment_idx 37 | 38 | # Tells the shader how steep to draw the line 39 | # Must be equal to (y2 - y1) / 2 + 50 40 | frame = SAMPLE_graph_slopes^segment_idx 41 | } 42 | } 43 | 44 | triggers = { 45 | # Optional. This hides every other x label, to give them some breathing room 46 | label_visible = { 47 | set_temp_variable = { si = segment_idx } 48 | modulo_temp_variable = { si = 2 } 49 | check_variable = { si = 0 } 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /graph_sample/common/scripted_guis/radar_graph_sample_scripted_gui.txt: -------------------------------------------------------------------------------- 1 | scripted_gui = { 2 | radar_graph_sample_scripted_gui = { 3 | window_name = "radar_graph_sample_gui" 4 | context_type = player_context 5 | 6 | visible = { 7 | has_country_flag = open_radar_gui 8 | } 9 | 10 | effects = { 11 | close_button_click = { 12 | clr_country_flag = open_radar_gui 13 | } 14 | refresh_button_click = { 15 | # Invoke scripted effects to generate random values and turn those into frame numbers 16 | # See scripted effect file 17 | 18 | SAMPLE_randomize_axes_values = yes 19 | SAMPLE_convert_axes_values_to_frames = yes 20 | } 21 | } 22 | 23 | properties = { 24 | radar_0 = { 25 | frame = SAMPLE_radar_display_0 26 | } 27 | radar_1 = { 28 | frame = SAMPLE_radar_display_1 29 | } 30 | radar_2 = { 31 | frame = SAMPLE_radar_display_2 32 | } 33 | radar_3 = { 34 | frame = SAMPLE_radar_display_3 35 | } 36 | radar_4 = { 37 | frame = SAMPLE_radar_display_4 38 | } 39 | 40 | flag_0 = { 41 | image = [USA.GetFlag] 42 | } 43 | flag_1 = { 44 | image = [JAP.GetFlag] 45 | } 46 | flag_2 = { 47 | image = [GER.GetFlag] 48 | } 49 | flag_3 = { 50 | image = [ENG.GetFlag] 51 | } 52 | flag_4 = { 53 | image = [SOV.GetFlag] 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /graph_sample/descriptor.mod: -------------------------------------------------------------------------------- 1 | version="1.0" 2 | tags={ 3 | "Utilities" 4 | } 5 | name="HOI4 Graph Samples" 6 | supported_version="1.10.2" -------------------------------------------------------------------------------- /graph_sample/gfx/FX/dial.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | 63 | return Out; 64 | } 65 | 66 | ]] 67 | } 68 | 69 | PixelShader = 70 | { 71 | MainCode PixelColor 72 | [[ 73 | 74 | float4 main( VS_OUTPUT v ) : PDX_COLOR 75 | { 76 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 77 | return vFirstColor; 78 | else 79 | return vSecondColor; 80 | } 81 | 82 | ]] 83 | 84 | MainCode PixelTexture 85 | [[ 86 | 87 | float4 main( VS_OUTPUT v ) : PDX_COLOR 88 | { 89 | float rot = CurrentState * 3.14159265f * 2.f; 90 | float2 centeredPos = v.vTexCoord0 + float2(-0.5f, -0.5f); 91 | float2 newPos = float2(cos(rot) * centeredPos.x - sin(rot) * centeredPos.y, sin(rot) * centeredPos.x + cos(rot) * centeredPos.y) + float2(0.5f, 0.5f); 92 | if (newPos.x > 1.f || newPos.x < 0.f || newPos.y > 1.f || newPos.y < 0.f) { 93 | return float4(0.f, 0.f, 0.f, 0.f); 94 | } 95 | return tex2D( TextureOne, float2(newPos.x, -newPos.y) ); 96 | } 97 | 98 | ]] 99 | } 100 | 101 | 102 | BlendState BlendState 103 | { 104 | BlendEnable = yes 105 | SourceBlend = "SRC_ALPHA" 106 | DestBlend = "INV_SRC_ALPHA" 107 | } 108 | 109 | 110 | Effect Color 111 | { 112 | VertexShader = "VertexShader" 113 | PixelShader = "PixelColor" 114 | } 115 | 116 | Effect Texture 117 | { 118 | VertexShader = "VertexShader" 119 | PixelShader = "PixelTexture" 120 | } 121 | 122 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/half_dial.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | 63 | return Out; 64 | } 65 | 66 | ]] 67 | } 68 | 69 | PixelShader = 70 | { 71 | MainCode PixelColor 72 | [[ 73 | 74 | float4 main( VS_OUTPUT v ) : PDX_COLOR 75 | { 76 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 77 | return vFirstColor; 78 | else 79 | return vSecondColor; 80 | } 81 | 82 | ]] 83 | 84 | MainCode PixelTexture 85 | [[ 86 | 87 | float4 main( VS_OUTPUT v ) : PDX_COLOR 88 | { 89 | float rot = CurrentState * 3.14159265f; 90 | float2 centeredPos = v.vTexCoord0 + float2(-0.5f, -0.5f); 91 | float2 newPos = float2(cos(rot) * centeredPos.x - sin(rot) * centeredPos.y, sin(rot) * centeredPos.x + cos(rot) * centeredPos.y) + float2(0.5f, 0.5f); 92 | if (newPos.x > 1.f || newPos.x < 0.f || newPos.y > 1.f || newPos.y < 0.f) { 93 | return float4(0.f, 0.f, 0.f, 0.f); 94 | } 95 | return tex2D( TextureOne, float2(newPos.x, -newPos.y) ); 96 | } 97 | 98 | ]] 99 | } 100 | 101 | 102 | BlendState BlendState 103 | { 104 | BlendEnable = yes 105 | SourceBlend = "SRC_ALPHA" 106 | DestBlend = "INV_SRC_ALPHA" 107 | } 108 | 109 | 110 | Effect Color 111 | { 112 | VertexShader = "VertexShader" 113 | PixelShader = "PixelColor" 114 | } 115 | 116 | Effect Texture 117 | { 118 | VertexShader = "VertexShader" 119 | PixelShader = "PixelTexture" 120 | } 121 | 122 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/line_graph.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | 63 | return Out; 64 | } 65 | 66 | ]] 67 | } 68 | 69 | PixelShader = 70 | { 71 | MainCode PixelColor 72 | [[ 73 | 74 | float4 main( VS_OUTPUT v ) : PDX_COLOR 75 | { 76 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 77 | return vFirstColor; 78 | else 79 | return vSecondColor; 80 | } 81 | 82 | ]] 83 | 84 | MainCode PixelTexture 85 | [[ 86 | 87 | float4 main( VS_OUTPUT v ) : PDX_COLOR 88 | { 89 | float y1 = 0.5f / 20.f; 90 | float y2 = CurrentState / 20.f; 91 | 92 | float xPos = v.vTexCoord0.x - 0.04f; 93 | float xPos2 = v.vTexCoord0.x; 94 | float xPos3 = v.vTexCoord0.x + 0.04f; 95 | float xPos4 = v.vTexCoord0.x + 0.08f; 96 | float yPos = v.vTexCoord0.y / 20.f; 97 | 98 | float dist = abs((y2 - y1) * xPos - (1.f) * yPos + y1) / sqrt((y2 - y1) * (y2 - y1) + 1.f); 99 | float dist2 = abs((y2 - y1) * xPos2 - (1.f) * yPos + y1) / sqrt((y2 - y1) * (y2 - y1) + 1.f); 100 | float dist3 = abs((y2 - y1) * xPos3 - (1.f) * yPos + y1) / sqrt((y2 - y1) * (y2 - y1) + 1.f); 101 | float dist4 = abs((y2 - y1) * xPos4 - (1.f) * yPos + y1) / sqrt((y2 - y1) * (y2 - y1) + 1.f); 102 | 103 | if (dist < 0.0004f || dist2 < 0.0004f || dist3 < 0.0004f || dist4 < 0.0004f) 104 | return tex2D( TextureOne, v.vTexCoord0.xy ); 105 | else 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | ]] 110 | } 111 | 112 | 113 | BlendState BlendState 114 | { 115 | BlendEnable = yes 116 | SourceBlend = "SRC_ALPHA" 117 | DestBlend = "INV_SRC_ALPHA" 118 | } 119 | 120 | 121 | Effect Color 122 | { 123 | VertexShader = "VertexShader" 124 | PixelShader = "PixelColor" 125 | } 126 | 127 | Effect Texture 128 | { 129 | VertexShader = "VertexShader" 130 | PixelShader = "PixelTexture" 131 | } 132 | 133 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float numSegments = vFirstColor.r * 1000.f; 91 | float segment = 1.f/numSegments * 3.14159265f * 2.f; 92 | float rot = vFirstColor.g * 1000.f * segment; 93 | 94 | int inValue = floor(CurrentState * 100.f); 95 | int i1 = floor(inValue / 10.f); 96 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 97 | 98 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 99 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 100 | float3 p3 = float3(0.5f, 0.5f, 0.f); 101 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 102 | 103 | float3 cp1 = cross(p2 - p1, p3-p1); 104 | float3 cp2 = cross(p2 - p1, pt-p1); 105 | float d = dot(cp1, cp2); 106 | if (d < 0) { 107 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 108 | } 109 | 110 | cp1 = cross(p3 - p1, p2-p1); 111 | cp2 = cross(p3 - p1, pt-p1); 112 | d = dot(cp1, cp2); 113 | if (d < 0) { 114 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 115 | } 116 | 117 | cp1 = cross(p3 - p2, p1-p2); 118 | cp2 = cross(p3 - p2, pt-p2); 119 | d = dot(cp1, cp2); 120 | if (d < 0) { 121 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 122 | } 123 | 124 | 125 | return tex2D( TextureOne, v.vTexCoord0.xy ); 126 | } 127 | 128 | ]] 129 | } 130 | 131 | 132 | BlendState BlendState 133 | { 134 | BlendEnable = yes 135 | SourceBlend = "SRC_ALPHA" 136 | DestBlend = "INV_SRC_ALPHA" 137 | } 138 | 139 | 140 | Effect Color 141 | { 142 | VertexShader = "VertexShader" 143 | PixelShader = "PixelColor" 144 | } 145 | 146 | Effect Texture 147 | { 148 | VertexShader = "VertexShader" 149 | PixelShader = "PixelTexture" 150 | } 151 | 152 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar5/0.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float segment = 1.f/5.f * 3.14159265f * 2.f; 91 | float rot = 0 * segment; 92 | 93 | int inValue = floor(CurrentState * 100.f); 94 | int i1 = floor(inValue / 10.f); 95 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 96 | 97 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 98 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 99 | float3 p3 = float3(0.5f, 0.5f, 0.f); 100 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 101 | 102 | float3 cp1 = cross(p2 - p1, p3-p1); 103 | float3 cp2 = cross(p2 - p1, pt-p1); 104 | float d = dot(cp1, cp2); 105 | if (d < 0) { 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | cp1 = cross(p3 - p1, p2-p1); 110 | cp2 = cross(p3 - p1, pt-p1); 111 | d = dot(cp1, cp2); 112 | if (d < 0) { 113 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 114 | } 115 | 116 | cp1 = cross(p3 - p2, p1-p2); 117 | cp2 = cross(p3 - p2, pt-p2); 118 | d = dot(cp1, cp2); 119 | if (d < 0) { 120 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 121 | } 122 | 123 | 124 | return tex2D( TextureOne, v.vTexCoord0.xy ); 125 | } 126 | 127 | ]] 128 | } 129 | 130 | 131 | BlendState BlendState 132 | { 133 | BlendEnable = yes 134 | SourceBlend = "SRC_ALPHA" 135 | DestBlend = "INV_SRC_ALPHA" 136 | } 137 | 138 | 139 | Effect Color 140 | { 141 | VertexShader = "VertexShader" 142 | PixelShader = "PixelColor" 143 | } 144 | 145 | Effect Texture 146 | { 147 | VertexShader = "VertexShader" 148 | PixelShader = "PixelTexture" 149 | } 150 | 151 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar5/1.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float segment = 1.f/5.f * 3.14159265f * 2.f; 91 | float rot = 1 * segment; 92 | 93 | int inValue = floor(CurrentState * 100.f); 94 | int i1 = floor(inValue / 10.f); 95 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 96 | 97 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 98 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 99 | float3 p3 = float3(0.5f, 0.5f, 0.f); 100 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 101 | 102 | float3 cp1 = cross(p2 - p1, p3-p1); 103 | float3 cp2 = cross(p2 - p1, pt-p1); 104 | float d = dot(cp1, cp2); 105 | if (d < 0) { 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | cp1 = cross(p3 - p1, p2-p1); 110 | cp2 = cross(p3 - p1, pt-p1); 111 | d = dot(cp1, cp2); 112 | if (d < 0) { 113 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 114 | } 115 | 116 | cp1 = cross(p3 - p2, p1-p2); 117 | cp2 = cross(p3 - p2, pt-p2); 118 | d = dot(cp1, cp2); 119 | if (d < 0) { 120 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 121 | } 122 | 123 | 124 | return tex2D( TextureOne, v.vTexCoord0.xy ); 125 | } 126 | 127 | ]] 128 | } 129 | 130 | 131 | BlendState BlendState 132 | { 133 | BlendEnable = yes 134 | SourceBlend = "SRC_ALPHA" 135 | DestBlend = "INV_SRC_ALPHA" 136 | } 137 | 138 | 139 | Effect Color 140 | { 141 | VertexShader = "VertexShader" 142 | PixelShader = "PixelColor" 143 | } 144 | 145 | Effect Texture 146 | { 147 | VertexShader = "VertexShader" 148 | PixelShader = "PixelTexture" 149 | } 150 | 151 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar5/2.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float segment = 1.f/5.f * 3.14159265f * 2.f; 91 | float rot = 2 * segment; 92 | 93 | int inValue = floor(CurrentState * 100.f); 94 | int i1 = floor(inValue / 10.f); 95 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 96 | 97 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 98 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 99 | float3 p3 = float3(0.5f, 0.5f, 0.f); 100 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 101 | 102 | float3 cp1 = cross(p2 - p1, p3-p1); 103 | float3 cp2 = cross(p2 - p1, pt-p1); 104 | float d = dot(cp1, cp2); 105 | if (d < 0) { 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | cp1 = cross(p3 - p1, p2-p1); 110 | cp2 = cross(p3 - p1, pt-p1); 111 | d = dot(cp1, cp2); 112 | if (d < 0) { 113 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 114 | } 115 | 116 | cp1 = cross(p3 - p2, p1-p2); 117 | cp2 = cross(p3 - p2, pt-p2); 118 | d = dot(cp1, cp2); 119 | if (d < 0) { 120 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 121 | } 122 | 123 | 124 | return tex2D( TextureOne, v.vTexCoord0.xy ); 125 | } 126 | 127 | ]] 128 | } 129 | 130 | 131 | BlendState BlendState 132 | { 133 | BlendEnable = yes 134 | SourceBlend = "SRC_ALPHA" 135 | DestBlend = "INV_SRC_ALPHA" 136 | } 137 | 138 | 139 | Effect Color 140 | { 141 | VertexShader = "VertexShader" 142 | PixelShader = "PixelColor" 143 | } 144 | 145 | Effect Texture 146 | { 147 | VertexShader = "VertexShader" 148 | PixelShader = "PixelTexture" 149 | } 150 | 151 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar5/3.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float segment = 1.f/5.f * 3.14159265f * 2.f; 91 | float rot = 3 * segment; 92 | 93 | int inValue = floor(CurrentState * 100.f); 94 | int i1 = floor(inValue / 10.f); 95 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 96 | 97 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 98 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 99 | float3 p3 = float3(0.5f, 0.5f, 0.f); 100 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 101 | 102 | float3 cp1 = cross(p2 - p1, p3-p1); 103 | float3 cp2 = cross(p2 - p1, pt-p1); 104 | float d = dot(cp1, cp2); 105 | if (d < 0) { 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | cp1 = cross(p3 - p1, p2-p1); 110 | cp2 = cross(p3 - p1, pt-p1); 111 | d = dot(cp1, cp2); 112 | if (d < 0) { 113 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 114 | } 115 | 116 | cp1 = cross(p3 - p2, p1-p2); 117 | cp2 = cross(p3 - p2, pt-p2); 118 | d = dot(cp1, cp2); 119 | if (d < 0) { 120 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 121 | } 122 | 123 | 124 | return tex2D( TextureOne, v.vTexCoord0.xy ); 125 | } 126 | 127 | ]] 128 | } 129 | 130 | 131 | BlendState BlendState 132 | { 133 | BlendEnable = yes 134 | SourceBlend = "SRC_ALPHA" 135 | DestBlend = "INV_SRC_ALPHA" 136 | } 137 | 138 | 139 | Effect Color 140 | { 141 | VertexShader = "VertexShader" 142 | PixelShader = "PixelColor" 143 | } 144 | 145 | Effect Texture 146 | { 147 | VertexShader = "VertexShader" 148 | PixelShader = "PixelTexture" 149 | } 150 | 151 | -------------------------------------------------------------------------------- /graph_sample/gfx/FX/radar5/4.shader: -------------------------------------------------------------------------------- 1 | Includes = { 2 | } 3 | 4 | PixelShader = 5 | { 6 | Samplers = 7 | { 8 | TextureOne = 9 | { 10 | Index = 0 11 | MagFilter = "Point" 12 | MinFilter = "Point" 13 | MipFilter = "None" 14 | AddressU = "Wrap" 15 | AddressV = "Wrap" 16 | } 17 | TextureTwo = 18 | { 19 | Index = 1 20 | MagFilter = "Point" 21 | MinFilter = "Point" 22 | MipFilter = "None" 23 | AddressU = "Wrap" 24 | AddressV = "Wrap" 25 | } 26 | } 27 | } 28 | 29 | 30 | VertexStruct VS_INPUT 31 | { 32 | float4 vPosition : POSITION; 33 | float2 vTexCoord : TEXCOORD0; 34 | }; 35 | 36 | VertexStruct VS_OUTPUT 37 | { 38 | float4 vPosition : PDX_POSITION; 39 | float2 vTexCoord0 : TEXCOORD0; 40 | }; 41 | 42 | 43 | ConstantBuffer( 0, 0 ) 44 | { 45 | float4x4 WorldViewProjectionMatrix; 46 | float4 vFirstColor; 47 | float4 vSecondColor; 48 | float CurrentState; 49 | }; 50 | 51 | 52 | VertexShader = 53 | { 54 | MainCode VertexShader 55 | [[ 56 | 57 | VS_OUTPUT main(const VS_INPUT v ) 58 | { 59 | VS_OUTPUT Out; 60 | Out.vPosition = mul( WorldViewProjectionMatrix, v.vPosition ); 61 | Out.vTexCoord0 = v.vTexCoord; 62 | Out.vTexCoord0.y = -Out.vTexCoord0.y; 63 | 64 | return Out; 65 | } 66 | 67 | ]] 68 | } 69 | 70 | PixelShader = 71 | { 72 | MainCode PixelColor 73 | [[ 74 | 75 | float4 main( VS_OUTPUT v ) : PDX_COLOR 76 | { 77 | if( v.vTexCoord0.x <= CurrentState / 2.f ) 78 | return vFirstColor; 79 | else 80 | return vSecondColor; 81 | } 82 | 83 | ]] 84 | 85 | MainCode PixelTexture 86 | [[ 87 | 88 | float4 main( VS_OUTPUT v ) : PDX_COLOR 89 | { 90 | float segment = 1.f/5.f * 3.14159265f * 2.f; 91 | float rot = 4 * segment; 92 | 93 | int inValue = floor(CurrentState * 100.f); 94 | int i1 = floor(inValue / 10.f); 95 | int i2 = (inValue + 0.01f) % 10; // 0.01f here bc float grossness 96 | 97 | float3 p1 = float3(0.5f + (sin(rot) * (i1+1) * 0.05f), 0.5f + (cos(rot) * (i1+1) * 0.05f), 0.f); 98 | float3 p2 = float3(0.5f + (sin(rot + segment) * (i2+1) * 0.05f), 0.5f + (cos(rot + segment) * (i2+1) * 0.05f), 0.f); 99 | float3 p3 = float3(0.5f, 0.5f, 0.f); 100 | float3 pt = float3(v.vTexCoord0.x, -v.vTexCoord0.y, 0.f); 101 | 102 | float3 cp1 = cross(p2 - p1, p3-p1); 103 | float3 cp2 = cross(p2 - p1, pt-p1); 104 | float d = dot(cp1, cp2); 105 | if (d < 0) { 106 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 107 | } 108 | 109 | cp1 = cross(p3 - p1, p2-p1); 110 | cp2 = cross(p3 - p1, pt-p1); 111 | d = dot(cp1, cp2); 112 | if (d < 0) { 113 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 114 | } 115 | 116 | cp1 = cross(p3 - p2, p1-p2); 117 | cp2 = cross(p3 - p2, pt-p2); 118 | d = dot(cp1, cp2); 119 | if (d < 0) { 120 | return tex2D( TextureTwo, v.vTexCoord0.xy ); 121 | } 122 | 123 | 124 | return tex2D( TextureOne, v.vTexCoord0.xy ); 125 | } 126 | 127 | ]] 128 | } 129 | 130 | 131 | BlendState BlendState 132 | { 133 | BlendEnable = yes 134 | SourceBlend = "SRC_ALPHA" 135 | DestBlend = "INV_SRC_ALPHA" 136 | } 137 | 138 | 139 | Effect Color 140 | { 141 | VertexShader = "VertexShader" 142 | PixelShader = "PixelColor" 143 | } 144 | 145 | Effect Texture 146 | { 147 | VertexShader = "VertexShader" 148 | PixelShader = "PixelTexture" 149 | } 150 | 151 | -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_back.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_back.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_back_half.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_back_half.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_background.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_background.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_dot.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_dot.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_empty.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_empty.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/dial/dial_full.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/dial/dial_full.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/line_graph/graph_line_empty.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/line_graph/graph_line_empty.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/line_graph/graph_line_full.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/line_graph/graph_line_full.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/line_graph/line_graph_background.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/line_graph/line_graph_background.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/line_graph/line_graph_chart.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/line_graph/line_graph_chart.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/radar_graph/radar_graph_background.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/radar_graph/radar_graph_background.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/radar_graph/radar_graph_empty.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/radar_graph/radar_graph_empty.dds -------------------------------------------------------------------------------- /graph_sample/gfx/interface/radar_graph/radar_graph_fill.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flaxbeard/hoi4-scripted-graphs/ed52a268d363fe237b3803d73abb3c10446241af/graph_sample/gfx/interface/radar_graph/radar_graph_fill.dds -------------------------------------------------------------------------------- /graph_sample/interface/dial_sample.gfx: -------------------------------------------------------------------------------- 1 | spriteTypes = { 2 | 3 | spriteType = { 4 | name = "GFX_Dial_Background" 5 | textureFile = "/gfx/interface/dial/dial_background.dds" 6 | } 7 | 8 | progressbartype = { 9 | name = "GFX_Dial" 10 | textureFile1 = "/gfx/interface/dial/dial_full.dds" 11 | textureFile2 = "/gfx/interface/dial/dial_empty.dds" 12 | size = { 13 | x = 200 14 | y = 200 15 | } 16 | effectFile = "gfx/FX/dial.shader" 17 | horizontal = yes 18 | } 19 | progressbartype = { 20 | name = "GFX_Half_Dial" 21 | textureFile1 = "/gfx/interface/dial/dial_full.dds" 22 | textureFile2 = "/gfx/interface/dial/dial_empty.dds" 23 | size = { 24 | x = 200 25 | y = 200 26 | } 27 | effectFile = "gfx/FX/half_dial.shader" 28 | horizontal = yes 29 | } 30 | 31 | # Optional, just for looks (render under and over the dial itself) 32 | spriteType = { 33 | name = "GFX_Dial_Back" 34 | textureFile = "/gfx/interface/dial/dial_back.dds" 35 | } 36 | spriteType = { 37 | name = "GFX_Dial_Back_Half" 38 | textureFile = "/gfx/interface/dial/dial_back_half.dds" 39 | } 40 | spriteType = { 41 | name = "GFX_Dial_Dot" 42 | textureFile = "/gfx/interface/dial/dial_dot.dds" 43 | } 44 | } -------------------------------------------------------------------------------- /graph_sample/interface/dial_sample.gui: -------------------------------------------------------------------------------- 1 | guiTypes = { 2 | containerWindowType = { 3 | name = "dial_sample_gui" 4 | position = { x = 0 y = 0} 5 | size = { width = 450 height= 250 } 6 | orientation = center 7 | origo = center 8 | moveable = yes 9 | 10 | background = { 11 | name = "background" 12 | quadTextureSprite = "GFX_Dial_Background" 13 | } 14 | 15 | containerWindowType = { 16 | name = "dial" 17 | position = { x = 18 y = 30 } 18 | 19 | iconType = { 20 | name = "dial_back" 21 | spriteType = "GFX_Dial_Back" 22 | position = { x = 0 y = 0 } 23 | } 24 | iconType = { 25 | name = "dial_hand" 26 | spriteType = "GFX_Dial" 27 | position = { x = 2 y = 2 } 28 | } 29 | iconType = { 30 | name = "dial_dot" 31 | spriteType = "GFX_Dial_Dot" 32 | position = { x = 1 y = 3 } 33 | } 34 | } 35 | containerWindowType = { 36 | name = "half_dial" 37 | position = { x = 228 y = 60 } 38 | 39 | iconType = { 40 | name = "half_dial_back" 41 | spriteType = "GFX_Dial_Back_Half" 42 | position = { x = 0 y = 0 } 43 | } 44 | iconType = { 45 | name = "half_dial_hand" 46 | spriteType = "GFX_Half_Dial" 47 | position = { x = 2 y = 2 } 48 | } 49 | iconType = { 50 | name = "half_dial_dot" 51 | spriteType = "GFX_Dial_Dot" 52 | position = { x = 1 y = 3 } 53 | } 54 | 55 | buttonType = { 56 | name = "left_button" 57 | spriteType = "GFX_production_line_arrow_left" 58 | position = { x = 20 y = 120 } 59 | } 60 | buttonType = { 61 | name = "right_button" 62 | spriteType = "GFX_production_line_arrow_right" 63 | position = { x = 150 y = 120 } 64 | } 65 | } 66 | 67 | # Utility buttons for demo, not needed for radar graph 68 | buttonType = { 69 | name = "close_button" 70 | spriteType = "GFX_closebutton" 71 | position = { x = 398 y = 20 } 72 | } 73 | buttonType = { 74 | name = "refresh_button" 75 | spriteType = "GFX_browser_refresh" 76 | position = { x = 16 y = 16 } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /graph_sample/interface/line_graph_sample.gfx: -------------------------------------------------------------------------------- 1 | spriteTypes = { 2 | 3 | spriteType = { 4 | name = "GFX_Line_Graph_Background" 5 | textureFile = "/gfx/interface/line_graph/line_graph_background.dds" 6 | } 7 | 8 | spriteType = { 9 | name = "GFX_Line_Graph_Chart" 10 | textureFile = "/gfx/interface/line_graph/line_graph_chart.dds" 11 | } 12 | 13 | progressbartype = { 14 | name = "GFX_Line_Segment" 15 | textureFile1 = "/gfx/interface/line_graph/graph_line_full.dds" 16 | textureFile2 = "/gfx/interface/line_graph/graph_line_empty.dds" 17 | size = { 18 | x = 10 19 | y = 200 20 | } 21 | effectFile = "gfx/FX/line_graph.lua" 22 | horizontal = yes 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /graph_sample/interface/line_graph_sample.gui: -------------------------------------------------------------------------------- 1 | guiTypes = { 2 | containerWindowType = { 3 | name = "line_graph_sample_gui" 4 | position = { x = 0 y = 0} 5 | size = { width = 350 height= 250 } 6 | orientation = center 7 | origo = center 8 | moveable = yes 9 | 10 | background = { 11 | name = "background" 12 | quadTextureSprite = "GFX_Line_Graph_Background" 13 | } 14 | 15 | # Chart background 16 | iconType = { 17 | name = "chart" 18 | spriteType = "GFX_Line_Graph_Chart" 19 | position = { x = 90 y = 70 } 20 | } 21 | 22 | # Container which will hold each of our line segments 23 | gridboxtype = { 24 | name = "line_segments" 25 | position = { x = 99 y = 66 } 26 | size = { width = 0 height = 200 } 27 | slotsize = { width = 10 height = 200 } 28 | max_slots_horizontal = 20 29 | add_horizontal = yes 30 | } 31 | 32 | # y-axis labels, very optional 33 | instantTextboxType = { 34 | name = "100pct" 35 | position = { x= 34 y = 65} 36 | font = "garamond_14" 37 | text = "100%" 38 | maxWidth = 50 39 | format = right 40 | } 41 | instantTextboxType = { 42 | name = "80pct" 43 | position = { x= 34 y = 85} 44 | font = "garamond_14" 45 | text = "80%" 46 | maxWidth = 50 47 | format = right 48 | } 49 | instantTextboxType = { 50 | name = "60pct" 51 | position = { x= 34 y = 105} 52 | font = "garamond_14" 53 | text = "60%" 54 | maxWidth = 50 55 | format = right 56 | } 57 | instantTextboxType = { 58 | name = "40pct" 59 | position = { x= 34 y = 125} 60 | font = "garamond_14" 61 | text = "40%" 62 | maxWidth = 50 63 | format = right 64 | } 65 | instantTextboxType = { 66 | name = "20pct" 67 | position = { x= 34 y = 145} 68 | font = "garamond_14" 69 | text = "20%" 70 | maxWidth = 50 71 | format = right 72 | } 73 | instantTextboxType = { 74 | name = "0pct" 75 | position = { x= 34 y = 165} 76 | font = "garamond_14" 77 | text = "0%" 78 | maxWidth = 50 79 | format = right 80 | } 81 | 82 | # Utility buttons for demo, not needed for radar graph 83 | buttonType = { 84 | name = "close_button" 85 | spriteType = "GFX_closebutton" 86 | position = { x = 298 y = 20 } 87 | } 88 | buttonType = { 89 | name = "add_button" 90 | spriteType = "GFX_NV_btn_add" 91 | position = { x = 20 y = 20 } 92 | } 93 | } 94 | 95 | # Line segment container, very important 96 | containerWindowType = { 97 | name = "line_graph_line_segment" 98 | size = { width = 10 height = 200 } 99 | position = { x = 0 y = 0 } 100 | 101 | # Line segment progress bar, using our custom asset with custom shader 102 | iconType = { 103 | name = "segment" 104 | spriteType = "GFX_Line_Segment" 105 | position = { x = 0 y = 0 } 106 | frame = 57 107 | } 108 | 109 | # Optional, x-axis label which corresponds to the value of this segment 110 | instantTextboxType = { 111 | name = "label" 112 | position = { x = -15 y = 112} 113 | font = "garamond_14" 114 | text = "line_graph_data_label" 115 | maxWidth = 30 116 | format = center 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /graph_sample/interface/radar_graph_sample.gfx: -------------------------------------------------------------------------------- 1 | spriteTypes = { 2 | 3 | spriteType = { 4 | name = "GFX_Radar_Graph_Background" 5 | textureFile = "/gfx/interface/radar_graph/radar_graph_background.dds" 6 | } 7 | 8 | # Five graphical assets, one for each shaderfile 9 | progressbartype = { 10 | name = "GFX_Radar_0" 11 | textureFile1 = "/gfx/interface/radar_graph/radar_graph_fill.dds" 12 | textureFile2 = "/gfx/interface/radar_graph/radar_graph_empty.dds" 13 | size = { 14 | x = 190 15 | y = 190 16 | } 17 | color = { 0.005 0.000 0.0 0.0 } 18 | 19 | effectFile = "gfx/FX/radar.lua" 20 | horizontal = yes 21 | } 22 | progressbartype = { 23 | name = "GFX_Radar_1" 24 | textureFile1 = "/gfx/interface/radar_graph/radar_graph_fill.dds" 25 | textureFile2 = "/gfx/interface/radar_graph/radar_graph_empty.dds" 26 | size = { 27 | x = 190 28 | y = 190 29 | } 30 | effectFile = "gfx/FX/radar5/1.lua" 31 | horizontal = yes 32 | } 33 | progressbartype = { 34 | name = "GFX_Radar_2" 35 | textureFile1 = "/gfx/interface/radar_graph/radar_graph_fill.dds" 36 | textureFile2 = "/gfx/interface/radar_graph/radar_graph_empty.dds" 37 | size = { 38 | x = 190 39 | y = 190 40 | } 41 | effectFile = "gfx/FX/radar5/2.lua" 42 | horizontal = yes 43 | } 44 | progressbartype = { 45 | name = "GFX_Radar_3" 46 | textureFile1 = "/gfx/interface/radar_graph/radar_graph_fill.dds" 47 | textureFile2 = "/gfx/interface/radar_graph/radar_graph_empty.dds" 48 | size = { 49 | x = 190 50 | y = 190 51 | } 52 | effectFile = "gfx/FX/radar5/3.lua" 53 | horizontal = yes 54 | } 55 | progressbartype = { 56 | name = "GFX_Radar_4" 57 | textureFile1 = "/gfx/interface/radar_graph/radar_graph_fill.dds" 58 | textureFile2 = "/gfx/interface/radar_graph/radar_graph_empty.dds" 59 | size = { 60 | x = 190 61 | y = 190 62 | } 63 | effectFile = "gfx/FX/radar5/4.lua" 64 | horizontal = yes 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /graph_sample/interface/radar_graph_sample.gui: -------------------------------------------------------------------------------- 1 | guiTypes = { 2 | containerWindowType = { 3 | name = "radar_graph_sample_gui" 4 | position = { x = 0 y = 0} 5 | size = { width = 250 height= 250 } 6 | orientation = center 7 | origo = center 8 | moveable = yes 9 | 10 | background = { 11 | name = "background" 12 | quadTextureSprite = "GFX_Radar_Graph_Background" 13 | } 14 | 15 | # Five progress bar iconTypes, corresponding to the five shader files 16 | iconType = { 17 | name = "radar_0" 18 | spriteType = "GFX_Radar_0" 19 | position = { x = 30 y = 32 } 20 | } 21 | iconType = { 22 | name = "radar_1" 23 | spriteType = "GFX_Radar_1" 24 | position = { x = 30 y = 32 } 25 | } 26 | iconType = { 27 | name = "radar_2" 28 | spriteType = "GFX_Radar_2" 29 | position = { x = 30 y = 32 } 30 | } 31 | iconType = { 32 | name = "radar_3" 33 | spriteType = "GFX_Radar_3" 34 | position = { x = 30 y = 32 } 35 | } 36 | iconType = { 37 | name = "radar_4" 38 | spriteType = "GFX_Radar_4" 39 | position = { x = 30 y = 32 } 40 | } 41 | 42 | 43 | # Utility buttons for demo, not needed for radar graph 44 | buttonType = { 45 | name = "close_button" 46 | spriteType = "GFX_closebutton" 47 | position = { x = 198 y = 20 } 48 | } 49 | buttonType = { 50 | name = "refresh_button" 51 | spriteType = "GFX_browser_refresh" 52 | position = { x = 16 y = 16 } 53 | } 54 | 55 | # Flags for demo, not needed for radar graph 56 | iconType = { 57 | name = "flag_0" 58 | quadTextureSprite ="GFX_flag_small" 59 | position = { x = 112 y = 13} 60 | } 61 | iconType = { 62 | name = "flag_1" 63 | quadTextureSprite ="GFX_flag_small" 64 | position = { x = 12 y = 85} 65 | } 66 | iconType = { 67 | name = "flag_2" 68 | quadTextureSprite ="GFX_flag_small" 69 | position = { x = 212 y = 85} 70 | } 71 | iconType = { 72 | name = "flag_3" 73 | quadTextureSprite ="GFX_flag_small" 74 | position = { x = 47 y = 203 } 75 | } 76 | iconType = { 77 | name = "flag_4" 78 | quadTextureSprite ="GFX_flag_small" 79 | position = { x = 178 y = 203} 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /graph_sample/localisation/graph_sample_localisation_l_english.yml: -------------------------------------------------------------------------------- 1 | l_english: 2 | sample_category:0 "Graph Sample Debug Decisions" 3 | open_radar_gui:0 "Open Radar Graph Sample GUI" 4 | open_line_gui:0 "Open Line Graph Sample GUI" 5 | open_dial_gui:0 "Open Dial Sample GUI" 6 | line_graph_data_label:0 "[?SAMPLE_numbers^segment_idx]" --------------------------------------------------------------------------------